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 computationMon, 22 Dec 2008 07:49:49 -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/22/t1229957432rwejoml40dwl96i.htm/, Retrieved Mon, 13 May 2024 03:57:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36090, Retrieved Mon, 13 May 2024 03:57:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact144
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [paper forecast] [2007-12-14 20:47:44] [22f18fc6a98517db16300404be421f9a]
-   PD    [ARIMA Forecasting] [Paper - arima for...] [2008-12-22 14:49:49] [73ec5abea95a9c3c8c3a1ac44cab1f72] [Current]
Feedback Forum

Post a new message
Dataseries X:
2490
3266
3475
3127
2955
3870
2852
3142
3029
3180
2560
2733
2452
2553
2777
2520
2318
2873
2311
2395
2099
2268
2316
2181
2175
2627
2578
3090
2634
3225
2938
3174
3350
2588
2061
2691
2061
2918
2223
2651
2379
3146
2883
2768
3258
2839
2470
5072
1463
1600
2203
2013
2169
2640
2411
2528
2292
1988
1774
2279




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36090&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36090&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36090&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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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])
362691-------
372061-------
382918-------
392223-------
402651-------
412379-------
423146-------
432883-------
442768-------
453258-------
462839-------
472470-------
485072-------
4914633080.75942277.02184345.47050.00610.0010.9430.001
5016004236.56542960.56356438.11260.00950.99320.87980.2285
5122033415.93242279.97555534.32520.13090.95350.86510.0627
5220133930.77452502.07016824.90960.0970.8790.80690.2198
5321693578.90492212.98326493.19470.17150.85390.79020.1576
5426403806.54442265.94817330.47870.25820.81880.64330.2408
5524113653.71412120.65737330.54890.25380.70550.65940.2248
5625283753.8672112.17987932.24530.28260.73560.67810.2682
5722923687.1662026.42058112.88840.26830.69610.57540.2698
5819883731.11881997.36648600.04140.24140.71880.64020.2947
5917743701.95081938.62988880.51280.23280.74170.67950.302
6022793721.21731904.35179317.97460.30680.75240.31810.3181

\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 & 2691 & - & - & - & - & - & - & - \tabularnewline
37 & 2061 & - & - & - & - & - & - & - \tabularnewline
38 & 2918 & - & - & - & - & - & - & - \tabularnewline
39 & 2223 & - & - & - & - & - & - & - \tabularnewline
40 & 2651 & - & - & - & - & - & - & - \tabularnewline
41 & 2379 & - & - & - & - & - & - & - \tabularnewline
42 & 3146 & - & - & - & - & - & - & - \tabularnewline
43 & 2883 & - & - & - & - & - & - & - \tabularnewline
44 & 2768 & - & - & - & - & - & - & - \tabularnewline
45 & 3258 & - & - & - & - & - & - & - \tabularnewline
46 & 2839 & - & - & - & - & - & - & - \tabularnewline
47 & 2470 & - & - & - & - & - & - & - \tabularnewline
48 & 5072 & - & - & - & - & - & - & - \tabularnewline
49 & 1463 & 3080.7594 & 2277.0218 & 4345.4705 & 0.0061 & 0.001 & 0.943 & 0.001 \tabularnewline
50 & 1600 & 4236.5654 & 2960.5635 & 6438.1126 & 0.0095 & 0.9932 & 0.8798 & 0.2285 \tabularnewline
51 & 2203 & 3415.9324 & 2279.9755 & 5534.3252 & 0.1309 & 0.9535 & 0.8651 & 0.0627 \tabularnewline
52 & 2013 & 3930.7745 & 2502.0701 & 6824.9096 & 0.097 & 0.879 & 0.8069 & 0.2198 \tabularnewline
53 & 2169 & 3578.9049 & 2212.9832 & 6493.1947 & 0.1715 & 0.8539 & 0.7902 & 0.1576 \tabularnewline
54 & 2640 & 3806.5444 & 2265.9481 & 7330.4787 & 0.2582 & 0.8188 & 0.6433 & 0.2408 \tabularnewline
55 & 2411 & 3653.7141 & 2120.6573 & 7330.5489 & 0.2538 & 0.7055 & 0.6594 & 0.2248 \tabularnewline
56 & 2528 & 3753.867 & 2112.1798 & 7932.2453 & 0.2826 & 0.7356 & 0.6781 & 0.2682 \tabularnewline
57 & 2292 & 3687.166 & 2026.4205 & 8112.8884 & 0.2683 & 0.6961 & 0.5754 & 0.2698 \tabularnewline
58 & 1988 & 3731.1188 & 1997.3664 & 8600.0414 & 0.2414 & 0.7188 & 0.6402 & 0.2947 \tabularnewline
59 & 1774 & 3701.9508 & 1938.6298 & 8880.5128 & 0.2328 & 0.7417 & 0.6795 & 0.302 \tabularnewline
60 & 2279 & 3721.2173 & 1904.3517 & 9317.9746 & 0.3068 & 0.7524 & 0.3181 & 0.3181 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36090&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]2691[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]2061[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]2918[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]2223[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]2651[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]2379[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]3146[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]2883[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]2768[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]3258[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]2839[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2470[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]5072[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1463[/C][C]3080.7594[/C][C]2277.0218[/C][C]4345.4705[/C][C]0.0061[/C][C]0.001[/C][C]0.943[/C][C]0.001[/C][/ROW]
[ROW][C]50[/C][C]1600[/C][C]4236.5654[/C][C]2960.5635[/C][C]6438.1126[/C][C]0.0095[/C][C]0.9932[/C][C]0.8798[/C][C]0.2285[/C][/ROW]
[ROW][C]51[/C][C]2203[/C][C]3415.9324[/C][C]2279.9755[/C][C]5534.3252[/C][C]0.1309[/C][C]0.9535[/C][C]0.8651[/C][C]0.0627[/C][/ROW]
[ROW][C]52[/C][C]2013[/C][C]3930.7745[/C][C]2502.0701[/C][C]6824.9096[/C][C]0.097[/C][C]0.879[/C][C]0.8069[/C][C]0.2198[/C][/ROW]
[ROW][C]53[/C][C]2169[/C][C]3578.9049[/C][C]2212.9832[/C][C]6493.1947[/C][C]0.1715[/C][C]0.8539[/C][C]0.7902[/C][C]0.1576[/C][/ROW]
[ROW][C]54[/C][C]2640[/C][C]3806.5444[/C][C]2265.9481[/C][C]7330.4787[/C][C]0.2582[/C][C]0.8188[/C][C]0.6433[/C][C]0.2408[/C][/ROW]
[ROW][C]55[/C][C]2411[/C][C]3653.7141[/C][C]2120.6573[/C][C]7330.5489[/C][C]0.2538[/C][C]0.7055[/C][C]0.6594[/C][C]0.2248[/C][/ROW]
[ROW][C]56[/C][C]2528[/C][C]3753.867[/C][C]2112.1798[/C][C]7932.2453[/C][C]0.2826[/C][C]0.7356[/C][C]0.6781[/C][C]0.2682[/C][/ROW]
[ROW][C]57[/C][C]2292[/C][C]3687.166[/C][C]2026.4205[/C][C]8112.8884[/C][C]0.2683[/C][C]0.6961[/C][C]0.5754[/C][C]0.2698[/C][/ROW]
[ROW][C]58[/C][C]1988[/C][C]3731.1188[/C][C]1997.3664[/C][C]8600.0414[/C][C]0.2414[/C][C]0.7188[/C][C]0.6402[/C][C]0.2947[/C][/ROW]
[ROW][C]59[/C][C]1774[/C][C]3701.9508[/C][C]1938.6298[/C][C]8880.5128[/C][C]0.2328[/C][C]0.7417[/C][C]0.6795[/C][C]0.302[/C][/ROW]
[ROW][C]60[/C][C]2279[/C][C]3721.2173[/C][C]1904.3517[/C][C]9317.9746[/C][C]0.3068[/C][C]0.7524[/C][C]0.3181[/C][C]0.3181[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36090&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36090&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])
362691-------
372061-------
382918-------
392223-------
402651-------
412379-------
423146-------
432883-------
442768-------
453258-------
462839-------
472470-------
485072-------
4914633080.75942277.02184345.47050.00610.0010.9430.001
5016004236.56542960.56356438.11260.00950.99320.87980.2285
5122033415.93242279.97555534.32520.13090.95350.86510.0627
5220133930.77452502.07016824.90960.0970.8790.80690.2198
5321693578.90492212.98326493.19470.17150.85390.79020.1576
5426403806.54442265.94817330.47870.25820.81880.64330.2408
5524113653.71412120.65737330.54890.25380.70550.65940.2248
5625283753.8672112.17987932.24530.28260.73560.67810.2682
5722923687.1662026.42058112.88840.26830.69610.57540.2698
5819883731.11881997.36648600.04140.24140.71880.64020.2947
5917743701.95081938.62988880.51280.23280.74170.67950.302
6022793721.21731904.35179317.97460.30680.75240.31810.3181







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.2094-0.52510.04382617145.5341218095.4612467.0069
500.2651-0.62230.05196951477.1335579289.7611761.1109
510.3164-0.35510.02961471204.9163122600.4097350.1434
520.3757-0.48790.04073677859.0153306488.2513553.6138
530.4155-0.39390.03281987831.7511165652.6459407.0045
540.4723-0.30650.02551360825.9423113402.1619336.7524
550.5134-0.34010.02831544338.4275128694.869358.7407
560.5679-0.32660.02721502750.023125229.1686353.8773
570.6124-0.37840.03151946488.0467162207.3372402.7497
580.6658-0.46720.03893038463.247253205.2706503.1951
590.7137-0.52080.04343716994.1658309749.5138556.5514
600.7674-0.38760.03232079990.8107173332.5676416.3323

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.2094 & -0.5251 & 0.0438 & 2617145.5341 & 218095.4612 & 467.0069 \tabularnewline
50 & 0.2651 & -0.6223 & 0.0519 & 6951477.1335 & 579289.7611 & 761.1109 \tabularnewline
51 & 0.3164 & -0.3551 & 0.0296 & 1471204.9163 & 122600.4097 & 350.1434 \tabularnewline
52 & 0.3757 & -0.4879 & 0.0407 & 3677859.0153 & 306488.2513 & 553.6138 \tabularnewline
53 & 0.4155 & -0.3939 & 0.0328 & 1987831.7511 & 165652.6459 & 407.0045 \tabularnewline
54 & 0.4723 & -0.3065 & 0.0255 & 1360825.9423 & 113402.1619 & 336.7524 \tabularnewline
55 & 0.5134 & -0.3401 & 0.0283 & 1544338.4275 & 128694.869 & 358.7407 \tabularnewline
56 & 0.5679 & -0.3266 & 0.0272 & 1502750.023 & 125229.1686 & 353.8773 \tabularnewline
57 & 0.6124 & -0.3784 & 0.0315 & 1946488.0467 & 162207.3372 & 402.7497 \tabularnewline
58 & 0.6658 & -0.4672 & 0.0389 & 3038463.247 & 253205.2706 & 503.1951 \tabularnewline
59 & 0.7137 & -0.5208 & 0.0434 & 3716994.1658 & 309749.5138 & 556.5514 \tabularnewline
60 & 0.7674 & -0.3876 & 0.0323 & 2079990.8107 & 173332.5676 & 416.3323 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36090&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.2094[/C][C]-0.5251[/C][C]0.0438[/C][C]2617145.5341[/C][C]218095.4612[/C][C]467.0069[/C][/ROW]
[ROW][C]50[/C][C]0.2651[/C][C]-0.6223[/C][C]0.0519[/C][C]6951477.1335[/C][C]579289.7611[/C][C]761.1109[/C][/ROW]
[ROW][C]51[/C][C]0.3164[/C][C]-0.3551[/C][C]0.0296[/C][C]1471204.9163[/C][C]122600.4097[/C][C]350.1434[/C][/ROW]
[ROW][C]52[/C][C]0.3757[/C][C]-0.4879[/C][C]0.0407[/C][C]3677859.0153[/C][C]306488.2513[/C][C]553.6138[/C][/ROW]
[ROW][C]53[/C][C]0.4155[/C][C]-0.3939[/C][C]0.0328[/C][C]1987831.7511[/C][C]165652.6459[/C][C]407.0045[/C][/ROW]
[ROW][C]54[/C][C]0.4723[/C][C]-0.3065[/C][C]0.0255[/C][C]1360825.9423[/C][C]113402.1619[/C][C]336.7524[/C][/ROW]
[ROW][C]55[/C][C]0.5134[/C][C]-0.3401[/C][C]0.0283[/C][C]1544338.4275[/C][C]128694.869[/C][C]358.7407[/C][/ROW]
[ROW][C]56[/C][C]0.5679[/C][C]-0.3266[/C][C]0.0272[/C][C]1502750.023[/C][C]125229.1686[/C][C]353.8773[/C][/ROW]
[ROW][C]57[/C][C]0.6124[/C][C]-0.3784[/C][C]0.0315[/C][C]1946488.0467[/C][C]162207.3372[/C][C]402.7497[/C][/ROW]
[ROW][C]58[/C][C]0.6658[/C][C]-0.4672[/C][C]0.0389[/C][C]3038463.247[/C][C]253205.2706[/C][C]503.1951[/C][/ROW]
[ROW][C]59[/C][C]0.7137[/C][C]-0.5208[/C][C]0.0434[/C][C]3716994.1658[/C][C]309749.5138[/C][C]556.5514[/C][/ROW]
[ROW][C]60[/C][C]0.7674[/C][C]-0.3876[/C][C]0.0323[/C][C]2079990.8107[/C][C]173332.5676[/C][C]416.3323[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36090&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36090&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.2094-0.52510.04382617145.5341218095.4612467.0069
500.2651-0.62230.05196951477.1335579289.7611761.1109
510.3164-0.35510.02961471204.9163122600.4097350.1434
520.3757-0.48790.04073677859.0153306488.2513553.6138
530.4155-0.39390.03281987831.7511165652.6459407.0045
540.4723-0.30650.02551360825.9423113402.1619336.7524
550.5134-0.34010.02831544338.4275128694.869358.7407
560.5679-0.32660.02721502750.023125229.1686353.8773
570.6124-0.37840.03151946488.0467162207.3372402.7497
580.6658-0.46720.03893038463.247253205.2706503.1951
590.7137-0.52080.04343716994.1658309749.5138556.5514
600.7674-0.38760.03232079990.8107173332.5676416.3323



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