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 computationFri, 14 Dec 2012 14:36:28 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/14/t1355513854tdnwiw1ypwxd7ue.htm/, Retrieved Fri, 19 Apr 2024 03:08:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=199729, Retrieved Fri, 19 Apr 2024 03:08:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact107
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Paper - exogene v...] [2010-12-01 16:02:49] [6f0e7a2d1a07390e3505a2db8288f975]
- RMP   [(Partial) Autocorrelation Function] [ACF 1] [2012-12-01 12:28:25] [aa4758794357e809405bf1fb1497cdc4]
- RMP     [ARIMA Forecasting] [ARIMA Forecast] [2012-12-01 13:15:00] [aa4758794357e809405bf1fb1497cdc4]
- R P         [ARIMA Forecasting] [Geboortes Forecast] [2012-12-14 19:36:28] [4289cf790da1cc09a0cb8798de13fde3] [Current]
Feedback Forum

Post a new message
Dataseries X:
9769
9321
9939
9336
10195
9464
10010
10213
9563
9890
9305
9391
9928
8686
9843
9627
10074
9503
10119
10000
9313
9866
9172
9241
9659
8904
9755
9080
9435
8971
10063
9793
9454
9759
8820
9403
9676
8642
9402
9610
9294
9448
10319
9548
9801
9596
8923
9746
9829
9125
9782
9441
9162
9915
10444
10209
9985
9842
9429
10132
9849
9172
10313
9819
9955
10048
10082
10541
10208
10233
9439
9963
10158
9225
10474
9757
10490
10281
10444
10640
10695
10786
9832
9747
10411
9511
10402
9701
10540
10112
10915
11183
10384
10834
9886
10216




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'George Udny Yule' @ yule.wessa.net

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

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







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[84])
729963-------
7310158-------
749225-------
7510474-------
769757-------
7710490-------
7810281-------
7910444-------
8010640-------
8110695-------
8210786-------
839832-------
849747-------
851041110412.53679905.431810919.64160.49760.99490.83740.9949
8695119599.83649088.013110111.65970.36699e-040.92440.2865
871040210530.177110017.44911042.90530.312110.5850.9986
88970110053.27279519.180810587.36460.0980.10030.86150.8695
891054010548.947110011.3311086.56410.4870.9990.58510.9983
901011210357.33499808.721410905.94840.19040.2570.60750.9854
911091510723.620510167.954611279.28650.24980.98450.8380.9997
921118310778.074510214.187211341.96180.07960.31710.68440.9998
931038410661.614510090.038911233.190.17060.03690.45440.9991
941083410781.311810201.975211360.64840.42930.91060.49370.9998
9598869958.67829371.898710545.45780.40410.00170.66390.7602
961021610075.50269481.284510669.72070.32150.7340.86070.8607

\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[84]) \tabularnewline
72 & 9963 & - & - & - & - & - & - & - \tabularnewline
73 & 10158 & - & - & - & - & - & - & - \tabularnewline
74 & 9225 & - & - & - & - & - & - & - \tabularnewline
75 & 10474 & - & - & - & - & - & - & - \tabularnewline
76 & 9757 & - & - & - & - & - & - & - \tabularnewline
77 & 10490 & - & - & - & - & - & - & - \tabularnewline
78 & 10281 & - & - & - & - & - & - & - \tabularnewline
79 & 10444 & - & - & - & - & - & - & - \tabularnewline
80 & 10640 & - & - & - & - & - & - & - \tabularnewline
81 & 10695 & - & - & - & - & - & - & - \tabularnewline
82 & 10786 & - & - & - & - & - & - & - \tabularnewline
83 & 9832 & - & - & - & - & - & - & - \tabularnewline
84 & 9747 & - & - & - & - & - & - & - \tabularnewline
85 & 10411 & 10412.5367 & 9905.4318 & 10919.6416 & 0.4976 & 0.9949 & 0.8374 & 0.9949 \tabularnewline
86 & 9511 & 9599.8364 & 9088.0131 & 10111.6597 & 0.3669 & 9e-04 & 0.9244 & 0.2865 \tabularnewline
87 & 10402 & 10530.1771 & 10017.449 & 11042.9053 & 0.3121 & 1 & 0.585 & 0.9986 \tabularnewline
88 & 9701 & 10053.2727 & 9519.1808 & 10587.3646 & 0.098 & 0.1003 & 0.8615 & 0.8695 \tabularnewline
89 & 10540 & 10548.9471 & 10011.33 & 11086.5641 & 0.487 & 0.999 & 0.5851 & 0.9983 \tabularnewline
90 & 10112 & 10357.3349 & 9808.7214 & 10905.9484 & 0.1904 & 0.257 & 0.6075 & 0.9854 \tabularnewline
91 & 10915 & 10723.6205 & 10167.9546 & 11279.2865 & 0.2498 & 0.9845 & 0.838 & 0.9997 \tabularnewline
92 & 11183 & 10778.0745 & 10214.1872 & 11341.9618 & 0.0796 & 0.3171 & 0.6844 & 0.9998 \tabularnewline
93 & 10384 & 10661.6145 & 10090.0389 & 11233.19 & 0.1706 & 0.0369 & 0.4544 & 0.9991 \tabularnewline
94 & 10834 & 10781.3118 & 10201.9752 & 11360.6484 & 0.4293 & 0.9106 & 0.4937 & 0.9998 \tabularnewline
95 & 9886 & 9958.6782 & 9371.8987 & 10545.4578 & 0.4041 & 0.0017 & 0.6639 & 0.7602 \tabularnewline
96 & 10216 & 10075.5026 & 9481.2845 & 10669.7207 & 0.3215 & 0.734 & 0.8607 & 0.8607 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199729&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[84])[/C][/ROW]
[ROW][C]72[/C][C]9963[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]9225[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]10474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]9757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]10490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]10444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]10640[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]10695[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]10786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]9832[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]9747[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]10411[/C][C]10412.5367[/C][C]9905.4318[/C][C]10919.6416[/C][C]0.4976[/C][C]0.9949[/C][C]0.8374[/C][C]0.9949[/C][/ROW]
[ROW][C]86[/C][C]9511[/C][C]9599.8364[/C][C]9088.0131[/C][C]10111.6597[/C][C]0.3669[/C][C]9e-04[/C][C]0.9244[/C][C]0.2865[/C][/ROW]
[ROW][C]87[/C][C]10402[/C][C]10530.1771[/C][C]10017.449[/C][C]11042.9053[/C][C]0.3121[/C][C]1[/C][C]0.585[/C][C]0.9986[/C][/ROW]
[ROW][C]88[/C][C]9701[/C][C]10053.2727[/C][C]9519.1808[/C][C]10587.3646[/C][C]0.098[/C][C]0.1003[/C][C]0.8615[/C][C]0.8695[/C][/ROW]
[ROW][C]89[/C][C]10540[/C][C]10548.9471[/C][C]10011.33[/C][C]11086.5641[/C][C]0.487[/C][C]0.999[/C][C]0.5851[/C][C]0.9983[/C][/ROW]
[ROW][C]90[/C][C]10112[/C][C]10357.3349[/C][C]9808.7214[/C][C]10905.9484[/C][C]0.1904[/C][C]0.257[/C][C]0.6075[/C][C]0.9854[/C][/ROW]
[ROW][C]91[/C][C]10915[/C][C]10723.6205[/C][C]10167.9546[/C][C]11279.2865[/C][C]0.2498[/C][C]0.9845[/C][C]0.838[/C][C]0.9997[/C][/ROW]
[ROW][C]92[/C][C]11183[/C][C]10778.0745[/C][C]10214.1872[/C][C]11341.9618[/C][C]0.0796[/C][C]0.3171[/C][C]0.6844[/C][C]0.9998[/C][/ROW]
[ROW][C]93[/C][C]10384[/C][C]10661.6145[/C][C]10090.0389[/C][C]11233.19[/C][C]0.1706[/C][C]0.0369[/C][C]0.4544[/C][C]0.9991[/C][/ROW]
[ROW][C]94[/C][C]10834[/C][C]10781.3118[/C][C]10201.9752[/C][C]11360.6484[/C][C]0.4293[/C][C]0.9106[/C][C]0.4937[/C][C]0.9998[/C][/ROW]
[ROW][C]95[/C][C]9886[/C][C]9958.6782[/C][C]9371.8987[/C][C]10545.4578[/C][C]0.4041[/C][C]0.0017[/C][C]0.6639[/C][C]0.7602[/C][/ROW]
[ROW][C]96[/C][C]10216[/C][C]10075.5026[/C][C]9481.2845[/C][C]10669.7207[/C][C]0.3215[/C][C]0.734[/C][C]0.8607[/C][C]0.8607[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199729&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199729&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[84])
729963-------
7310158-------
749225-------
7510474-------
769757-------
7710490-------
7810281-------
7910444-------
8010640-------
8110695-------
8210786-------
839832-------
849747-------
851041110412.53679905.431810919.64160.49760.99490.83740.9949
8695119599.83649088.013110111.65970.36699e-040.92440.2865
871040210530.177110017.44911042.90530.312110.5850.9986
88970110053.27279519.180810587.36460.0980.10030.86150.8695
891054010548.947110011.3311086.56410.4870.9990.58510.9983
901011210357.33499808.721410905.94840.19040.2570.60750.9854
911091510723.620510167.954611279.28650.24980.98450.8380.9997
921118310778.074510214.187211341.96180.07960.31710.68440.9998
931038410661.614510090.038911233.190.17060.03690.45440.9991
941083410781.311810201.975211360.64840.42930.91060.49370.9998
9598869958.67829371.898710545.45780.40410.00170.66390.7602
961021610075.50269481.284510669.72070.32150.7340.86070.8607







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.0248-1e-0402.361400
860.0272-0.00930.00477891.90643947.133962.8262
870.0248-0.01220.007216429.37248107.880190.0438
880.0271-0.0350.0142124096.08537104.9313192.6264
890.026-8e-040.011580.050129699.9551172.3367
900.027-0.02370.013560189.226534781.5003186.498
910.02640.01780.014136626.10335045.015187.2031
920.02670.03760.0171163964.645451159.9688226.1857
930.0274-0.0260.018177069.78754038.8375232.4626
940.02740.00490.01672776.04748912.5584221.1618
950.0301-0.00730.01595282.127144946.1556212.0051
960.03010.01390.015719739.522242845.6028206.9918

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0248 & -1e-04 & 0 & 2.3614 & 0 & 0 \tabularnewline
86 & 0.0272 & -0.0093 & 0.0047 & 7891.9064 & 3947.1339 & 62.8262 \tabularnewline
87 & 0.0248 & -0.0122 & 0.0072 & 16429.3724 & 8107.8801 & 90.0438 \tabularnewline
88 & 0.0271 & -0.035 & 0.0142 & 124096.085 & 37104.9313 & 192.6264 \tabularnewline
89 & 0.026 & -8e-04 & 0.0115 & 80.0501 & 29699.9551 & 172.3367 \tabularnewline
90 & 0.027 & -0.0237 & 0.0135 & 60189.2265 & 34781.5003 & 186.498 \tabularnewline
91 & 0.0264 & 0.0178 & 0.0141 & 36626.103 & 35045.015 & 187.2031 \tabularnewline
92 & 0.0267 & 0.0376 & 0.0171 & 163964.6454 & 51159.9688 & 226.1857 \tabularnewline
93 & 0.0274 & -0.026 & 0.0181 & 77069.787 & 54038.8375 & 232.4626 \tabularnewline
94 & 0.0274 & 0.0049 & 0.0167 & 2776.047 & 48912.5584 & 221.1618 \tabularnewline
95 & 0.0301 & -0.0073 & 0.0159 & 5282.1271 & 44946.1556 & 212.0051 \tabularnewline
96 & 0.0301 & 0.0139 & 0.0157 & 19739.5222 & 42845.6028 & 206.9918 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199729&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]85[/C][C]0.0248[/C][C]-1e-04[/C][C]0[/C][C]2.3614[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0272[/C][C]-0.0093[/C][C]0.0047[/C][C]7891.9064[/C][C]3947.1339[/C][C]62.8262[/C][/ROW]
[ROW][C]87[/C][C]0.0248[/C][C]-0.0122[/C][C]0.0072[/C][C]16429.3724[/C][C]8107.8801[/C][C]90.0438[/C][/ROW]
[ROW][C]88[/C][C]0.0271[/C][C]-0.035[/C][C]0.0142[/C][C]124096.085[/C][C]37104.9313[/C][C]192.6264[/C][/ROW]
[ROW][C]89[/C][C]0.026[/C][C]-8e-04[/C][C]0.0115[/C][C]80.0501[/C][C]29699.9551[/C][C]172.3367[/C][/ROW]
[ROW][C]90[/C][C]0.027[/C][C]-0.0237[/C][C]0.0135[/C][C]60189.2265[/C][C]34781.5003[/C][C]186.498[/C][/ROW]
[ROW][C]91[/C][C]0.0264[/C][C]0.0178[/C][C]0.0141[/C][C]36626.103[/C][C]35045.015[/C][C]187.2031[/C][/ROW]
[ROW][C]92[/C][C]0.0267[/C][C]0.0376[/C][C]0.0171[/C][C]163964.6454[/C][C]51159.9688[/C][C]226.1857[/C][/ROW]
[ROW][C]93[/C][C]0.0274[/C][C]-0.026[/C][C]0.0181[/C][C]77069.787[/C][C]54038.8375[/C][C]232.4626[/C][/ROW]
[ROW][C]94[/C][C]0.0274[/C][C]0.0049[/C][C]0.0167[/C][C]2776.047[/C][C]48912.5584[/C][C]221.1618[/C][/ROW]
[ROW][C]95[/C][C]0.0301[/C][C]-0.0073[/C][C]0.0159[/C][C]5282.1271[/C][C]44946.1556[/C][C]212.0051[/C][/ROW]
[ROW][C]96[/C][C]0.0301[/C][C]0.0139[/C][C]0.0157[/C][C]19739.5222[/C][C]42845.6028[/C][C]206.9918[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199729&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199729&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
850.0248-1e-0402.361400
860.0272-0.00930.00477891.90643947.133962.8262
870.0248-0.01220.007216429.37248107.880190.0438
880.0271-0.0350.0142124096.08537104.9313192.6264
890.026-8e-040.011580.050129699.9551172.3367
900.027-0.02370.013560189.226534781.5003186.498
910.02640.01780.014136626.10335045.015187.2031
920.02670.03760.0171163964.645451159.9688226.1857
930.0274-0.0260.018177069.78754038.8375232.4626
940.02740.00490.01672776.04748912.5584221.1618
950.0301-0.00730.01595282.127144946.1556212.0051
960.03010.01390.015719739.522242845.6028206.9918



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 2 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 2 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')