Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSat, 15 Dec 2012 10:27:54 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/15/t1355585302ywsvm8ljflcm753.htm/, Retrieved Tue, 30 Apr 2024 19:45:30 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=200010, Retrieved Tue, 30 Apr 2024 19:45:30 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact113
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-14 11:54:22] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP   [ARIMA Forecasting] [] [2011-12-06 20:23:08] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [] [2012-12-15 15:27:54] [7d61013405aa85534cb0146e7095f1e4] [Current]
Feedback Forum

Post a new message
Dataseries X:
7116
6927
6731
6850
6766
6979
7149
7067
7170
7237
7240
7645
7678
7491
7816
7631
8395
8578
8950
9450
9501
10083
10544
11299
12049
12860
13389
13796
14505
14727
14646
14861
15012
15421
15227
15124
14953
15039
15128
15221
14876
14517
14609
14735
14574
14636
15104
14393
13919
13751
13628
13792
13892
14024
13908
13920
13897
13759
13323
13097
12758
12806
12673
12500
12720
12749
12794
12544
12088
12258




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 2 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200010&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200010&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200010&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[58])
4614636-------
4715104-------
4814393-------
4913919-------
5013751-------
5113628-------
5213792-------
5313892-------
5414024-------
5513908-------
5613920-------
5713897-------
5813759-------
591332313745.417113101.126514389.70760.09940.483500.4835
601309713641.424512596.777714686.07130.15350.72490.07930.4127
611275813492.047612055.505414928.58970.15830.70510.28010.3578
621280613426.78211602.084315251.47970.25240.76370.36380.3606
631267313422.541611201.906315643.17680.25410.70680.4280.3832
641250013419.266610796.794616041.73860.2460.71150.39030.3998
651272013530.728610502.405416559.05190.29990.74760.40760.4413
661274913496.527410060.057516932.99730.33490.67110.38180.4405
671279413475.88759630.499317321.27570.36410.64450.41280.4426
681254413525.85589272.116917779.59470.32550.6320.42790.4572
691208813449.09828788.754618109.44180.28350.64830.42530.4482
701225813547.29738483.13818611.45670.30890.71390.46730.4673

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[58]) \tabularnewline
46 & 14636 & - & - & - & - & - & - & - \tabularnewline
47 & 15104 & - & - & - & - & - & - & - \tabularnewline
48 & 14393 & - & - & - & - & - & - & - \tabularnewline
49 & 13919 & - & - & - & - & - & - & - \tabularnewline
50 & 13751 & - & - & - & - & - & - & - \tabularnewline
51 & 13628 & - & - & - & - & - & - & - \tabularnewline
52 & 13792 & - & - & - & - & - & - & - \tabularnewline
53 & 13892 & - & - & - & - & - & - & - \tabularnewline
54 & 14024 & - & - & - & - & - & - & - \tabularnewline
55 & 13908 & - & - & - & - & - & - & - \tabularnewline
56 & 13920 & - & - & - & - & - & - & - \tabularnewline
57 & 13897 & - & - & - & - & - & - & - \tabularnewline
58 & 13759 & - & - & - & - & - & - & - \tabularnewline
59 & 13323 & 13745.4171 & 13101.1265 & 14389.7076 & 0.0994 & 0.4835 & 0 & 0.4835 \tabularnewline
60 & 13097 & 13641.4245 & 12596.7777 & 14686.0713 & 0.1535 & 0.7249 & 0.0793 & 0.4127 \tabularnewline
61 & 12758 & 13492.0476 & 12055.5054 & 14928.5897 & 0.1583 & 0.7051 & 0.2801 & 0.3578 \tabularnewline
62 & 12806 & 13426.782 & 11602.0843 & 15251.4797 & 0.2524 & 0.7637 & 0.3638 & 0.3606 \tabularnewline
63 & 12673 & 13422.5416 & 11201.9063 & 15643.1768 & 0.2541 & 0.7068 & 0.428 & 0.3832 \tabularnewline
64 & 12500 & 13419.2666 & 10796.7946 & 16041.7386 & 0.246 & 0.7115 & 0.3903 & 0.3998 \tabularnewline
65 & 12720 & 13530.7286 & 10502.4054 & 16559.0519 & 0.2999 & 0.7476 & 0.4076 & 0.4413 \tabularnewline
66 & 12749 & 13496.5274 & 10060.0575 & 16932.9973 & 0.3349 & 0.6711 & 0.3818 & 0.4405 \tabularnewline
67 & 12794 & 13475.8875 & 9630.4993 & 17321.2757 & 0.3641 & 0.6445 & 0.4128 & 0.4426 \tabularnewline
68 & 12544 & 13525.8558 & 9272.1169 & 17779.5947 & 0.3255 & 0.632 & 0.4279 & 0.4572 \tabularnewline
69 & 12088 & 13449.0982 & 8788.7546 & 18109.4418 & 0.2835 & 0.6483 & 0.4253 & 0.4482 \tabularnewline
70 & 12258 & 13547.2973 & 8483.138 & 18611.4567 & 0.3089 & 0.7139 & 0.4673 & 0.4673 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200010&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[58])[/C][/ROW]
[ROW][C]46[/C][C]14636[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]15104[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]14393[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]13919[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]13751[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]13628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]13792[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]13892[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]14024[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]13908[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]13920[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]13897[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]13759[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]13323[/C][C]13745.4171[/C][C]13101.1265[/C][C]14389.7076[/C][C]0.0994[/C][C]0.4835[/C][C]0[/C][C]0.4835[/C][/ROW]
[ROW][C]60[/C][C]13097[/C][C]13641.4245[/C][C]12596.7777[/C][C]14686.0713[/C][C]0.1535[/C][C]0.7249[/C][C]0.0793[/C][C]0.4127[/C][/ROW]
[ROW][C]61[/C][C]12758[/C][C]13492.0476[/C][C]12055.5054[/C][C]14928.5897[/C][C]0.1583[/C][C]0.7051[/C][C]0.2801[/C][C]0.3578[/C][/ROW]
[ROW][C]62[/C][C]12806[/C][C]13426.782[/C][C]11602.0843[/C][C]15251.4797[/C][C]0.2524[/C][C]0.7637[/C][C]0.3638[/C][C]0.3606[/C][/ROW]
[ROW][C]63[/C][C]12673[/C][C]13422.5416[/C][C]11201.9063[/C][C]15643.1768[/C][C]0.2541[/C][C]0.7068[/C][C]0.428[/C][C]0.3832[/C][/ROW]
[ROW][C]64[/C][C]12500[/C][C]13419.2666[/C][C]10796.7946[/C][C]16041.7386[/C][C]0.246[/C][C]0.7115[/C][C]0.3903[/C][C]0.3998[/C][/ROW]
[ROW][C]65[/C][C]12720[/C][C]13530.7286[/C][C]10502.4054[/C][C]16559.0519[/C][C]0.2999[/C][C]0.7476[/C][C]0.4076[/C][C]0.4413[/C][/ROW]
[ROW][C]66[/C][C]12749[/C][C]13496.5274[/C][C]10060.0575[/C][C]16932.9973[/C][C]0.3349[/C][C]0.6711[/C][C]0.3818[/C][C]0.4405[/C][/ROW]
[ROW][C]67[/C][C]12794[/C][C]13475.8875[/C][C]9630.4993[/C][C]17321.2757[/C][C]0.3641[/C][C]0.6445[/C][C]0.4128[/C][C]0.4426[/C][/ROW]
[ROW][C]68[/C][C]12544[/C][C]13525.8558[/C][C]9272.1169[/C][C]17779.5947[/C][C]0.3255[/C][C]0.632[/C][C]0.4279[/C][C]0.4572[/C][/ROW]
[ROW][C]69[/C][C]12088[/C][C]13449.0982[/C][C]8788.7546[/C][C]18109.4418[/C][C]0.2835[/C][C]0.6483[/C][C]0.4253[/C][C]0.4482[/C][/ROW]
[ROW][C]70[/C][C]12258[/C][C]13547.2973[/C][C]8483.138[/C][C]18611.4567[/C][C]0.3089[/C][C]0.7139[/C][C]0.4673[/C][C]0.4673[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200010&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200010&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[58])
4614636-------
4715104-------
4814393-------
4913919-------
5013751-------
5113628-------
5213792-------
5313892-------
5414024-------
5513908-------
5613920-------
5713897-------
5813759-------
591332313745.417113101.126514389.70760.09940.483500.4835
601309713641.424512596.777714686.07130.15350.72490.07930.4127
611275813492.047612055.505414928.58970.15830.70510.28010.3578
621280613426.78211602.084315251.47970.25240.76370.36380.3606
631267313422.541611201.906315643.17680.25410.70680.4280.3832
641250013419.266610796.794616041.73860.2460.71150.39030.3998
651272013530.728610502.405416559.05190.29990.74760.40760.4413
661274913496.527410060.057516932.99730.33490.67110.38180.4405
671279413475.88759630.499317321.27570.36410.64450.41280.4426
681254413525.85589272.116917779.59470.32550.6320.42790.4572
691208813449.09828788.754618109.44180.28350.64830.42530.4482
701225813547.29738483.13818611.45670.30890.71390.46730.4673







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.0239-0.03070178436.18900
600.0391-0.03990.0353296398.0143237417.1017487.2547
610.0543-0.05440.0417538825.8239337886.6758581.2802
620.0693-0.04620.0428385370.2877349757.5787591.4031
630.0844-0.05580.0454561812.5777392168.5785626.2336
640.0997-0.06850.0493845051.0935467648.9977683.8487
650.1142-0.05990.0508657280.9204494739.2724703.377
660.1299-0.05540.0514558797.1735502746.51709.0462
670.1456-0.05060.0513464970.5505498549.1812706.0802
680.1605-0.07260.0534964040.7347545098.3365738.3078
690.1768-0.10120.05781852588.3145663961.0618814.8381
700.1907-0.09520.06091662287.6303747154.9425864.3812

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.0239 & -0.0307 & 0 & 178436.189 & 0 & 0 \tabularnewline
60 & 0.0391 & -0.0399 & 0.0353 & 296398.0143 & 237417.1017 & 487.2547 \tabularnewline
61 & 0.0543 & -0.0544 & 0.0417 & 538825.8239 & 337886.6758 & 581.2802 \tabularnewline
62 & 0.0693 & -0.0462 & 0.0428 & 385370.2877 & 349757.5787 & 591.4031 \tabularnewline
63 & 0.0844 & -0.0558 & 0.0454 & 561812.5777 & 392168.5785 & 626.2336 \tabularnewline
64 & 0.0997 & -0.0685 & 0.0493 & 845051.0935 & 467648.9977 & 683.8487 \tabularnewline
65 & 0.1142 & -0.0599 & 0.0508 & 657280.9204 & 494739.2724 & 703.377 \tabularnewline
66 & 0.1299 & -0.0554 & 0.0514 & 558797.1735 & 502746.51 & 709.0462 \tabularnewline
67 & 0.1456 & -0.0506 & 0.0513 & 464970.5505 & 498549.1812 & 706.0802 \tabularnewline
68 & 0.1605 & -0.0726 & 0.0534 & 964040.7347 & 545098.3365 & 738.3078 \tabularnewline
69 & 0.1768 & -0.1012 & 0.0578 & 1852588.3145 & 663961.0618 & 814.8381 \tabularnewline
70 & 0.1907 & -0.0952 & 0.0609 & 1662287.6303 & 747154.9425 & 864.3812 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200010&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]59[/C][C]0.0239[/C][C]-0.0307[/C][C]0[/C][C]178436.189[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]0.0391[/C][C]-0.0399[/C][C]0.0353[/C][C]296398.0143[/C][C]237417.1017[/C][C]487.2547[/C][/ROW]
[ROW][C]61[/C][C]0.0543[/C][C]-0.0544[/C][C]0.0417[/C][C]538825.8239[/C][C]337886.6758[/C][C]581.2802[/C][/ROW]
[ROW][C]62[/C][C]0.0693[/C][C]-0.0462[/C][C]0.0428[/C][C]385370.2877[/C][C]349757.5787[/C][C]591.4031[/C][/ROW]
[ROW][C]63[/C][C]0.0844[/C][C]-0.0558[/C][C]0.0454[/C][C]561812.5777[/C][C]392168.5785[/C][C]626.2336[/C][/ROW]
[ROW][C]64[/C][C]0.0997[/C][C]-0.0685[/C][C]0.0493[/C][C]845051.0935[/C][C]467648.9977[/C][C]683.8487[/C][/ROW]
[ROW][C]65[/C][C]0.1142[/C][C]-0.0599[/C][C]0.0508[/C][C]657280.9204[/C][C]494739.2724[/C][C]703.377[/C][/ROW]
[ROW][C]66[/C][C]0.1299[/C][C]-0.0554[/C][C]0.0514[/C][C]558797.1735[/C][C]502746.51[/C][C]709.0462[/C][/ROW]
[ROW][C]67[/C][C]0.1456[/C][C]-0.0506[/C][C]0.0513[/C][C]464970.5505[/C][C]498549.1812[/C][C]706.0802[/C][/ROW]
[ROW][C]68[/C][C]0.1605[/C][C]-0.0726[/C][C]0.0534[/C][C]964040.7347[/C][C]545098.3365[/C][C]738.3078[/C][/ROW]
[ROW][C]69[/C][C]0.1768[/C][C]-0.1012[/C][C]0.0578[/C][C]1852588.3145[/C][C]663961.0618[/C][C]814.8381[/C][/ROW]
[ROW][C]70[/C][C]0.1907[/C][C]-0.0952[/C][C]0.0609[/C][C]1662287.6303[/C][C]747154.9425[/C][C]864.3812[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200010&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200010&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.0239-0.03070178436.18900
600.0391-0.03990.0353296398.0143237417.1017487.2547
610.0543-0.05440.0417538825.8239337886.6758581.2802
620.0693-0.04620.0428385370.2877349757.5787591.4031
630.0844-0.05580.0454561812.5777392168.5785626.2336
640.0997-0.06850.0493845051.0935467648.9977683.8487
650.1142-0.05990.0508657280.9204494739.2724703.377
660.1299-0.05540.0514558797.1735502746.51709.0462
670.1456-0.05060.0513464970.5505498549.1812706.0802
680.1605-0.07260.0534964040.7347545098.3365738.3078
690.1768-0.10120.05781852588.3145663961.0618814.8381
700.1907-0.09520.06091662287.6303747154.9425864.3812



Parameters (Session):
par1 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,par1))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:par1] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')