Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 12 Dec 2007 03:32:24 -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/12/t1197454655d2ohxmhl7ot6gtq.htm/, Retrieved Thu, 02 May 2024 17:23:16 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3193, Retrieved Thu, 02 May 2024 17:23:16 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact226
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Q1 tijdreeks 2 W6] [2007-12-12 10:32:24] [0c269222ff5238ed17e011dfedaec76b] [Current]
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 time4 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 & 4 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=3193&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]4 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=3193&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3193&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 time4 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])
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.8732.3294496.7158967.9430.45870.62030.36470.6203
50672.1773.6377529.66941017.60590.20730.59160.4290.7349
51666.6790.6639520.27051061.05740.18420.80490.37040.7548
52760.8700.6351405.6007995.66950.34470.58940.12190.5136
53756747.3557436.75541057.95610.47820.46620.25510.6283
54604.4698.3397370.26511026.41420.28730.36520.51420.5068
55883.9772.6787429.86011115.49740.26240.8320.27490.6705
56527.9519.3777163.35875.40540.48130.02240.46180.1661
57756.2628.7073260.2918997.12270.24880.70410.34070.3612
58812.9779.3927399.81641158.9690.43130.54770.18780.6676
59655.6692.3521302.47321082.2310.42670.27230.37510.4937
60707.6595.2213195.8305994.6120.29060.38350.31130.3113

\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 & 732.3294 & 496.7158 & 967.943 & 0.4587 & 0.6203 & 0.3647 & 0.6203 \tabularnewline
50 & 672.1 & 773.6377 & 529.6694 & 1017.6059 & 0.2073 & 0.5916 & 0.429 & 0.7349 \tabularnewline
51 & 666.6 & 790.6639 & 520.2705 & 1061.0574 & 0.1842 & 0.8049 & 0.3704 & 0.7548 \tabularnewline
52 & 760.8 & 700.6351 & 405.6007 & 995.6695 & 0.3447 & 0.5894 & 0.1219 & 0.5136 \tabularnewline
53 & 756 & 747.3557 & 436.7554 & 1057.9561 & 0.4782 & 0.4662 & 0.2551 & 0.6283 \tabularnewline
54 & 604.4 & 698.3397 & 370.2651 & 1026.4142 & 0.2873 & 0.3652 & 0.5142 & 0.5068 \tabularnewline
55 & 883.9 & 772.6787 & 429.8601 & 1115.4974 & 0.2624 & 0.832 & 0.2749 & 0.6705 \tabularnewline
56 & 527.9 & 519.3777 & 163.35 & 875.4054 & 0.4813 & 0.0224 & 0.4618 & 0.1661 \tabularnewline
57 & 756.2 & 628.7073 & 260.2918 & 997.1227 & 0.2488 & 0.7041 & 0.3407 & 0.3612 \tabularnewline
58 & 812.9 & 779.3927 & 399.8164 & 1158.969 & 0.4313 & 0.5477 & 0.1878 & 0.6676 \tabularnewline
59 & 655.6 & 692.3521 & 302.4732 & 1082.231 & 0.4267 & 0.2723 & 0.3751 & 0.4937 \tabularnewline
60 & 707.6 & 595.2213 & 195.8305 & 994.612 & 0.2906 & 0.3835 & 0.3113 & 0.3113 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3193&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]732.3294[/C][C]496.7158[/C][C]967.943[/C][C]0.4587[/C][C]0.6203[/C][C]0.3647[/C][C]0.6203[/C][/ROW]
[ROW][C]50[/C][C]672.1[/C][C]773.6377[/C][C]529.6694[/C][C]1017.6059[/C][C]0.2073[/C][C]0.5916[/C][C]0.429[/C][C]0.7349[/C][/ROW]
[ROW][C]51[/C][C]666.6[/C][C]790.6639[/C][C]520.2705[/C][C]1061.0574[/C][C]0.1842[/C][C]0.8049[/C][C]0.3704[/C][C]0.7548[/C][/ROW]
[ROW][C]52[/C][C]760.8[/C][C]700.6351[/C][C]405.6007[/C][C]995.6695[/C][C]0.3447[/C][C]0.5894[/C][C]0.1219[/C][C]0.5136[/C][/ROW]
[ROW][C]53[/C][C]756[/C][C]747.3557[/C][C]436.7554[/C][C]1057.9561[/C][C]0.4782[/C][C]0.4662[/C][C]0.2551[/C][C]0.6283[/C][/ROW]
[ROW][C]54[/C][C]604.4[/C][C]698.3397[/C][C]370.2651[/C][C]1026.4142[/C][C]0.2873[/C][C]0.3652[/C][C]0.5142[/C][C]0.5068[/C][/ROW]
[ROW][C]55[/C][C]883.9[/C][C]772.6787[/C][C]429.8601[/C][C]1115.4974[/C][C]0.2624[/C][C]0.832[/C][C]0.2749[/C][C]0.6705[/C][/ROW]
[ROW][C]56[/C][C]527.9[/C][C]519.3777[/C][C]163.35[/C][C]875.4054[/C][C]0.4813[/C][C]0.0224[/C][C]0.4618[/C][C]0.1661[/C][/ROW]
[ROW][C]57[/C][C]756.2[/C][C]628.7073[/C][C]260.2918[/C][C]997.1227[/C][C]0.2488[/C][C]0.7041[/C][C]0.3407[/C][C]0.3612[/C][/ROW]
[ROW][C]58[/C][C]812.9[/C][C]779.3927[/C][C]399.8164[/C][C]1158.969[/C][C]0.4313[/C][C]0.5477[/C][C]0.1878[/C][C]0.6676[/C][/ROW]
[ROW][C]59[/C][C]655.6[/C][C]692.3521[/C][C]302.4732[/C][C]1082.231[/C][C]0.4267[/C][C]0.2723[/C][C]0.3751[/C][C]0.4937[/C][/ROW]
[ROW][C]60[/C][C]707.6[/C][C]595.2213[/C][C]195.8305[/C][C]994.612[/C][C]0.2906[/C][C]0.3835[/C][C]0.3113[/C][C]0.3113[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3193&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3193&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.8732.3294496.7158967.9430.45870.62030.36470.6203
50672.1773.6377529.66941017.60590.20730.59160.4290.7349
51666.6790.6639520.27051061.05740.18420.80490.37040.7548
52760.8700.6351405.6007995.66950.34470.58940.12190.5136
53756747.3557436.75541057.95610.47820.46620.25510.6283
54604.4698.3397370.26511026.41420.28730.36520.51420.5068
55883.9772.6787429.86011115.49740.26240.8320.27490.6705
56527.9519.3777163.35875.40540.48130.02240.46180.1661
57756.2628.7073260.2918997.12270.24880.70410.34070.3612
58812.9779.3927399.81641158.9690.43130.54770.18780.6676
59655.6692.3521302.47321082.2310.42670.27230.37510.4937
60707.6595.2213195.8305994.6120.29060.38350.31130.3113







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.16410.0170.0014155.514812.95963.5999
500.1609-0.13120.010910309.8987859.158229.3114
510.1745-0.15690.013115391.85841282.654935.8142
520.21480.08590.00723619.8195301.651617.3681
530.2120.01160.00174.72346.22692.4954
540.2397-0.13450.01128824.6611735.388427.118
550.22640.14390.01212370.16861030.847432.1068
560.34970.01640.001472.62916.05242.4602
570.2990.20280.016916254.39751354.533136.804
580.24850.0430.00361122.739893.56169.6727
590.2873-0.05310.00441350.7186112.559910.6094
600.34230.18880.015712628.98251052.415232.4409

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1641 & 0.017 & 0.0014 & 155.5148 & 12.9596 & 3.5999 \tabularnewline
50 & 0.1609 & -0.1312 & 0.0109 & 10309.8987 & 859.1582 & 29.3114 \tabularnewline
51 & 0.1745 & -0.1569 & 0.0131 & 15391.8584 & 1282.6549 & 35.8142 \tabularnewline
52 & 0.2148 & 0.0859 & 0.0072 & 3619.8195 & 301.6516 & 17.3681 \tabularnewline
53 & 0.212 & 0.0116 & 0.001 & 74.7234 & 6.2269 & 2.4954 \tabularnewline
54 & 0.2397 & -0.1345 & 0.0112 & 8824.6611 & 735.3884 & 27.118 \tabularnewline
55 & 0.2264 & 0.1439 & 0.012 & 12370.1686 & 1030.8474 & 32.1068 \tabularnewline
56 & 0.3497 & 0.0164 & 0.0014 & 72.6291 & 6.0524 & 2.4602 \tabularnewline
57 & 0.299 & 0.2028 & 0.0169 & 16254.3975 & 1354.5331 & 36.804 \tabularnewline
58 & 0.2485 & 0.043 & 0.0036 & 1122.7398 & 93.5616 & 9.6727 \tabularnewline
59 & 0.2873 & -0.0531 & 0.0044 & 1350.7186 & 112.5599 & 10.6094 \tabularnewline
60 & 0.3423 & 0.1888 & 0.0157 & 12628.9825 & 1052.4152 & 32.4409 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3193&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.1641[/C][C]0.017[/C][C]0.0014[/C][C]155.5148[/C][C]12.9596[/C][C]3.5999[/C][/ROW]
[ROW][C]50[/C][C]0.1609[/C][C]-0.1312[/C][C]0.0109[/C][C]10309.8987[/C][C]859.1582[/C][C]29.3114[/C][/ROW]
[ROW][C]51[/C][C]0.1745[/C][C]-0.1569[/C][C]0.0131[/C][C]15391.8584[/C][C]1282.6549[/C][C]35.8142[/C][/ROW]
[ROW][C]52[/C][C]0.2148[/C][C]0.0859[/C][C]0.0072[/C][C]3619.8195[/C][C]301.6516[/C][C]17.3681[/C][/ROW]
[ROW][C]53[/C][C]0.212[/C][C]0.0116[/C][C]0.001[/C][C]74.7234[/C][C]6.2269[/C][C]2.4954[/C][/ROW]
[ROW][C]54[/C][C]0.2397[/C][C]-0.1345[/C][C]0.0112[/C][C]8824.6611[/C][C]735.3884[/C][C]27.118[/C][/ROW]
[ROW][C]55[/C][C]0.2264[/C][C]0.1439[/C][C]0.012[/C][C]12370.1686[/C][C]1030.8474[/C][C]32.1068[/C][/ROW]
[ROW][C]56[/C][C]0.3497[/C][C]0.0164[/C][C]0.0014[/C][C]72.6291[/C][C]6.0524[/C][C]2.4602[/C][/ROW]
[ROW][C]57[/C][C]0.299[/C][C]0.2028[/C][C]0.0169[/C][C]16254.3975[/C][C]1354.5331[/C][C]36.804[/C][/ROW]
[ROW][C]58[/C][C]0.2485[/C][C]0.043[/C][C]0.0036[/C][C]1122.7398[/C][C]93.5616[/C][C]9.6727[/C][/ROW]
[ROW][C]59[/C][C]0.2873[/C][C]-0.0531[/C][C]0.0044[/C][C]1350.7186[/C][C]112.5599[/C][C]10.6094[/C][/ROW]
[ROW][C]60[/C][C]0.3423[/C][C]0.1888[/C][C]0.0157[/C][C]12628.9825[/C][C]1052.4152[/C][C]32.4409[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3193&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3193&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.16410.0170.0014155.514812.95963.5999
500.1609-0.13120.010910309.8987859.158229.3114
510.1745-0.15690.013115391.85841282.654935.8142
520.21480.08590.00723619.8195301.651617.3681
530.2120.01160.00174.72346.22692.4954
540.2397-0.13450.01128824.6611735.388427.118
550.22640.14390.01212370.16861030.847432.1068
560.34970.01640.001472.62916.05242.4602
570.2990.20280.016916254.39751354.533136.804
580.24850.0430.00361122.739893.56169.6727
590.2873-0.05310.00441350.7186112.559910.6094
600.34230.18880.015712628.98251052.415232.4409



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