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 computationSun, 14 Dec 2008 15:19:56 -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/14/t1229293291gd8w3vesi33s77r.htm/, Retrieved Thu, 16 May 2024 00:07:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33577, Retrieved Thu, 16 May 2024 00:07:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact180
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Central tendency:...] [2008-12-12 12:54:43] [73d6180dc45497329efd1b6934a84aba]
- RMPD  [ARIMA Backward Selection] [Arima Olieprijs] [2008-12-14 20:17:24] [73d6180dc45497329efd1b6934a84aba]
- RMPD      [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-14 22:19:56] [e81ac192d6ae6d77191d83851a692999] [Current]
Feedback Forum

Post a new message
Dataseries X:
10070
10137
9984
9732
9103
9155
9308
9394
9948
10177
10002
9728
10002
10063
10018
9960
10236
10893
10756
10940
10997
10827
10166
10186
10457
10368
10244
10511
10812
10738
10171
9721
9897
9828
9924
10371
10846
10413
10709
10662
10570
10297
10635
10872
10296
10383
10431
10574
10653
10805
10872
10625
10407
10463
10556
10646
10702
11353
11346
11451
11964
12574
13031
13812
14544
14931
14886
16005
17064
15168
16050
15839
15137
14954
15648
15305
15579
16348
15928
16171
15937
15713
15594
15683
16438
17032
17696
17745
19394
20148
20108
18584
18441
18391
19178
18079
18483
19644
19195




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33577&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33577&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33577&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 time2 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[87])
7515648-------
7615305-------
7715579-------
7816348-------
7915928-------
8016171-------
8115937-------
8215713-------
8315594-------
8415683-------
8516438-------
8617032-------
8717696-------
881774517894.596217067.302818721.88950.36150.68110.681
891939417999.748316809.040319190.45620.01090.662510.6915
902014818141.649116671.30219611.99620.00370.04750.99160.7238
912010818334.130416477.978520190.28230.03050.02770.99450.7498
921858418216.590416018.058720415.12210.37160.04590.96590.6787
931844118182.555315684.013120681.09750.41970.37640.96090.6487
941839118577.345915771.670821383.02110.44820.53790.97730.731
951917818486.3715392.88321579.85710.33060.52410.96660.6917
961807918551.069415191.759621910.37920.39150.35730.95290.6911
971848318588.513414971.910422205.11640.47720.60880.87810.6857
981964418550.108214688.914222411.30220.28940.51360.77950.6677
991919518357.371614264.877322449.8660.34420.26890.62430.6243

\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[87]) \tabularnewline
75 & 15648 & - & - & - & - & - & - & - \tabularnewline
76 & 15305 & - & - & - & - & - & - & - \tabularnewline
77 & 15579 & - & - & - & - & - & - & - \tabularnewline
78 & 16348 & - & - & - & - & - & - & - \tabularnewline
79 & 15928 & - & - & - & - & - & - & - \tabularnewline
80 & 16171 & - & - & - & - & - & - & - \tabularnewline
81 & 15937 & - & - & - & - & - & - & - \tabularnewline
82 & 15713 & - & - & - & - & - & - & - \tabularnewline
83 & 15594 & - & - & - & - & - & - & - \tabularnewline
84 & 15683 & - & - & - & - & - & - & - \tabularnewline
85 & 16438 & - & - & - & - & - & - & - \tabularnewline
86 & 17032 & - & - & - & - & - & - & - \tabularnewline
87 & 17696 & - & - & - & - & - & - & - \tabularnewline
88 & 17745 & 17894.5962 & 17067.3028 & 18721.8895 & 0.3615 & 0.681 & 1 & 0.681 \tabularnewline
89 & 19394 & 17999.7483 & 16809.0403 & 19190.4562 & 0.0109 & 0.6625 & 1 & 0.6915 \tabularnewline
90 & 20148 & 18141.6491 & 16671.302 & 19611.9962 & 0.0037 & 0.0475 & 0.9916 & 0.7238 \tabularnewline
91 & 20108 & 18334.1304 & 16477.9785 & 20190.2823 & 0.0305 & 0.0277 & 0.9945 & 0.7498 \tabularnewline
92 & 18584 & 18216.5904 & 16018.0587 & 20415.1221 & 0.3716 & 0.0459 & 0.9659 & 0.6787 \tabularnewline
93 & 18441 & 18182.5553 & 15684.0131 & 20681.0975 & 0.4197 & 0.3764 & 0.9609 & 0.6487 \tabularnewline
94 & 18391 & 18577.3459 & 15771.6708 & 21383.0211 & 0.4482 & 0.5379 & 0.9773 & 0.731 \tabularnewline
95 & 19178 & 18486.37 & 15392.883 & 21579.8571 & 0.3306 & 0.5241 & 0.9666 & 0.6917 \tabularnewline
96 & 18079 & 18551.0694 & 15191.7596 & 21910.3792 & 0.3915 & 0.3573 & 0.9529 & 0.6911 \tabularnewline
97 & 18483 & 18588.5134 & 14971.9104 & 22205.1164 & 0.4772 & 0.6088 & 0.8781 & 0.6857 \tabularnewline
98 & 19644 & 18550.1082 & 14688.9142 & 22411.3022 & 0.2894 & 0.5136 & 0.7795 & 0.6677 \tabularnewline
99 & 19195 & 18357.3716 & 14264.8773 & 22449.866 & 0.3442 & 0.2689 & 0.6243 & 0.6243 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33577&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[87])[/C][/ROW]
[ROW][C]75[/C][C]15648[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]15305[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]15579[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]16348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]15928[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]16171[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]15937[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]15713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]15594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]15683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]16438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]17032[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]17696[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]17745[/C][C]17894.5962[/C][C]17067.3028[/C][C]18721.8895[/C][C]0.3615[/C][C]0.681[/C][C]1[/C][C]0.681[/C][/ROW]
[ROW][C]89[/C][C]19394[/C][C]17999.7483[/C][C]16809.0403[/C][C]19190.4562[/C][C]0.0109[/C][C]0.6625[/C][C]1[/C][C]0.6915[/C][/ROW]
[ROW][C]90[/C][C]20148[/C][C]18141.6491[/C][C]16671.302[/C][C]19611.9962[/C][C]0.0037[/C][C]0.0475[/C][C]0.9916[/C][C]0.7238[/C][/ROW]
[ROW][C]91[/C][C]20108[/C][C]18334.1304[/C][C]16477.9785[/C][C]20190.2823[/C][C]0.0305[/C][C]0.0277[/C][C]0.9945[/C][C]0.7498[/C][/ROW]
[ROW][C]92[/C][C]18584[/C][C]18216.5904[/C][C]16018.0587[/C][C]20415.1221[/C][C]0.3716[/C][C]0.0459[/C][C]0.9659[/C][C]0.6787[/C][/ROW]
[ROW][C]93[/C][C]18441[/C][C]18182.5553[/C][C]15684.0131[/C][C]20681.0975[/C][C]0.4197[/C][C]0.3764[/C][C]0.9609[/C][C]0.6487[/C][/ROW]
[ROW][C]94[/C][C]18391[/C][C]18577.3459[/C][C]15771.6708[/C][C]21383.0211[/C][C]0.4482[/C][C]0.5379[/C][C]0.9773[/C][C]0.731[/C][/ROW]
[ROW][C]95[/C][C]19178[/C][C]18486.37[/C][C]15392.883[/C][C]21579.8571[/C][C]0.3306[/C][C]0.5241[/C][C]0.9666[/C][C]0.6917[/C][/ROW]
[ROW][C]96[/C][C]18079[/C][C]18551.0694[/C][C]15191.7596[/C][C]21910.3792[/C][C]0.3915[/C][C]0.3573[/C][C]0.9529[/C][C]0.6911[/C][/ROW]
[ROW][C]97[/C][C]18483[/C][C]18588.5134[/C][C]14971.9104[/C][C]22205.1164[/C][C]0.4772[/C][C]0.6088[/C][C]0.8781[/C][C]0.6857[/C][/ROW]
[ROW][C]98[/C][C]19644[/C][C]18550.1082[/C][C]14688.9142[/C][C]22411.3022[/C][C]0.2894[/C][C]0.5136[/C][C]0.7795[/C][C]0.6677[/C][/ROW]
[ROW][C]99[/C][C]19195[/C][C]18357.3716[/C][C]14264.8773[/C][C]22449.866[/C][C]0.3442[/C][C]0.2689[/C][C]0.6243[/C][C]0.6243[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33577&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33577&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[87])
7515648-------
7615305-------
7715579-------
7816348-------
7915928-------
8016171-------
8115937-------
8215713-------
8315594-------
8415683-------
8516438-------
8617032-------
8717696-------
881774517894.596217067.302818721.88950.36150.68110.681
891939417999.748316809.040319190.45620.01090.662510.6915
902014818141.649116671.30219611.99620.00370.04750.99160.7238
912010818334.130416477.978520190.28230.03050.02770.99450.7498
921858418216.590416018.058720415.12210.37160.04590.96590.6787
931844118182.555315684.013120681.09750.41970.37640.96090.6487
941839118577.345915771.670821383.02110.44820.53790.97730.731
951917818486.3715392.88321579.85710.33060.52410.96660.6917
961807918551.069415191.759621910.37920.39150.35730.95290.6911
971848318588.513414971.910422205.11640.47720.60880.87810.6857
981964418550.108214688.914222411.30220.28940.51360.77950.6677
991919518357.371614264.877322449.8660.34420.26890.62430.6243







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.0236-0.00847e-0422379.01781864.918243.1847
890.03380.07750.00651943937.8589161994.8216402.4858
900.04140.11060.00924025444.0261335453.6688579.1836
910.05170.09680.00813146613.5046262217.7921512.0721
920.06160.02020.0017134989.836411249.153106.062
930.07010.01420.001266793.65625566.13874.6066
940.0771-0.018e-0434724.81142893.734353.7934
950.08540.03740.0031478351.995739862.6663199.6564
960.0924-0.02540.0021222849.496118570.7913136.2747
970.0993-0.00575e-0411133.0721927.75630.4591
980.10620.0590.00491196599.364799716.6137315.7794
990.11370.04560.0038701621.267158468.4389241.8025

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0236 & -0.0084 & 7e-04 & 22379.0178 & 1864.9182 & 43.1847 \tabularnewline
89 & 0.0338 & 0.0775 & 0.0065 & 1943937.8589 & 161994.8216 & 402.4858 \tabularnewline
90 & 0.0414 & 0.1106 & 0.0092 & 4025444.0261 & 335453.6688 & 579.1836 \tabularnewline
91 & 0.0517 & 0.0968 & 0.0081 & 3146613.5046 & 262217.7921 & 512.0721 \tabularnewline
92 & 0.0616 & 0.0202 & 0.0017 & 134989.8364 & 11249.153 & 106.062 \tabularnewline
93 & 0.0701 & 0.0142 & 0.0012 & 66793.6562 & 5566.138 & 74.6066 \tabularnewline
94 & 0.0771 & -0.01 & 8e-04 & 34724.8114 & 2893.7343 & 53.7934 \tabularnewline
95 & 0.0854 & 0.0374 & 0.0031 & 478351.9957 & 39862.6663 & 199.6564 \tabularnewline
96 & 0.0924 & -0.0254 & 0.0021 & 222849.4961 & 18570.7913 & 136.2747 \tabularnewline
97 & 0.0993 & -0.0057 & 5e-04 & 11133.0721 & 927.756 & 30.4591 \tabularnewline
98 & 0.1062 & 0.059 & 0.0049 & 1196599.3647 & 99716.6137 & 315.7794 \tabularnewline
99 & 0.1137 & 0.0456 & 0.0038 & 701621.2671 & 58468.4389 & 241.8025 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33577&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]88[/C][C]0.0236[/C][C]-0.0084[/C][C]7e-04[/C][C]22379.0178[/C][C]1864.9182[/C][C]43.1847[/C][/ROW]
[ROW][C]89[/C][C]0.0338[/C][C]0.0775[/C][C]0.0065[/C][C]1943937.8589[/C][C]161994.8216[/C][C]402.4858[/C][/ROW]
[ROW][C]90[/C][C]0.0414[/C][C]0.1106[/C][C]0.0092[/C][C]4025444.0261[/C][C]335453.6688[/C][C]579.1836[/C][/ROW]
[ROW][C]91[/C][C]0.0517[/C][C]0.0968[/C][C]0.0081[/C][C]3146613.5046[/C][C]262217.7921[/C][C]512.0721[/C][/ROW]
[ROW][C]92[/C][C]0.0616[/C][C]0.0202[/C][C]0.0017[/C][C]134989.8364[/C][C]11249.153[/C][C]106.062[/C][/ROW]
[ROW][C]93[/C][C]0.0701[/C][C]0.0142[/C][C]0.0012[/C][C]66793.6562[/C][C]5566.138[/C][C]74.6066[/C][/ROW]
[ROW][C]94[/C][C]0.0771[/C][C]-0.01[/C][C]8e-04[/C][C]34724.8114[/C][C]2893.7343[/C][C]53.7934[/C][/ROW]
[ROW][C]95[/C][C]0.0854[/C][C]0.0374[/C][C]0.0031[/C][C]478351.9957[/C][C]39862.6663[/C][C]199.6564[/C][/ROW]
[ROW][C]96[/C][C]0.0924[/C][C]-0.0254[/C][C]0.0021[/C][C]222849.4961[/C][C]18570.7913[/C][C]136.2747[/C][/ROW]
[ROW][C]97[/C][C]0.0993[/C][C]-0.0057[/C][C]5e-04[/C][C]11133.0721[/C][C]927.756[/C][C]30.4591[/C][/ROW]
[ROW][C]98[/C][C]0.1062[/C][C]0.059[/C][C]0.0049[/C][C]1196599.3647[/C][C]99716.6137[/C][C]315.7794[/C][/ROW]
[ROW][C]99[/C][C]0.1137[/C][C]0.0456[/C][C]0.0038[/C][C]701621.2671[/C][C]58468.4389[/C][C]241.8025[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33577&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33577&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
880.0236-0.00847e-0422379.01781864.918243.1847
890.03380.07750.00651943937.8589161994.8216402.4858
900.04140.11060.00924025444.0261335453.6688579.1836
910.05170.09680.00813146613.5046262217.7921512.0721
920.06160.02020.0017134989.836411249.153106.062
930.07010.01420.001266793.65625566.13874.6066
940.0771-0.018e-0434724.81142893.734353.7934
950.08540.03740.0031478351.995739862.6663199.6564
960.0924-0.02540.0021222849.496118570.7913136.2747
970.0993-0.00575e-0411133.0721927.75630.4591
980.10620.0590.00491196599.364799716.6137315.7794
990.11370.04560.0038701621.267158468.4389241.8025



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