Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 14 Dec 2007 14:16:11 -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/2007/Dec/14/t1197666444b6k0nh4i5c5o9i6.htm/, Retrieved Thu, 02 May 2024 18:42:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3983, Retrieved Thu, 02 May 2024 18:42:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact177
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-14 21:16:11] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
99.5
101.6
103.9
106.6
108.3
102
93.8
91.6
97.7
94.8
98
103.8
97.8
91.2
89.3
87.5
90.4
94.2
102.2
101.3
96
90.8
93.2
90.9
91.1
90.2
94.3
96
99
103.3
113.1
112.8
112.1
107.4
111
110.5
110.8
112.4
111.5
116.2
122.5
121.3
113.9
110.7
120.8
141.1
147.4
148
158.1
165
187
190.3
182.4
168.8
151.2
120.1
112.5
106.2
107.1
108.5
106.5
108.3
125.6
124
127.2
136.9
135.8
124.3
115.4
113.6
114.4
118.4
117
116.5
115.4
113.6
117.4
116.9
116.4
111.1
110.2
118.9
131.8
130.6
138.3
148.4
148.7
144.3
152.5
162.9
167.2
166.5
185.6




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

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3983&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3983&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3983&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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[81])
69115.4-------
70113.6-------
71114.4-------
72118.4-------
73117-------
74116.5-------
75115.4-------
76113.6-------
77117.4-------
78116.9-------
79116.4-------
80111.1-------
81110.2-------
82118.9110.50598.056122.95390.09310.51910.3130.5191
83131.8110.872988.2315133.51430.0350.24360.38010.5232
84130.6111.749479.9461143.55270.12270.10830.3410.538
85138.3111.78171.8106151.75140.09670.17810.3990.5309
86148.4111.816564.5106159.12240.06480.13630.42310.5267
87148.7111.299557.3228165.27620.08720.0890.44080.5159
88144.3111.176951.0554171.29850.14010.11060.46850.5127
89152.5111.855346.007177.70370.11320.16710.43450.5196
90162.9111.479540.2404182.71860.07860.12950.44070.514
91167.2111.460435.1047187.81620.07620.09330.44960.5129
92166.5110.81429.5682192.05980.08960.08690.49720.5059
93185.6111.032425.0867196.97820.04450.10290.50760.5076

\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[81]) \tabularnewline
69 & 115.4 & - & - & - & - & - & - & - \tabularnewline
70 & 113.6 & - & - & - & - & - & - & - \tabularnewline
71 & 114.4 & - & - & - & - & - & - & - \tabularnewline
72 & 118.4 & - & - & - & - & - & - & - \tabularnewline
73 & 117 & - & - & - & - & - & - & - \tabularnewline
74 & 116.5 & - & - & - & - & - & - & - \tabularnewline
75 & 115.4 & - & - & - & - & - & - & - \tabularnewline
76 & 113.6 & - & - & - & - & - & - & - \tabularnewline
77 & 117.4 & - & - & - & - & - & - & - \tabularnewline
78 & 116.9 & - & - & - & - & - & - & - \tabularnewline
79 & 116.4 & - & - & - & - & - & - & - \tabularnewline
80 & 111.1 & - & - & - & - & - & - & - \tabularnewline
81 & 110.2 & - & - & - & - & - & - & - \tabularnewline
82 & 118.9 & 110.505 & 98.056 & 122.9539 & 0.0931 & 0.5191 & 0.313 & 0.5191 \tabularnewline
83 & 131.8 & 110.8729 & 88.2315 & 133.5143 & 0.035 & 0.2436 & 0.3801 & 0.5232 \tabularnewline
84 & 130.6 & 111.7494 & 79.9461 & 143.5527 & 0.1227 & 0.1083 & 0.341 & 0.538 \tabularnewline
85 & 138.3 & 111.781 & 71.8106 & 151.7514 & 0.0967 & 0.1781 & 0.399 & 0.5309 \tabularnewline
86 & 148.4 & 111.8165 & 64.5106 & 159.1224 & 0.0648 & 0.1363 & 0.4231 & 0.5267 \tabularnewline
87 & 148.7 & 111.2995 & 57.3228 & 165.2762 & 0.0872 & 0.089 & 0.4408 & 0.5159 \tabularnewline
88 & 144.3 & 111.1769 & 51.0554 & 171.2985 & 0.1401 & 0.1106 & 0.4685 & 0.5127 \tabularnewline
89 & 152.5 & 111.8553 & 46.007 & 177.7037 & 0.1132 & 0.1671 & 0.4345 & 0.5196 \tabularnewline
90 & 162.9 & 111.4795 & 40.2404 & 182.7186 & 0.0786 & 0.1295 & 0.4407 & 0.514 \tabularnewline
91 & 167.2 & 111.4604 & 35.1047 & 187.8162 & 0.0762 & 0.0933 & 0.4496 & 0.5129 \tabularnewline
92 & 166.5 & 110.814 & 29.5682 & 192.0598 & 0.0896 & 0.0869 & 0.4972 & 0.5059 \tabularnewline
93 & 185.6 & 111.0324 & 25.0867 & 196.9782 & 0.0445 & 0.1029 & 0.5076 & 0.5076 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3983&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[81])[/C][/ROW]
[ROW][C]69[/C][C]115.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]113.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]114.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]118.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]116.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]115.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]113.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]117.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]116.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]116.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]110.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]118.9[/C][C]110.505[/C][C]98.056[/C][C]122.9539[/C][C]0.0931[/C][C]0.5191[/C][C]0.313[/C][C]0.5191[/C][/ROW]
[ROW][C]83[/C][C]131.8[/C][C]110.8729[/C][C]88.2315[/C][C]133.5143[/C][C]0.035[/C][C]0.2436[/C][C]0.3801[/C][C]0.5232[/C][/ROW]
[ROW][C]84[/C][C]130.6[/C][C]111.7494[/C][C]79.9461[/C][C]143.5527[/C][C]0.1227[/C][C]0.1083[/C][C]0.341[/C][C]0.538[/C][/ROW]
[ROW][C]85[/C][C]138.3[/C][C]111.781[/C][C]71.8106[/C][C]151.7514[/C][C]0.0967[/C][C]0.1781[/C][C]0.399[/C][C]0.5309[/C][/ROW]
[ROW][C]86[/C][C]148.4[/C][C]111.8165[/C][C]64.5106[/C][C]159.1224[/C][C]0.0648[/C][C]0.1363[/C][C]0.4231[/C][C]0.5267[/C][/ROW]
[ROW][C]87[/C][C]148.7[/C][C]111.2995[/C][C]57.3228[/C][C]165.2762[/C][C]0.0872[/C][C]0.089[/C][C]0.4408[/C][C]0.5159[/C][/ROW]
[ROW][C]88[/C][C]144.3[/C][C]111.1769[/C][C]51.0554[/C][C]171.2985[/C][C]0.1401[/C][C]0.1106[/C][C]0.4685[/C][C]0.5127[/C][/ROW]
[ROW][C]89[/C][C]152.5[/C][C]111.8553[/C][C]46.007[/C][C]177.7037[/C][C]0.1132[/C][C]0.1671[/C][C]0.4345[/C][C]0.5196[/C][/ROW]
[ROW][C]90[/C][C]162.9[/C][C]111.4795[/C][C]40.2404[/C][C]182.7186[/C][C]0.0786[/C][C]0.1295[/C][C]0.4407[/C][C]0.514[/C][/ROW]
[ROW][C]91[/C][C]167.2[/C][C]111.4604[/C][C]35.1047[/C][C]187.8162[/C][C]0.0762[/C][C]0.0933[/C][C]0.4496[/C][C]0.5129[/C][/ROW]
[ROW][C]92[/C][C]166.5[/C][C]110.814[/C][C]29.5682[/C][C]192.0598[/C][C]0.0896[/C][C]0.0869[/C][C]0.4972[/C][C]0.5059[/C][/ROW]
[ROW][C]93[/C][C]185.6[/C][C]111.0324[/C][C]25.0867[/C][C]196.9782[/C][C]0.0445[/C][C]0.1029[/C][C]0.5076[/C][C]0.5076[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3983&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3983&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[81])
69115.4-------
70113.6-------
71114.4-------
72118.4-------
73117-------
74116.5-------
75115.4-------
76113.6-------
77117.4-------
78116.9-------
79116.4-------
80111.1-------
81110.2-------
82118.9110.50598.056122.95390.09310.51910.3130.5191
83131.8110.872988.2315133.51430.0350.24360.38010.5232
84130.6111.749479.9461143.55270.12270.10830.3410.538
85138.3111.78171.8106151.75140.09670.17810.3990.5309
86148.4111.816564.5106159.12240.06480.13630.42310.5267
87148.7111.299557.3228165.27620.08720.0890.44080.5159
88144.3111.176951.0554171.29850.14010.11060.46850.5127
89152.5111.855346.007177.70370.11320.16710.43450.5196
90162.9111.479540.2404182.71860.07860.12950.44070.514
91167.2111.460435.1047187.81620.07620.09330.44960.5129
92166.5110.81429.5682192.05980.08960.08690.49720.5059
93185.6111.032425.0867196.97820.04450.10290.50760.5076







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
820.05750.0760.006370.47685.87312.4234
830.10420.18870.0157437.944836.49546.0411
840.14520.16870.0141355.34529.61215.4417
850.18240.23720.0198703.256758.60477.6554
860.21590.32720.02731338.3512111.529310.5607
870.24740.3360.0281398.7989116.566610.7966
880.27590.29790.02481097.136691.4289.5618
890.30040.36340.03031651.9879137.665711.7331
900.3260.46130.03842644.0697220.339114.8438
910.34950.50010.04173106.9005258.908416.0906
920.37410.50250.04193100.935258.411316.0752
930.39490.67160.0565560.3199463.3621.5258

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
82 & 0.0575 & 0.076 & 0.0063 & 70.4768 & 5.8731 & 2.4234 \tabularnewline
83 & 0.1042 & 0.1887 & 0.0157 & 437.9448 & 36.4954 & 6.0411 \tabularnewline
84 & 0.1452 & 0.1687 & 0.0141 & 355.345 & 29.6121 & 5.4417 \tabularnewline
85 & 0.1824 & 0.2372 & 0.0198 & 703.2567 & 58.6047 & 7.6554 \tabularnewline
86 & 0.2159 & 0.3272 & 0.0273 & 1338.3512 & 111.5293 & 10.5607 \tabularnewline
87 & 0.2474 & 0.336 & 0.028 & 1398.7989 & 116.5666 & 10.7966 \tabularnewline
88 & 0.2759 & 0.2979 & 0.0248 & 1097.1366 & 91.428 & 9.5618 \tabularnewline
89 & 0.3004 & 0.3634 & 0.0303 & 1651.9879 & 137.6657 & 11.7331 \tabularnewline
90 & 0.326 & 0.4613 & 0.0384 & 2644.0697 & 220.3391 & 14.8438 \tabularnewline
91 & 0.3495 & 0.5001 & 0.0417 & 3106.9005 & 258.9084 & 16.0906 \tabularnewline
92 & 0.3741 & 0.5025 & 0.0419 & 3100.935 & 258.4113 & 16.0752 \tabularnewline
93 & 0.3949 & 0.6716 & 0.056 & 5560.3199 & 463.36 & 21.5258 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3983&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]82[/C][C]0.0575[/C][C]0.076[/C][C]0.0063[/C][C]70.4768[/C][C]5.8731[/C][C]2.4234[/C][/ROW]
[ROW][C]83[/C][C]0.1042[/C][C]0.1887[/C][C]0.0157[/C][C]437.9448[/C][C]36.4954[/C][C]6.0411[/C][/ROW]
[ROW][C]84[/C][C]0.1452[/C][C]0.1687[/C][C]0.0141[/C][C]355.345[/C][C]29.6121[/C][C]5.4417[/C][/ROW]
[ROW][C]85[/C][C]0.1824[/C][C]0.2372[/C][C]0.0198[/C][C]703.2567[/C][C]58.6047[/C][C]7.6554[/C][/ROW]
[ROW][C]86[/C][C]0.2159[/C][C]0.3272[/C][C]0.0273[/C][C]1338.3512[/C][C]111.5293[/C][C]10.5607[/C][/ROW]
[ROW][C]87[/C][C]0.2474[/C][C]0.336[/C][C]0.028[/C][C]1398.7989[/C][C]116.5666[/C][C]10.7966[/C][/ROW]
[ROW][C]88[/C][C]0.2759[/C][C]0.2979[/C][C]0.0248[/C][C]1097.1366[/C][C]91.428[/C][C]9.5618[/C][/ROW]
[ROW][C]89[/C][C]0.3004[/C][C]0.3634[/C][C]0.0303[/C][C]1651.9879[/C][C]137.6657[/C][C]11.7331[/C][/ROW]
[ROW][C]90[/C][C]0.326[/C][C]0.4613[/C][C]0.0384[/C][C]2644.0697[/C][C]220.3391[/C][C]14.8438[/C][/ROW]
[ROW][C]91[/C][C]0.3495[/C][C]0.5001[/C][C]0.0417[/C][C]3106.9005[/C][C]258.9084[/C][C]16.0906[/C][/ROW]
[ROW][C]92[/C][C]0.3741[/C][C]0.5025[/C][C]0.0419[/C][C]3100.935[/C][C]258.4113[/C][C]16.0752[/C][/ROW]
[ROW][C]93[/C][C]0.3949[/C][C]0.6716[/C][C]0.056[/C][C]5560.3199[/C][C]463.36[/C][C]21.5258[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3983&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3983&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
820.05750.0760.006370.47685.87312.4234
830.10420.18870.0157437.944836.49546.0411
840.14520.16870.0141355.34529.61215.4417
850.18240.23720.0198703.256758.60477.6554
860.21590.32720.02731338.3512111.529310.5607
870.24740.3360.0281398.7989116.566610.7966
880.27590.29790.02481097.136691.4289.5618
890.30040.36340.03031651.9879137.665711.7331
900.3260.46130.03842644.0697220.339114.8438
910.34950.50010.04173106.9005258.908416.0906
920.37410.50250.04193100.935258.411316.0752
930.39490.67160.0565560.3199463.3621.5258



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