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, 16 Dec 2008 11:47:50 -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/16/t1229453299zopfg7r39zlolg5.htm/, Retrieved Wed, 15 May 2024 15:39:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34101, Retrieved Wed, 15 May 2024 15:39:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact191
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Uitvoer.Nederland] [2008-12-03 15:11:10] [988ab43f527fc78aae41c84649095267]
-   P   [Univariate Data Series] [Export From Belgi...] [2008-12-03 15:52:29] [988ab43f527fc78aae41c84649095267]
- RMP     [ARIMA Forecasting] [ARIMA Forecasting] [2008-12-11 16:07:50] [988ab43f527fc78aae41c84649095267]
-   P       [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 16:40:55] [988ab43f527fc78aae41c84649095267]
-    D          [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-16 18:47:50] [5d823194959040fa9b19b8c8302177e6] [Current]
Feedback Forum

Post a new message
Dataseries X:
156.3
151.5
159.1
166.9
160.5
162.8
178.9
148.5
184.1
197
186.8
139.2
162.7
187.5
235.8
219.4
212.4
220.2
197.5
185.6
232.4
223.8
219.4
191.4
210.4
212.6
274.4
256
227.6
261.7
237
234.9
310.6
274.2
288.1
242.5
271.7
282.2
317.4
280.3
322.6
328.2
280.7
288.8
347.9
360.1
348
275.7
332.6
340.8
390.5
351.2
377.4
413.5
366.9
364.8
388
429.8
423.6
326.4




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=34101&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=34101&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34101&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[48])
36242.5-------
37271.7-------
38282.2-------
39317.4-------
40280.3-------
41322.6-------
42328.2-------
43280.7-------
44288.8-------
45347.9-------
46360.1-------
47348-------
48275.7-------
49332.6295.4249221.6377369.21210.16170.69980.73570.6998
50340.8330.8499257.0627404.63710.39580.48150.90190.9285
51390.5349.5249275.7377423.31210.13820.59160.80330.9751
52351.2293.3499219.5627367.13710.06220.00490.63560.6804
53377.4399.2249325.4377473.01210.2810.8990.97910.9995
54413.5371.6749297.8877445.46210.13330.43960.87590.9946
55366.9298.3749224.5877372.16210.03440.00110.68060.7265
56364.8313.8499240.0627387.63710.0880.07940.74710.8446
57388348.85275.0628422.63720.14920.33590.51010.974
58429.8406.0249332.2377479.81210.26380.6840.88870.9997
59423.6366.725292.9378440.51210.06540.04690.69050.9922
60326.4288.1214.3128361.88720.15452e-040.62910.6291

\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[48]) \tabularnewline
36 & 242.5 & - & - & - & - & - & - & - \tabularnewline
37 & 271.7 & - & - & - & - & - & - & - \tabularnewline
38 & 282.2 & - & - & - & - & - & - & - \tabularnewline
39 & 317.4 & - & - & - & - & - & - & - \tabularnewline
40 & 280.3 & - & - & - & - & - & - & - \tabularnewline
41 & 322.6 & - & - & - & - & - & - & - \tabularnewline
42 & 328.2 & - & - & - & - & - & - & - \tabularnewline
43 & 280.7 & - & - & - & - & - & - & - \tabularnewline
44 & 288.8 & - & - & - & - & - & - & - \tabularnewline
45 & 347.9 & - & - & - & - & - & - & - \tabularnewline
46 & 360.1 & - & - & - & - & - & - & - \tabularnewline
47 & 348 & - & - & - & - & - & - & - \tabularnewline
48 & 275.7 & - & - & - & - & - & - & - \tabularnewline
49 & 332.6 & 295.4249 & 221.6377 & 369.2121 & 0.1617 & 0.6998 & 0.7357 & 0.6998 \tabularnewline
50 & 340.8 & 330.8499 & 257.0627 & 404.6371 & 0.3958 & 0.4815 & 0.9019 & 0.9285 \tabularnewline
51 & 390.5 & 349.5249 & 275.7377 & 423.3121 & 0.1382 & 0.5916 & 0.8033 & 0.9751 \tabularnewline
52 & 351.2 & 293.3499 & 219.5627 & 367.1371 & 0.0622 & 0.0049 & 0.6356 & 0.6804 \tabularnewline
53 & 377.4 & 399.2249 & 325.4377 & 473.0121 & 0.281 & 0.899 & 0.9791 & 0.9995 \tabularnewline
54 & 413.5 & 371.6749 & 297.8877 & 445.4621 & 0.1333 & 0.4396 & 0.8759 & 0.9946 \tabularnewline
55 & 366.9 & 298.3749 & 224.5877 & 372.1621 & 0.0344 & 0.0011 & 0.6806 & 0.7265 \tabularnewline
56 & 364.8 & 313.8499 & 240.0627 & 387.6371 & 0.088 & 0.0794 & 0.7471 & 0.8446 \tabularnewline
57 & 388 & 348.85 & 275.0628 & 422.6372 & 0.1492 & 0.3359 & 0.5101 & 0.974 \tabularnewline
58 & 429.8 & 406.0249 & 332.2377 & 479.8121 & 0.2638 & 0.684 & 0.8887 & 0.9997 \tabularnewline
59 & 423.6 & 366.725 & 292.9378 & 440.5121 & 0.0654 & 0.0469 & 0.6905 & 0.9922 \tabularnewline
60 & 326.4 & 288.1 & 214.3128 & 361.8872 & 0.1545 & 2e-04 & 0.6291 & 0.6291 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34101&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[48])[/C][/ROW]
[ROW][C]36[/C][C]242.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]271.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]282.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]317.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]280.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]322.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]328.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]280.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]288.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]347.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]360.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]275.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]332.6[/C][C]295.4249[/C][C]221.6377[/C][C]369.2121[/C][C]0.1617[/C][C]0.6998[/C][C]0.7357[/C][C]0.6998[/C][/ROW]
[ROW][C]50[/C][C]340.8[/C][C]330.8499[/C][C]257.0627[/C][C]404.6371[/C][C]0.3958[/C][C]0.4815[/C][C]0.9019[/C][C]0.9285[/C][/ROW]
[ROW][C]51[/C][C]390.5[/C][C]349.5249[/C][C]275.7377[/C][C]423.3121[/C][C]0.1382[/C][C]0.5916[/C][C]0.8033[/C][C]0.9751[/C][/ROW]
[ROW][C]52[/C][C]351.2[/C][C]293.3499[/C][C]219.5627[/C][C]367.1371[/C][C]0.0622[/C][C]0.0049[/C][C]0.6356[/C][C]0.6804[/C][/ROW]
[ROW][C]53[/C][C]377.4[/C][C]399.2249[/C][C]325.4377[/C][C]473.0121[/C][C]0.281[/C][C]0.899[/C][C]0.9791[/C][C]0.9995[/C][/ROW]
[ROW][C]54[/C][C]413.5[/C][C]371.6749[/C][C]297.8877[/C][C]445.4621[/C][C]0.1333[/C][C]0.4396[/C][C]0.8759[/C][C]0.9946[/C][/ROW]
[ROW][C]55[/C][C]366.9[/C][C]298.3749[/C][C]224.5877[/C][C]372.1621[/C][C]0.0344[/C][C]0.0011[/C][C]0.6806[/C][C]0.7265[/C][/ROW]
[ROW][C]56[/C][C]364.8[/C][C]313.8499[/C][C]240.0627[/C][C]387.6371[/C][C]0.088[/C][C]0.0794[/C][C]0.7471[/C][C]0.8446[/C][/ROW]
[ROW][C]57[/C][C]388[/C][C]348.85[/C][C]275.0628[/C][C]422.6372[/C][C]0.1492[/C][C]0.3359[/C][C]0.5101[/C][C]0.974[/C][/ROW]
[ROW][C]58[/C][C]429.8[/C][C]406.0249[/C][C]332.2377[/C][C]479.8121[/C][C]0.2638[/C][C]0.684[/C][C]0.8887[/C][C]0.9997[/C][/ROW]
[ROW][C]59[/C][C]423.6[/C][C]366.725[/C][C]292.9378[/C][C]440.5121[/C][C]0.0654[/C][C]0.0469[/C][C]0.6905[/C][C]0.9922[/C][/ROW]
[ROW][C]60[/C][C]326.4[/C][C]288.1[/C][C]214.3128[/C][C]361.8872[/C][C]0.1545[/C][C]2e-04[/C][C]0.6291[/C][C]0.6291[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34101&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34101&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[48])
36242.5-------
37271.7-------
38282.2-------
39317.4-------
40280.3-------
41322.6-------
42328.2-------
43280.7-------
44288.8-------
45347.9-------
46360.1-------
47348-------
48275.7-------
49332.6295.4249221.6377369.21210.16170.69980.73570.6998
50340.8330.8499257.0627404.63710.39580.48150.90190.9285
51390.5349.5249275.7377423.31210.13820.59160.80330.9751
52351.2293.3499219.5627367.13710.06220.00490.63560.6804
53377.4399.2249325.4377473.01210.2810.8990.97910.9995
54413.5371.6749297.8877445.46210.13330.43960.87590.9946
55366.9298.3749224.5877372.16210.03440.00110.68060.7265
56364.8313.8499240.0627387.63710.0880.07940.74710.8446
57388348.85275.0628422.63720.14920.33590.51010.974
58429.8406.0249332.2377479.81210.26380.6840.88870.9997
59423.6366.725292.9378440.51210.06540.04690.69050.9922
60326.4288.1214.3128361.88720.15452e-040.62910.6291







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.12740.12580.01051381.9844115.165410.7315
500.11380.03010.002599.00438.25042.8723
510.10770.11720.00981678.957139.913111.8285
520.12830.19720.01643346.6287278.885716.6999
530.0943-0.05470.0046476.324839.69376.3003
540.10130.11250.00941749.3379145.778212.0739
550.12620.22970.01914695.6831391.306919.7815
560.120.16230.01352595.9082216.325714.708
570.10790.11220.00941532.7247127.727111.3016
580.09270.05860.0049565.254947.10466.8633
590.10270.15510.01293234.7713269.564316.4184
600.13070.13290.01111466.8931122.241111.0563

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1274 & 0.1258 & 0.0105 & 1381.9844 & 115.1654 & 10.7315 \tabularnewline
50 & 0.1138 & 0.0301 & 0.0025 & 99.0043 & 8.2504 & 2.8723 \tabularnewline
51 & 0.1077 & 0.1172 & 0.0098 & 1678.957 & 139.9131 & 11.8285 \tabularnewline
52 & 0.1283 & 0.1972 & 0.0164 & 3346.6287 & 278.8857 & 16.6999 \tabularnewline
53 & 0.0943 & -0.0547 & 0.0046 & 476.3248 & 39.6937 & 6.3003 \tabularnewline
54 & 0.1013 & 0.1125 & 0.0094 & 1749.3379 & 145.7782 & 12.0739 \tabularnewline
55 & 0.1262 & 0.2297 & 0.0191 & 4695.6831 & 391.3069 & 19.7815 \tabularnewline
56 & 0.12 & 0.1623 & 0.0135 & 2595.9082 & 216.3257 & 14.708 \tabularnewline
57 & 0.1079 & 0.1122 & 0.0094 & 1532.7247 & 127.7271 & 11.3016 \tabularnewline
58 & 0.0927 & 0.0586 & 0.0049 & 565.2549 & 47.1046 & 6.8633 \tabularnewline
59 & 0.1027 & 0.1551 & 0.0129 & 3234.7713 & 269.5643 & 16.4184 \tabularnewline
60 & 0.1307 & 0.1329 & 0.0111 & 1466.8931 & 122.2411 & 11.0563 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34101&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]49[/C][C]0.1274[/C][C]0.1258[/C][C]0.0105[/C][C]1381.9844[/C][C]115.1654[/C][C]10.7315[/C][/ROW]
[ROW][C]50[/C][C]0.1138[/C][C]0.0301[/C][C]0.0025[/C][C]99.0043[/C][C]8.2504[/C][C]2.8723[/C][/ROW]
[ROW][C]51[/C][C]0.1077[/C][C]0.1172[/C][C]0.0098[/C][C]1678.957[/C][C]139.9131[/C][C]11.8285[/C][/ROW]
[ROW][C]52[/C][C]0.1283[/C][C]0.1972[/C][C]0.0164[/C][C]3346.6287[/C][C]278.8857[/C][C]16.6999[/C][/ROW]
[ROW][C]53[/C][C]0.0943[/C][C]-0.0547[/C][C]0.0046[/C][C]476.3248[/C][C]39.6937[/C][C]6.3003[/C][/ROW]
[ROW][C]54[/C][C]0.1013[/C][C]0.1125[/C][C]0.0094[/C][C]1749.3379[/C][C]145.7782[/C][C]12.0739[/C][/ROW]
[ROW][C]55[/C][C]0.1262[/C][C]0.2297[/C][C]0.0191[/C][C]4695.6831[/C][C]391.3069[/C][C]19.7815[/C][/ROW]
[ROW][C]56[/C][C]0.12[/C][C]0.1623[/C][C]0.0135[/C][C]2595.9082[/C][C]216.3257[/C][C]14.708[/C][/ROW]
[ROW][C]57[/C][C]0.1079[/C][C]0.1122[/C][C]0.0094[/C][C]1532.7247[/C][C]127.7271[/C][C]11.3016[/C][/ROW]
[ROW][C]58[/C][C]0.0927[/C][C]0.0586[/C][C]0.0049[/C][C]565.2549[/C][C]47.1046[/C][C]6.8633[/C][/ROW]
[ROW][C]59[/C][C]0.1027[/C][C]0.1551[/C][C]0.0129[/C][C]3234.7713[/C][C]269.5643[/C][C]16.4184[/C][/ROW]
[ROW][C]60[/C][C]0.1307[/C][C]0.1329[/C][C]0.0111[/C][C]1466.8931[/C][C]122.2411[/C][C]11.0563[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34101&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34101&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
490.12740.12580.01051381.9844115.165410.7315
500.11380.03010.002599.00438.25042.8723
510.10770.11720.00981678.957139.913111.8285
520.12830.19720.01643346.6287278.885716.6999
530.0943-0.05470.0046476.324839.69376.3003
540.10130.11250.00941749.3379145.778212.0739
550.12620.22970.01914695.6831391.306919.7815
560.120.16230.01352595.9082216.325714.708
570.10790.11220.00941532.7247127.727111.3016
580.09270.05860.0049565.254947.10466.8633
590.10270.15510.01293234.7713269.564316.4184
600.13070.13290.01111466.8931122.241111.0563



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