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 computationThu, 22 Dec 2011 06:42:00 -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/2011/Dec/22/t1324554161hb2z6kkx4p65oes.htm/, Retrieved Fri, 03 May 2024 04:29:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=159338, Retrieved Fri, 03 May 2024 04:29:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [web traffic] [2010-10-19 15:13:07] [b98453cac15ba1066b407e146608df68]
- RMP   [Variance Reduction Matrix] [Traffic] [2010-11-29 09:57:15] [b98453cac15ba1066b407e146608df68]
- RM      [Standard Deviation-Mean Plot] [Traffic] [2010-11-29 11:05:08] [b98453cac15ba1066b407e146608df68]
- RMP       [ARIMA Forecasting] [Traffic] [2010-11-29 21:10:32] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [WS IX-aantal over...] [2011-12-06 20:52:36] [74be16979710d4c4e7c6647856088456]
-   PD            [ARIMA Forecasting] [paper voorspellin...] [2011-12-22 11:42:00] [3e388c05c22237d436c48535c44f60bb] [Current]
Feedback Forum

Post a new message
Dataseries X:
18992
0
21552
1868501
7185612
10348382
6942386
4306121
2833176
1515513
1242981
699343
89497
128
10585
1070323
7167741
13193530
7885720
6785683
3106846
1706331
1286534
499079
24637
16
27309
873433
8435418
11290088
6840395
3803252
4388988
2680940
1174135
328388
22943
5657
28156
770831
8378147
13274946
7297840
2848227
2892179
1762224
1009375
188388
3393
0
13807
2619905
13297704
6240087
5108460
4553381
3148546
2433387
1748108
723454
58525
792
42585
1634386
10360570
6798599
4847748
4971202
343863
2200366
1549422
90144
63288
338
44863
1678135
9293357
9361258
6766402
4331272
3518962
2425786
1701795
552452
16104
0
90198
1731332
7954135
11561342
6834733
4255652
4243070
3415216
1841237
655456




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 3 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159338&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159338&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159338&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 time3 seconds
R Server'Gertrude Mary Cox' @ cox.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[84])
7290144-------
7363288-------
74338-------
7544863-------
761678135-------
779293357-------
789361258-------
796766402-------
804331272-------
813518962-------
822425786-------
831701795-------
84552452-------
8516104-122086.2994-2577127.58432332954.98550.45610.29510.44120.2951
860-55534.8064-2512713.38632401643.77340.48230.47720.48220.3138
879019818620.9594-2473104.35632510346.2750.47760.50580.49180.3373
8817313321563336.5113-929164.05564055837.07820.44750.87670.4640.7867
8979541359135837.59556641681.380411629993.81070.176510.45071
90115613429837556.86387343313.408312331800.31930.08780.93060.64591
9168347336629649.70454135405.5199123893.89010.4361e-040.45721
9242556524443941.58451949696.66016938186.50880.44120.03010.53530.9989
9342430703106776.5026612523.42065601029.58460.1860.18330.3730.9776
9434152162191823.402-302419.88944686066.69330.16820.05350.42710.9012
9518412371494314.5316-999495.65593988124.71910.39260.06560.43520.7704
96655456488036.709-2005746.80262981820.22070.44770.14380.47980.4798

\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[84]) \tabularnewline
72 & 90144 & - & - & - & - & - & - & - \tabularnewline
73 & 63288 & - & - & - & - & - & - & - \tabularnewline
74 & 338 & - & - & - & - & - & - & - \tabularnewline
75 & 44863 & - & - & - & - & - & - & - \tabularnewline
76 & 1678135 & - & - & - & - & - & - & - \tabularnewline
77 & 9293357 & - & - & - & - & - & - & - \tabularnewline
78 & 9361258 & - & - & - & - & - & - & - \tabularnewline
79 & 6766402 & - & - & - & - & - & - & - \tabularnewline
80 & 4331272 & - & - & - & - & - & - & - \tabularnewline
81 & 3518962 & - & - & - & - & - & - & - \tabularnewline
82 & 2425786 & - & - & - & - & - & - & - \tabularnewline
83 & 1701795 & - & - & - & - & - & - & - \tabularnewline
84 & 552452 & - & - & - & - & - & - & - \tabularnewline
85 & 16104 & -122086.2994 & -2577127.5843 & 2332954.9855 & 0.4561 & 0.2951 & 0.4412 & 0.2951 \tabularnewline
86 & 0 & -55534.8064 & -2512713.3863 & 2401643.7734 & 0.4823 & 0.4772 & 0.4822 & 0.3138 \tabularnewline
87 & 90198 & 18620.9594 & -2473104.3563 & 2510346.275 & 0.4776 & 0.5058 & 0.4918 & 0.3373 \tabularnewline
88 & 1731332 & 1563336.5113 & -929164.0556 & 4055837.0782 & 0.4475 & 0.8767 & 0.464 & 0.7867 \tabularnewline
89 & 7954135 & 9135837.5955 & 6641681.3804 & 11629993.8107 & 0.1765 & 1 & 0.4507 & 1 \tabularnewline
90 & 11561342 & 9837556.8638 & 7343313.4083 & 12331800.3193 & 0.0878 & 0.9306 & 0.6459 & 1 \tabularnewline
91 & 6834733 & 6629649.7045 & 4135405.519 & 9123893.8901 & 0.436 & 1e-04 & 0.4572 & 1 \tabularnewline
92 & 4255652 & 4443941.5845 & 1949696.6601 & 6938186.5088 & 0.4412 & 0.0301 & 0.5353 & 0.9989 \tabularnewline
93 & 4243070 & 3106776.5026 & 612523.4206 & 5601029.5846 & 0.186 & 0.1833 & 0.373 & 0.9776 \tabularnewline
94 & 3415216 & 2191823.402 & -302419.8894 & 4686066.6933 & 0.1682 & 0.0535 & 0.4271 & 0.9012 \tabularnewline
95 & 1841237 & 1494314.5316 & -999495.6559 & 3988124.7191 & 0.3926 & 0.0656 & 0.4352 & 0.7704 \tabularnewline
96 & 655456 & 488036.709 & -2005746.8026 & 2981820.2207 & 0.4477 & 0.1438 & 0.4798 & 0.4798 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159338&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[84])[/C][/ROW]
[ROW][C]72[/C][C]90144[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]63288[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]338[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]44863[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]1678135[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]9293357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]9361258[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]6766402[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]4331272[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]3518962[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]2425786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]1701795[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]552452[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]16104[/C][C]-122086.2994[/C][C]-2577127.5843[/C][C]2332954.9855[/C][C]0.4561[/C][C]0.2951[/C][C]0.4412[/C][C]0.2951[/C][/ROW]
[ROW][C]86[/C][C]0[/C][C]-55534.8064[/C][C]-2512713.3863[/C][C]2401643.7734[/C][C]0.4823[/C][C]0.4772[/C][C]0.4822[/C][C]0.3138[/C][/ROW]
[ROW][C]87[/C][C]90198[/C][C]18620.9594[/C][C]-2473104.3563[/C][C]2510346.275[/C][C]0.4776[/C][C]0.5058[/C][C]0.4918[/C][C]0.3373[/C][/ROW]
[ROW][C]88[/C][C]1731332[/C][C]1563336.5113[/C][C]-929164.0556[/C][C]4055837.0782[/C][C]0.4475[/C][C]0.8767[/C][C]0.464[/C][C]0.7867[/C][/ROW]
[ROW][C]89[/C][C]7954135[/C][C]9135837.5955[/C][C]6641681.3804[/C][C]11629993.8107[/C][C]0.1765[/C][C]1[/C][C]0.4507[/C][C]1[/C][/ROW]
[ROW][C]90[/C][C]11561342[/C][C]9837556.8638[/C][C]7343313.4083[/C][C]12331800.3193[/C][C]0.0878[/C][C]0.9306[/C][C]0.6459[/C][C]1[/C][/ROW]
[ROW][C]91[/C][C]6834733[/C][C]6629649.7045[/C][C]4135405.519[/C][C]9123893.8901[/C][C]0.436[/C][C]1e-04[/C][C]0.4572[/C][C]1[/C][/ROW]
[ROW][C]92[/C][C]4255652[/C][C]4443941.5845[/C][C]1949696.6601[/C][C]6938186.5088[/C][C]0.4412[/C][C]0.0301[/C][C]0.5353[/C][C]0.9989[/C][/ROW]
[ROW][C]93[/C][C]4243070[/C][C]3106776.5026[/C][C]612523.4206[/C][C]5601029.5846[/C][C]0.186[/C][C]0.1833[/C][C]0.373[/C][C]0.9776[/C][/ROW]
[ROW][C]94[/C][C]3415216[/C][C]2191823.402[/C][C]-302419.8894[/C][C]4686066.6933[/C][C]0.1682[/C][C]0.0535[/C][C]0.4271[/C][C]0.9012[/C][/ROW]
[ROW][C]95[/C][C]1841237[/C][C]1494314.5316[/C][C]-999495.6559[/C][C]3988124.7191[/C][C]0.3926[/C][C]0.0656[/C][C]0.4352[/C][C]0.7704[/C][/ROW]
[ROW][C]96[/C][C]655456[/C][C]488036.709[/C][C]-2005746.8026[/C][C]2981820.2207[/C][C]0.4477[/C][C]0.1438[/C][C]0.4798[/C][C]0.4798[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159338&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159338&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[84])
7290144-------
7363288-------
74338-------
7544863-------
761678135-------
779293357-------
789361258-------
796766402-------
804331272-------
813518962-------
822425786-------
831701795-------
84552452-------
8516104-122086.2994-2577127.58432332954.98550.45610.29510.44120.2951
860-55534.8064-2512713.38632401643.77340.48230.47720.48220.3138
879019818620.9594-2473104.35632510346.2750.47760.50580.49180.3373
8817313321563336.5113-929164.05564055837.07820.44750.87670.4640.7867
8979541359135837.59556641681.380411629993.81070.176510.45071
90115613429837556.86387343313.408312331800.31930.08780.93060.64591
9168347336629649.70454135405.5199123893.89010.4361e-040.45721
9242556524443941.58451949696.66016938186.50880.44120.03010.53530.9989
9342430703106776.5026612523.42065601029.58460.1860.18330.3730.9776
9434152162191823.402-302419.88944686066.69330.16820.05350.42710.9012
9518412371494314.5316-999495.65593988124.71910.39260.06560.43520.7704
96655456488036.709-2005746.80262981820.22070.44770.14380.47980.4798







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
85-10.2597-1.1319019096558845.921200
86-22.5744-11.0663084114725.578511090336785.7499105310.668
8768.27193.84391.99195123272743.13299101315438.210995400.8147
880.81340.10751.520828222484226.267313881607635.225117820.2344
890.1393-0.12931.24251396421024293.49290389490966.878538877.9927
900.12940.17521.06462971435195725.72737230441760.018858621.2446
910.1920.03090.91742059158078.4919637920258376.943798699.1038
920.2864-0.04240.807635452967624.7098562611847032.914750074.561
930.40960.36570.75851291162912235.85643561965388.796802223.1394
940.58060.55820.73851496689448870.48728874713736.964853741.5966
950.85150.23220.6925120355199100.646673554757860.935820703.8186
962.60710.3430.663428029218992.7621619760962955.254787248.9841

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & -10.2597 & -1.1319 & 0 & 19096558845.9212 & 0 & 0 \tabularnewline
86 & -22.5744 & -1 & 1.066 & 3084114725.5785 & 11090336785.7499 & 105310.668 \tabularnewline
87 & 68.2719 & 3.8439 & 1.9919 & 5123272743.1329 & 9101315438.2109 & 95400.8147 \tabularnewline
88 & 0.8134 & 0.1075 & 1.5208 & 28222484226.2673 & 13881607635.225 & 117820.2344 \tabularnewline
89 & 0.1393 & -0.1293 & 1.2425 & 1396421024293.49 & 290389490966.878 & 538877.9927 \tabularnewline
90 & 0.1294 & 0.1752 & 1.0646 & 2971435195725.72 & 737230441760.018 & 858621.2446 \tabularnewline
91 & 0.192 & 0.0309 & 0.917 & 42059158078.4919 & 637920258376.943 & 798699.1038 \tabularnewline
92 & 0.2864 & -0.0424 & 0.8076 & 35452967624.7098 & 562611847032.914 & 750074.561 \tabularnewline
93 & 0.4096 & 0.3657 & 0.7585 & 1291162912235.85 & 643561965388.796 & 802223.1394 \tabularnewline
94 & 0.5806 & 0.5582 & 0.7385 & 1496689448870.48 & 728874713736.964 & 853741.5966 \tabularnewline
95 & 0.8515 & 0.2322 & 0.6925 & 120355199100.646 & 673554757860.935 & 820703.8186 \tabularnewline
96 & 2.6071 & 0.343 & 0.6634 & 28029218992.7621 & 619760962955.254 & 787248.9841 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159338&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]85[/C][C]-10.2597[/C][C]-1.1319[/C][C]0[/C][C]19096558845.9212[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]-22.5744[/C][C]-1[/C][C]1.066[/C][C]3084114725.5785[/C][C]11090336785.7499[/C][C]105310.668[/C][/ROW]
[ROW][C]87[/C][C]68.2719[/C][C]3.8439[/C][C]1.9919[/C][C]5123272743.1329[/C][C]9101315438.2109[/C][C]95400.8147[/C][/ROW]
[ROW][C]88[/C][C]0.8134[/C][C]0.1075[/C][C]1.5208[/C][C]28222484226.2673[/C][C]13881607635.225[/C][C]117820.2344[/C][/ROW]
[ROW][C]89[/C][C]0.1393[/C][C]-0.1293[/C][C]1.2425[/C][C]1396421024293.49[/C][C]290389490966.878[/C][C]538877.9927[/C][/ROW]
[ROW][C]90[/C][C]0.1294[/C][C]0.1752[/C][C]1.0646[/C][C]2971435195725.72[/C][C]737230441760.018[/C][C]858621.2446[/C][/ROW]
[ROW][C]91[/C][C]0.192[/C][C]0.0309[/C][C]0.917[/C][C]42059158078.4919[/C][C]637920258376.943[/C][C]798699.1038[/C][/ROW]
[ROW][C]92[/C][C]0.2864[/C][C]-0.0424[/C][C]0.8076[/C][C]35452967624.7098[/C][C]562611847032.914[/C][C]750074.561[/C][/ROW]
[ROW][C]93[/C][C]0.4096[/C][C]0.3657[/C][C]0.7585[/C][C]1291162912235.85[/C][C]643561965388.796[/C][C]802223.1394[/C][/ROW]
[ROW][C]94[/C][C]0.5806[/C][C]0.5582[/C][C]0.7385[/C][C]1496689448870.48[/C][C]728874713736.964[/C][C]853741.5966[/C][/ROW]
[ROW][C]95[/C][C]0.8515[/C][C]0.2322[/C][C]0.6925[/C][C]120355199100.646[/C][C]673554757860.935[/C][C]820703.8186[/C][/ROW]
[ROW][C]96[/C][C]2.6071[/C][C]0.343[/C][C]0.6634[/C][C]28029218992.7621[/C][C]619760962955.254[/C][C]787248.9841[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159338&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159338&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
85-10.2597-1.1319019096558845.921200
86-22.5744-11.0663084114725.578511090336785.7499105310.668
8768.27193.84391.99195123272743.13299101315438.210995400.8147
880.81340.10751.520828222484226.267313881607635.225117820.2344
890.1393-0.12931.24251396421024293.49290389490966.878538877.9927
900.12940.17521.06462971435195725.72737230441760.018858621.2446
910.1920.03090.91742059158078.4919637920258376.943798699.1038
920.2864-0.04240.807635452967624.7098562611847032.914750074.561
930.40960.36570.75851291162912235.85643561965388.796802223.1394
940.58060.55820.73851496689448870.48728874713736.964853741.5966
950.85150.23220.6925120355199100.646673554757860.935820703.8186
962.60710.3430.663428029218992.7621619760962955.254787248.9841



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 1 ; 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 <- 6 #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')