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 computationTue, 09 Dec 2008 13:24:33 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/09/t1228854370c00wmzeg8lpd672.htm/, Retrieved Sun, 19 May 2024 08:45:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=31782, Retrieved Sun, 19 May 2024 08:45:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact146
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-09 20:24:33] [4b953869c7238aca4b6e0cfb0c5cddd6] [Current]
Feedback Forum

Post a new message
Dataseries X:
104,2
103,2
112,7
106,4
102,6
110,6
95,2
89,0
112,5
116,8
107,2
113,6
101,8
102,6
122,7
110,3
110,5
121,6
100,3
100,7
123,4
127,1
124,1
131,2
111,6
114,2
130,1
125,9
119,0
133,8
107,5
113,5
134,4
126,8
135,6
139,9
129,8
131,0
153,1
134,1
144,1
155,9
123,3
128,1
144,3
153,0
149,9
150,9
141,0
138,9
157,4
142,9
151,7
161,0
138,5
135,9
151,5
164,0
159,1
157,0
142,1
144,8
152,1
154,6
148,7
157,7
146,7




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 5 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31782&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]5 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31782&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31782&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 time5 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[55])
43123.3-------
44128.1-------
45144.3-------
46153-------
47149.9-------
48150.9-------
49141-------
50138.9-------
51157.4-------
52142.9-------
53151.7-------
54161-------
55138.5-------
56135.9137.977128.7867147.48410.33430.45710.97910.4571
57151.5161.1259150.864171.72550.037510.99911
58164164.5296152.9658176.51470.46550.98340.97031
59159.1161.8681149.0421175.22350.34230.37720.96050.9997
60157166.7357153.0824180.97210.09010.85340.98540.9999
61142.1153.0591139.062167.72730.07150.29920.94650.9741
62144.8153.1505138.4087168.63820.14530.9190.96430.9681
63152.1172.7492156.3609189.95410.00930.99930.95981
64154.6159.7601143.2909177.12490.28010.80640.97150.9918
65148.7161.6062144.3983179.78260.0820.7750.85730.9936
66157.7173.9758155.4487193.54580.05150.99430.90310.9998
67146.7147.0365129.4655165.72530.48590.13170.81470.8147

\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[55]) \tabularnewline
43 & 123.3 & - & - & - & - & - & - & - \tabularnewline
44 & 128.1 & - & - & - & - & - & - & - \tabularnewline
45 & 144.3 & - & - & - & - & - & - & - \tabularnewline
46 & 153 & - & - & - & - & - & - & - \tabularnewline
47 & 149.9 & - & - & - & - & - & - & - \tabularnewline
48 & 150.9 & - & - & - & - & - & - & - \tabularnewline
49 & 141 & - & - & - & - & - & - & - \tabularnewline
50 & 138.9 & - & - & - & - & - & - & - \tabularnewline
51 & 157.4 & - & - & - & - & - & - & - \tabularnewline
52 & 142.9 & - & - & - & - & - & - & - \tabularnewline
53 & 151.7 & - & - & - & - & - & - & - \tabularnewline
54 & 161 & - & - & - & - & - & - & - \tabularnewline
55 & 138.5 & - & - & - & - & - & - & - \tabularnewline
56 & 135.9 & 137.977 & 128.7867 & 147.4841 & 0.3343 & 0.4571 & 0.9791 & 0.4571 \tabularnewline
57 & 151.5 & 161.1259 & 150.864 & 171.7255 & 0.0375 & 1 & 0.9991 & 1 \tabularnewline
58 & 164 & 164.5296 & 152.9658 & 176.5147 & 0.4655 & 0.9834 & 0.9703 & 1 \tabularnewline
59 & 159.1 & 161.8681 & 149.0421 & 175.2235 & 0.3423 & 0.3772 & 0.9605 & 0.9997 \tabularnewline
60 & 157 & 166.7357 & 153.0824 & 180.9721 & 0.0901 & 0.8534 & 0.9854 & 0.9999 \tabularnewline
61 & 142.1 & 153.0591 & 139.062 & 167.7273 & 0.0715 & 0.2992 & 0.9465 & 0.9741 \tabularnewline
62 & 144.8 & 153.1505 & 138.4087 & 168.6382 & 0.1453 & 0.919 & 0.9643 & 0.9681 \tabularnewline
63 & 152.1 & 172.7492 & 156.3609 & 189.9541 & 0.0093 & 0.9993 & 0.9598 & 1 \tabularnewline
64 & 154.6 & 159.7601 & 143.2909 & 177.1249 & 0.2801 & 0.8064 & 0.9715 & 0.9918 \tabularnewline
65 & 148.7 & 161.6062 & 144.3983 & 179.7826 & 0.082 & 0.775 & 0.8573 & 0.9936 \tabularnewline
66 & 157.7 & 173.9758 & 155.4487 & 193.5458 & 0.0515 & 0.9943 & 0.9031 & 0.9998 \tabularnewline
67 & 146.7 & 147.0365 & 129.4655 & 165.7253 & 0.4859 & 0.1317 & 0.8147 & 0.8147 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31782&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[55])[/C][/ROW]
[ROW][C]43[/C][C]123.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]128.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]144.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]153[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]149.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]150.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]138.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]157.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]142.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]151.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]161[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]138.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]135.9[/C][C]137.977[/C][C]128.7867[/C][C]147.4841[/C][C]0.3343[/C][C]0.4571[/C][C]0.9791[/C][C]0.4571[/C][/ROW]
[ROW][C]57[/C][C]151.5[/C][C]161.1259[/C][C]150.864[/C][C]171.7255[/C][C]0.0375[/C][C]1[/C][C]0.9991[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]164[/C][C]164.5296[/C][C]152.9658[/C][C]176.5147[/C][C]0.4655[/C][C]0.9834[/C][C]0.9703[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]159.1[/C][C]161.8681[/C][C]149.0421[/C][C]175.2235[/C][C]0.3423[/C][C]0.3772[/C][C]0.9605[/C][C]0.9997[/C][/ROW]
[ROW][C]60[/C][C]157[/C][C]166.7357[/C][C]153.0824[/C][C]180.9721[/C][C]0.0901[/C][C]0.8534[/C][C]0.9854[/C][C]0.9999[/C][/ROW]
[ROW][C]61[/C][C]142.1[/C][C]153.0591[/C][C]139.062[/C][C]167.7273[/C][C]0.0715[/C][C]0.2992[/C][C]0.9465[/C][C]0.9741[/C][/ROW]
[ROW][C]62[/C][C]144.8[/C][C]153.1505[/C][C]138.4087[/C][C]168.6382[/C][C]0.1453[/C][C]0.919[/C][C]0.9643[/C][C]0.9681[/C][/ROW]
[ROW][C]63[/C][C]152.1[/C][C]172.7492[/C][C]156.3609[/C][C]189.9541[/C][C]0.0093[/C][C]0.9993[/C][C]0.9598[/C][C]1[/C][/ROW]
[ROW][C]64[/C][C]154.6[/C][C]159.7601[/C][C]143.2909[/C][C]177.1249[/C][C]0.2801[/C][C]0.8064[/C][C]0.9715[/C][C]0.9918[/C][/ROW]
[ROW][C]65[/C][C]148.7[/C][C]161.6062[/C][C]144.3983[/C][C]179.7826[/C][C]0.082[/C][C]0.775[/C][C]0.8573[/C][C]0.9936[/C][/ROW]
[ROW][C]66[/C][C]157.7[/C][C]173.9758[/C][C]155.4487[/C][C]193.5458[/C][C]0.0515[/C][C]0.9943[/C][C]0.9031[/C][C]0.9998[/C][/ROW]
[ROW][C]67[/C][C]146.7[/C][C]147.0365[/C][C]129.4655[/C][C]165.7253[/C][C]0.4859[/C][C]0.1317[/C][C]0.8147[/C][C]0.8147[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31782&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31782&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[55])
43123.3-------
44128.1-------
45144.3-------
46153-------
47149.9-------
48150.9-------
49141-------
50138.9-------
51157.4-------
52142.9-------
53151.7-------
54161-------
55138.5-------
56135.9137.977128.7867147.48410.33430.45710.97910.4571
57151.5161.1259150.864171.72550.037510.99911
58164164.5296152.9658176.51470.46550.98340.97031
59159.1161.8681149.0421175.22350.34230.37720.96050.9997
60157166.7357153.0824180.97210.09010.85340.98540.9999
61142.1153.0591139.062167.72730.07150.29920.94650.9741
62144.8153.1505138.4087168.63820.14530.9190.96430.9681
63152.1172.7492156.3609189.95410.00930.99930.95981
64154.6159.7601143.2909177.12490.28010.80640.97150.9918
65148.7161.6062144.3983179.78260.0820.7750.85730.9936
66157.7173.9758155.4487193.54580.05150.99430.90310.9998
67146.7147.0365129.4655165.72530.48590.13170.81470.8147







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.0352-0.01510.00134.31390.35950.5996
570.0336-0.05970.00592.65867.72162.7788
580.0372-0.00323e-040.28050.02340.1529
590.0421-0.01710.00147.66250.63850.7991
600.0436-0.05840.004994.78347.89862.8104
610.0489-0.07160.006120.102410.00853.1636
620.0516-0.05450.004569.73075.81092.4106
630.0508-0.11950.01426.389935.53255.9609
640.0555-0.03230.002726.62622.21891.4896
650.0574-0.07990.0067166.570813.88093.7257
660.0574-0.09360.0078264.902922.07524.6984
670.0648-0.00232e-040.11320.00940.0971

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.0352 & -0.0151 & 0.0013 & 4.3139 & 0.3595 & 0.5996 \tabularnewline
57 & 0.0336 & -0.0597 & 0.005 & 92.6586 & 7.7216 & 2.7788 \tabularnewline
58 & 0.0372 & -0.0032 & 3e-04 & 0.2805 & 0.0234 & 0.1529 \tabularnewline
59 & 0.0421 & -0.0171 & 0.0014 & 7.6625 & 0.6385 & 0.7991 \tabularnewline
60 & 0.0436 & -0.0584 & 0.0049 & 94.7834 & 7.8986 & 2.8104 \tabularnewline
61 & 0.0489 & -0.0716 & 0.006 & 120.1024 & 10.0085 & 3.1636 \tabularnewline
62 & 0.0516 & -0.0545 & 0.0045 & 69.7307 & 5.8109 & 2.4106 \tabularnewline
63 & 0.0508 & -0.1195 & 0.01 & 426.3899 & 35.5325 & 5.9609 \tabularnewline
64 & 0.0555 & -0.0323 & 0.0027 & 26.6262 & 2.2189 & 1.4896 \tabularnewline
65 & 0.0574 & -0.0799 & 0.0067 & 166.5708 & 13.8809 & 3.7257 \tabularnewline
66 & 0.0574 & -0.0936 & 0.0078 & 264.9029 & 22.0752 & 4.6984 \tabularnewline
67 & 0.0648 & -0.0023 & 2e-04 & 0.1132 & 0.0094 & 0.0971 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31782&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]56[/C][C]0.0352[/C][C]-0.0151[/C][C]0.0013[/C][C]4.3139[/C][C]0.3595[/C][C]0.5996[/C][/ROW]
[ROW][C]57[/C][C]0.0336[/C][C]-0.0597[/C][C]0.005[/C][C]92.6586[/C][C]7.7216[/C][C]2.7788[/C][/ROW]
[ROW][C]58[/C][C]0.0372[/C][C]-0.0032[/C][C]3e-04[/C][C]0.2805[/C][C]0.0234[/C][C]0.1529[/C][/ROW]
[ROW][C]59[/C][C]0.0421[/C][C]-0.0171[/C][C]0.0014[/C][C]7.6625[/C][C]0.6385[/C][C]0.7991[/C][/ROW]
[ROW][C]60[/C][C]0.0436[/C][C]-0.0584[/C][C]0.0049[/C][C]94.7834[/C][C]7.8986[/C][C]2.8104[/C][/ROW]
[ROW][C]61[/C][C]0.0489[/C][C]-0.0716[/C][C]0.006[/C][C]120.1024[/C][C]10.0085[/C][C]3.1636[/C][/ROW]
[ROW][C]62[/C][C]0.0516[/C][C]-0.0545[/C][C]0.0045[/C][C]69.7307[/C][C]5.8109[/C][C]2.4106[/C][/ROW]
[ROW][C]63[/C][C]0.0508[/C][C]-0.1195[/C][C]0.01[/C][C]426.3899[/C][C]35.5325[/C][C]5.9609[/C][/ROW]
[ROW][C]64[/C][C]0.0555[/C][C]-0.0323[/C][C]0.0027[/C][C]26.6262[/C][C]2.2189[/C][C]1.4896[/C][/ROW]
[ROW][C]65[/C][C]0.0574[/C][C]-0.0799[/C][C]0.0067[/C][C]166.5708[/C][C]13.8809[/C][C]3.7257[/C][/ROW]
[ROW][C]66[/C][C]0.0574[/C][C]-0.0936[/C][C]0.0078[/C][C]264.9029[/C][C]22.0752[/C][C]4.6984[/C][/ROW]
[ROW][C]67[/C][C]0.0648[/C][C]-0.0023[/C][C]2e-04[/C][C]0.1132[/C][C]0.0094[/C][C]0.0971[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31782&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31782&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
560.0352-0.01510.00134.31390.35950.5996
570.0336-0.05970.00592.65867.72162.7788
580.0372-0.00323e-040.28050.02340.1529
590.0421-0.01710.00147.66250.63850.7991
600.0436-0.05840.004994.78347.89862.8104
610.0489-0.07160.006120.102410.00853.1636
620.0516-0.05450.004569.73075.81092.4106
630.0508-0.11950.01426.389935.53255.9609
640.0555-0.03230.002726.62622.21891.4896
650.0574-0.07990.0067166.570813.88093.7257
660.0574-0.09360.0078264.902922.07524.6984
670.0648-0.00232e-040.11320.00940.0971



Parameters (Session):
par1 = 12 ; par2 = 0.5 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.5 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')