Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 19 Dec 2007 09:08:31 -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/19/t1198079517sgxl1en0k16mua8.htm/, Retrieved Mon, 06 May 2024 12:05:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4679, Retrieved Mon, 06 May 2024 12:05:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact219
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [forecast export] [2007-12-19 16:08:31] [cb51ec34031fa6f7825ad77351c1efd8] [Current]
-    D    [ARIMA Forecasting] [Nick Mulkens] [2008-12-24 14:45:32] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
544.5
619.8
777.6
640.4
633.0
722.0
860.1
495.1
692.8
766.7
648.5
640.0
681.6
752.5
1031.7
685.5
887.6
655.4
944.2
626.6
1221.8
939.6
886.6
811.3
774.7
910.6
911.6
697.7
829.8
824.3
885.6
538.9
686.0
878.7
812.7
640.4
773.9
795.9
836.3
876.1
851.7
692.4
877.3
536.8
705.9
951.0
755.7
695.5
744.8
672.1
666.6
760.8
756.0
604.4
883.9
527.9
756.2
812.9
655.6
707.6




Summary of compuational 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 compuational 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=4679&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]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=4679&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4679&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 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])
36640.4-------
37773.9-------
38795.9-------
39836.3-------
40876.1-------
41851.7-------
42692.4-------
43877.3-------
44536.8-------
45705.9-------
46951-------
47755.7-------
48695.5-------
49744.8785.7595474.71241096.80660.39820.71520.52980.7152
50672.1807.7595483.08361132.43540.20640.64810.52850.751
51666.6848.1595510.40431185.91470.1460.84650.52740.8122
52760.8887.9595537.61291238.30610.23840.89220.52640.8592
53756863.5595501.05861226.06040.28040.71080.52560.8182
54604.4704.2595329.99881078.52010.30050.39320.52480.5183
55883.9889.1595503.49751274.82150.48930.92610.5240.8375
56527.9548.6595151.9236945.39530.45920.04880.52340.2341
57756.2717.7595310.25061125.26840.42670.81940.52270.5426
58812.9962.8595544.85511380.86380.2410.83370.52220.895
59655.6767.5595339.31681195.80210.30420.41780.52160.6292
60707.6707.3595269.11761145.60130.49960.59150.52120.5212

\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 & 640.4 & - & - & - & - & - & - & - \tabularnewline
37 & 773.9 & - & - & - & - & - & - & - \tabularnewline
38 & 795.9 & - & - & - & - & - & - & - \tabularnewline
39 & 836.3 & - & - & - & - & - & - & - \tabularnewline
40 & 876.1 & - & - & - & - & - & - & - \tabularnewline
41 & 851.7 & - & - & - & - & - & - & - \tabularnewline
42 & 692.4 & - & - & - & - & - & - & - \tabularnewline
43 & 877.3 & - & - & - & - & - & - & - \tabularnewline
44 & 536.8 & - & - & - & - & - & - & - \tabularnewline
45 & 705.9 & - & - & - & - & - & - & - \tabularnewline
46 & 951 & - & - & - & - & - & - & - \tabularnewline
47 & 755.7 & - & - & - & - & - & - & - \tabularnewline
48 & 695.5 & - & - & - & - & - & - & - \tabularnewline
49 & 744.8 & 785.7595 & 474.7124 & 1096.8066 & 0.3982 & 0.7152 & 0.5298 & 0.7152 \tabularnewline
50 & 672.1 & 807.7595 & 483.0836 & 1132.4354 & 0.2064 & 0.6481 & 0.5285 & 0.751 \tabularnewline
51 & 666.6 & 848.1595 & 510.4043 & 1185.9147 & 0.146 & 0.8465 & 0.5274 & 0.8122 \tabularnewline
52 & 760.8 & 887.9595 & 537.6129 & 1238.3061 & 0.2384 & 0.8922 & 0.5264 & 0.8592 \tabularnewline
53 & 756 & 863.5595 & 501.0586 & 1226.0604 & 0.2804 & 0.7108 & 0.5256 & 0.8182 \tabularnewline
54 & 604.4 & 704.2595 & 329.9988 & 1078.5201 & 0.3005 & 0.3932 & 0.5248 & 0.5183 \tabularnewline
55 & 883.9 & 889.1595 & 503.4975 & 1274.8215 & 0.4893 & 0.9261 & 0.524 & 0.8375 \tabularnewline
56 & 527.9 & 548.6595 & 151.9236 & 945.3953 & 0.4592 & 0.0488 & 0.5234 & 0.2341 \tabularnewline
57 & 756.2 & 717.7595 & 310.2506 & 1125.2684 & 0.4267 & 0.8194 & 0.5227 & 0.5426 \tabularnewline
58 & 812.9 & 962.8595 & 544.8551 & 1380.8638 & 0.241 & 0.8337 & 0.5222 & 0.895 \tabularnewline
59 & 655.6 & 767.5595 & 339.3168 & 1195.8021 & 0.3042 & 0.4178 & 0.5216 & 0.6292 \tabularnewline
60 & 707.6 & 707.3595 & 269.1176 & 1145.6013 & 0.4996 & 0.5915 & 0.5212 & 0.5212 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4679&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]640.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]773.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]795.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]836.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]876.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]851.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]692.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]877.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]536.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]705.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]951[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]755.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]695.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]744.8[/C][C]785.7595[/C][C]474.7124[/C][C]1096.8066[/C][C]0.3982[/C][C]0.7152[/C][C]0.5298[/C][C]0.7152[/C][/ROW]
[ROW][C]50[/C][C]672.1[/C][C]807.7595[/C][C]483.0836[/C][C]1132.4354[/C][C]0.2064[/C][C]0.6481[/C][C]0.5285[/C][C]0.751[/C][/ROW]
[ROW][C]51[/C][C]666.6[/C][C]848.1595[/C][C]510.4043[/C][C]1185.9147[/C][C]0.146[/C][C]0.8465[/C][C]0.5274[/C][C]0.8122[/C][/ROW]
[ROW][C]52[/C][C]760.8[/C][C]887.9595[/C][C]537.6129[/C][C]1238.3061[/C][C]0.2384[/C][C]0.8922[/C][C]0.5264[/C][C]0.8592[/C][/ROW]
[ROW][C]53[/C][C]756[/C][C]863.5595[/C][C]501.0586[/C][C]1226.0604[/C][C]0.2804[/C][C]0.7108[/C][C]0.5256[/C][C]0.8182[/C][/ROW]
[ROW][C]54[/C][C]604.4[/C][C]704.2595[/C][C]329.9988[/C][C]1078.5201[/C][C]0.3005[/C][C]0.3932[/C][C]0.5248[/C][C]0.5183[/C][/ROW]
[ROW][C]55[/C][C]883.9[/C][C]889.1595[/C][C]503.4975[/C][C]1274.8215[/C][C]0.4893[/C][C]0.9261[/C][C]0.524[/C][C]0.8375[/C][/ROW]
[ROW][C]56[/C][C]527.9[/C][C]548.6595[/C][C]151.9236[/C][C]945.3953[/C][C]0.4592[/C][C]0.0488[/C][C]0.5234[/C][C]0.2341[/C][/ROW]
[ROW][C]57[/C][C]756.2[/C][C]717.7595[/C][C]310.2506[/C][C]1125.2684[/C][C]0.4267[/C][C]0.8194[/C][C]0.5227[/C][C]0.5426[/C][/ROW]
[ROW][C]58[/C][C]812.9[/C][C]962.8595[/C][C]544.8551[/C][C]1380.8638[/C][C]0.241[/C][C]0.8337[/C][C]0.5222[/C][C]0.895[/C][/ROW]
[ROW][C]59[/C][C]655.6[/C][C]767.5595[/C][C]339.3168[/C][C]1195.8021[/C][C]0.3042[/C][C]0.4178[/C][C]0.5216[/C][C]0.6292[/C][/ROW]
[ROW][C]60[/C][C]707.6[/C][C]707.3595[/C][C]269.1176[/C][C]1145.6013[/C][C]0.4996[/C][C]0.5915[/C][C]0.5212[/C][C]0.5212[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4679&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4679&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])
36640.4-------
37773.9-------
38795.9-------
39836.3-------
40876.1-------
41851.7-------
42692.4-------
43877.3-------
44536.8-------
45705.9-------
46951-------
47755.7-------
48695.5-------
49744.8785.7595474.71241096.80660.39820.71520.52980.7152
50672.1807.7595483.08361132.43540.20640.64810.52850.751
51666.6848.1595510.40431185.91470.1460.84650.52740.8122
52760.8887.9595537.61291238.30610.23840.89220.52640.8592
53756863.5595501.05861226.06040.28040.71080.52560.8182
54604.4704.2595329.99881078.52010.30050.39320.52480.5183
55883.9889.1595503.49751274.82150.48930.92610.5240.8375
56527.9548.6595151.9236945.39530.45920.04880.52340.2341
57756.2717.7595310.25061125.26840.42670.81940.52270.5426
58812.9962.8595544.85511380.86380.2410.83370.52220.895
59655.6767.5595339.31681195.80210.30420.41780.52160.6292
60707.6707.3595269.11761145.60130.49960.59150.52120.5212







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.202-0.05210.00431677.6793139.806611.824
500.2051-0.16790.01418403.49561533.624639.1615
510.2032-0.21410.017832963.84622746.987252.4117
520.2013-0.14320.011916169.53431347.461236.7078
530.2142-0.12460.010411569.0426964.086931.0497
540.2711-0.14180.01189971.9165830.99328.8269
550.2213-0.00595e-0427.66222.30521.5183
560.3689-0.03780.0032430.956235.9135.9927
570.28970.05360.00451477.6733123.139411.0968
580.2215-0.15570.01322487.84681873.987243.2896
590.2847-0.14590.012212534.9261044.577232.3199
600.31613e-0400.05780.00480.0694

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.202 & -0.0521 & 0.0043 & 1677.6793 & 139.8066 & 11.824 \tabularnewline
50 & 0.2051 & -0.1679 & 0.014 & 18403.4956 & 1533.6246 & 39.1615 \tabularnewline
51 & 0.2032 & -0.2141 & 0.0178 & 32963.8462 & 2746.9872 & 52.4117 \tabularnewline
52 & 0.2013 & -0.1432 & 0.0119 & 16169.5343 & 1347.4612 & 36.7078 \tabularnewline
53 & 0.2142 & -0.1246 & 0.0104 & 11569.0426 & 964.0869 & 31.0497 \tabularnewline
54 & 0.2711 & -0.1418 & 0.0118 & 9971.9165 & 830.993 & 28.8269 \tabularnewline
55 & 0.2213 & -0.0059 & 5e-04 & 27.6622 & 2.3052 & 1.5183 \tabularnewline
56 & 0.3689 & -0.0378 & 0.0032 & 430.9562 & 35.913 & 5.9927 \tabularnewline
57 & 0.2897 & 0.0536 & 0.0045 & 1477.6733 & 123.1394 & 11.0968 \tabularnewline
58 & 0.2215 & -0.1557 & 0.013 & 22487.8468 & 1873.9872 & 43.2896 \tabularnewline
59 & 0.2847 & -0.1459 & 0.0122 & 12534.926 & 1044.5772 & 32.3199 \tabularnewline
60 & 0.3161 & 3e-04 & 0 & 0.0578 & 0.0048 & 0.0694 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4679&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.202[/C][C]-0.0521[/C][C]0.0043[/C][C]1677.6793[/C][C]139.8066[/C][C]11.824[/C][/ROW]
[ROW][C]50[/C][C]0.2051[/C][C]-0.1679[/C][C]0.014[/C][C]18403.4956[/C][C]1533.6246[/C][C]39.1615[/C][/ROW]
[ROW][C]51[/C][C]0.2032[/C][C]-0.2141[/C][C]0.0178[/C][C]32963.8462[/C][C]2746.9872[/C][C]52.4117[/C][/ROW]
[ROW][C]52[/C][C]0.2013[/C][C]-0.1432[/C][C]0.0119[/C][C]16169.5343[/C][C]1347.4612[/C][C]36.7078[/C][/ROW]
[ROW][C]53[/C][C]0.2142[/C][C]-0.1246[/C][C]0.0104[/C][C]11569.0426[/C][C]964.0869[/C][C]31.0497[/C][/ROW]
[ROW][C]54[/C][C]0.2711[/C][C]-0.1418[/C][C]0.0118[/C][C]9971.9165[/C][C]830.993[/C][C]28.8269[/C][/ROW]
[ROW][C]55[/C][C]0.2213[/C][C]-0.0059[/C][C]5e-04[/C][C]27.6622[/C][C]2.3052[/C][C]1.5183[/C][/ROW]
[ROW][C]56[/C][C]0.3689[/C][C]-0.0378[/C][C]0.0032[/C][C]430.9562[/C][C]35.913[/C][C]5.9927[/C][/ROW]
[ROW][C]57[/C][C]0.2897[/C][C]0.0536[/C][C]0.0045[/C][C]1477.6733[/C][C]123.1394[/C][C]11.0968[/C][/ROW]
[ROW][C]58[/C][C]0.2215[/C][C]-0.1557[/C][C]0.013[/C][C]22487.8468[/C][C]1873.9872[/C][C]43.2896[/C][/ROW]
[ROW][C]59[/C][C]0.2847[/C][C]-0.1459[/C][C]0.0122[/C][C]12534.926[/C][C]1044.5772[/C][C]32.3199[/C][/ROW]
[ROW][C]60[/C][C]0.3161[/C][C]3e-04[/C][C]0[/C][C]0.0578[/C][C]0.0048[/C][C]0.0694[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4679&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4679&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.202-0.05210.00431677.6793139.806611.824
500.2051-0.16790.01418403.49561533.624639.1615
510.2032-0.21410.017832963.84622746.987252.4117
520.2013-0.14320.011916169.53431347.461236.7078
530.2142-0.12460.010411569.0426964.086931.0497
540.2711-0.14180.01189971.9165830.99328.8269
550.2213-0.00595e-0427.66222.30521.5183
560.3689-0.03780.0032430.956235.9135.9927
570.28970.05360.00451477.6733123.139411.0968
580.2215-0.15570.01322487.84681873.987243.2896
590.2847-0.14590.012212534.9261044.577232.3199
600.31613e-0400.05780.00480.0694



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