Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 18 Dec 2007 15:49:42 -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/18/t11980187449tu6fzm8ziswshr.htm/, Retrieved Sat, 04 May 2024 12:57:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4629, Retrieved Sat, 04 May 2024 12:57:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact185
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-18 22:49:42] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
99,5
101,6
103,9
106,6
108,3
102
93,8
91,6
97,7
94,8
98
103,8
97,8
91,2
89,3
87,5
90,4
94,2
102,2
101,3
96
90,8
93,2
90,9
91,1
90,2
94,3
96
99
103,3
113,1
112,8
112,1
107,4
111
110,5
110,8
112,4
111,5
116,2
122,5
121,3
113,9
110,7
120,8
106,8
109,05
109,5
108,65
110,35
118,55
120,1
124,85
129,1
124,85
120,1
112,5
106,2
107,1
108,5
106,5
108,3
125,6
124
127,2
136,9
135,8
124,3
115,4
113,6
114,4
118,4
117
116,5
115,4
113,6
117,4
116,9
116,4
111,1
110,2
118,9
131,8
130,6
138,3
148,4
148,7
144,3
152,5
162,9
167,2
166,5
166,5




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=4629&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=4629&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4629&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[81])
69115.4-------
70113.6-------
71114.4-------
72118.4-------
73117-------
74116.5-------
75115.4-------
76113.6-------
77117.4-------
78116.9-------
79116.4-------
80111.1-------
81110.2-------
82118.9109.7374100.2475119.22740.02920.46190.21250.4619
83131.8109.94396.5222123.36387e-040.09540.25760.485
84130.6110.97194.5339127.4080.00960.00650.18780.5366
85138.3110.611291.6313129.59110.00210.01950.25470.5169
86148.4110.482789.2625131.70292e-040.00510.28920.5104
87148.7110.286.9545133.44556e-046e-040.33050.5
88144.3109.737484.6294134.84540.00350.00120.38150.4856
89152.5110.71483.8724137.55560.00110.00710.31270.515
90162.9110.585582.1157139.05532e-040.0020.33190.5106
91167.2110.45780.4472140.46681e-043e-040.3490.5067
92166.5109.094977.6204140.56952e-041e-040.45030.4726
93166.5108.863675.9895141.73783e-043e-040.46820.4682

\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[81]) \tabularnewline
69 & 115.4 & - & - & - & - & - & - & - \tabularnewline
70 & 113.6 & - & - & - & - & - & - & - \tabularnewline
71 & 114.4 & - & - & - & - & - & - & - \tabularnewline
72 & 118.4 & - & - & - & - & - & - & - \tabularnewline
73 & 117 & - & - & - & - & - & - & - \tabularnewline
74 & 116.5 & - & - & - & - & - & - & - \tabularnewline
75 & 115.4 & - & - & - & - & - & - & - \tabularnewline
76 & 113.6 & - & - & - & - & - & - & - \tabularnewline
77 & 117.4 & - & - & - & - & - & - & - \tabularnewline
78 & 116.9 & - & - & - & - & - & - & - \tabularnewline
79 & 116.4 & - & - & - & - & - & - & - \tabularnewline
80 & 111.1 & - & - & - & - & - & - & - \tabularnewline
81 & 110.2 & - & - & - & - & - & - & - \tabularnewline
82 & 118.9 & 109.7374 & 100.2475 & 119.2274 & 0.0292 & 0.4619 & 0.2125 & 0.4619 \tabularnewline
83 & 131.8 & 109.943 & 96.5222 & 123.3638 & 7e-04 & 0.0954 & 0.2576 & 0.485 \tabularnewline
84 & 130.6 & 110.971 & 94.5339 & 127.408 & 0.0096 & 0.0065 & 0.1878 & 0.5366 \tabularnewline
85 & 138.3 & 110.6112 & 91.6313 & 129.5911 & 0.0021 & 0.0195 & 0.2547 & 0.5169 \tabularnewline
86 & 148.4 & 110.4827 & 89.2625 & 131.7029 & 2e-04 & 0.0051 & 0.2892 & 0.5104 \tabularnewline
87 & 148.7 & 110.2 & 86.9545 & 133.4455 & 6e-04 & 6e-04 & 0.3305 & 0.5 \tabularnewline
88 & 144.3 & 109.7374 & 84.6294 & 134.8454 & 0.0035 & 0.0012 & 0.3815 & 0.4856 \tabularnewline
89 & 152.5 & 110.714 & 83.8724 & 137.5556 & 0.0011 & 0.0071 & 0.3127 & 0.515 \tabularnewline
90 & 162.9 & 110.5855 & 82.1157 & 139.0553 & 2e-04 & 0.002 & 0.3319 & 0.5106 \tabularnewline
91 & 167.2 & 110.457 & 80.4472 & 140.4668 & 1e-04 & 3e-04 & 0.349 & 0.5067 \tabularnewline
92 & 166.5 & 109.0949 & 77.6204 & 140.5695 & 2e-04 & 1e-04 & 0.4503 & 0.4726 \tabularnewline
93 & 166.5 & 108.8636 & 75.9895 & 141.7378 & 3e-04 & 3e-04 & 0.4682 & 0.4682 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4629&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[81])[/C][/ROW]
[ROW][C]69[/C][C]115.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]113.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]114.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]118.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]116.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]115.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]113.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]117.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]116.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]116.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]111.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]110.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]118.9[/C][C]109.7374[/C][C]100.2475[/C][C]119.2274[/C][C]0.0292[/C][C]0.4619[/C][C]0.2125[/C][C]0.4619[/C][/ROW]
[ROW][C]83[/C][C]131.8[/C][C]109.943[/C][C]96.5222[/C][C]123.3638[/C][C]7e-04[/C][C]0.0954[/C][C]0.2576[/C][C]0.485[/C][/ROW]
[ROW][C]84[/C][C]130.6[/C][C]110.971[/C][C]94.5339[/C][C]127.408[/C][C]0.0096[/C][C]0.0065[/C][C]0.1878[/C][C]0.5366[/C][/ROW]
[ROW][C]85[/C][C]138.3[/C][C]110.6112[/C][C]91.6313[/C][C]129.5911[/C][C]0.0021[/C][C]0.0195[/C][C]0.2547[/C][C]0.5169[/C][/ROW]
[ROW][C]86[/C][C]148.4[/C][C]110.4827[/C][C]89.2625[/C][C]131.7029[/C][C]2e-04[/C][C]0.0051[/C][C]0.2892[/C][C]0.5104[/C][/ROW]
[ROW][C]87[/C][C]148.7[/C][C]110.2[/C][C]86.9545[/C][C]133.4455[/C][C]6e-04[/C][C]6e-04[/C][C]0.3305[/C][C]0.5[/C][/ROW]
[ROW][C]88[/C][C]144.3[/C][C]109.7374[/C][C]84.6294[/C][C]134.8454[/C][C]0.0035[/C][C]0.0012[/C][C]0.3815[/C][C]0.4856[/C][/ROW]
[ROW][C]89[/C][C]152.5[/C][C]110.714[/C][C]83.8724[/C][C]137.5556[/C][C]0.0011[/C][C]0.0071[/C][C]0.3127[/C][C]0.515[/C][/ROW]
[ROW][C]90[/C][C]162.9[/C][C]110.5855[/C][C]82.1157[/C][C]139.0553[/C][C]2e-04[/C][C]0.002[/C][C]0.3319[/C][C]0.5106[/C][/ROW]
[ROW][C]91[/C][C]167.2[/C][C]110.457[/C][C]80.4472[/C][C]140.4668[/C][C]1e-04[/C][C]3e-04[/C][C]0.349[/C][C]0.5067[/C][/ROW]
[ROW][C]92[/C][C]166.5[/C][C]109.0949[/C][C]77.6204[/C][C]140.5695[/C][C]2e-04[/C][C]1e-04[/C][C]0.4503[/C][C]0.4726[/C][/ROW]
[ROW][C]93[/C][C]166.5[/C][C]108.8636[/C][C]75.9895[/C][C]141.7378[/C][C]3e-04[/C][C]3e-04[/C][C]0.4682[/C][C]0.4682[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4629&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4629&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[81])
69115.4-------
70113.6-------
71114.4-------
72118.4-------
73117-------
74116.5-------
75115.4-------
76113.6-------
77117.4-------
78116.9-------
79116.4-------
80111.1-------
81110.2-------
82118.9109.7374100.2475119.22740.02920.46190.21250.4619
83131.8109.94396.5222123.36387e-040.09540.25760.485
84130.6110.97194.5339127.4080.00960.00650.18780.5366
85138.3110.611291.6313129.59110.00210.01950.25470.5169
86148.4110.482789.2625131.70292e-040.00510.28920.5104
87148.7110.286.9545133.44556e-046e-040.33050.5
88144.3109.737484.6294134.84540.00350.00120.38150.4856
89152.5110.71483.8724137.55560.00110.00710.31270.515
90162.9110.585582.1157139.05532e-040.0020.33190.5106
91167.2110.45780.4472140.46681e-043e-040.3490.5067
92166.5109.094977.6204140.56952e-041e-040.45030.4726
93166.5108.863675.9895141.73783e-043e-040.46820.4682







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
820.04410.08350.00783.9536.99612.645
830.06230.19880.0166477.728139.81076.3096
840.07560.17690.0147385.298632.10825.6664
850.08750.25030.0209766.670463.88927.9931
860.0980.34320.02861437.7223119.810210.9458
870.10760.34940.02911482.25123.520811.114
880.11670.3150.02621194.572399.54779.9774
890.12370.37740.03151746.0712145.505912.0626
900.13140.47310.03942736.8082228.067415.1019
910.13860.51370.04283219.769268.314116.3803
920.14720.52620.04383295.3413274.611816.5714
930.15410.52940.04413321.9495276.829116.6382

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
82 & 0.0441 & 0.0835 & 0.007 & 83.953 & 6.9961 & 2.645 \tabularnewline
83 & 0.0623 & 0.1988 & 0.0166 & 477.7281 & 39.8107 & 6.3096 \tabularnewline
84 & 0.0756 & 0.1769 & 0.0147 & 385.2986 & 32.1082 & 5.6664 \tabularnewline
85 & 0.0875 & 0.2503 & 0.0209 & 766.6704 & 63.8892 & 7.9931 \tabularnewline
86 & 0.098 & 0.3432 & 0.0286 & 1437.7223 & 119.8102 & 10.9458 \tabularnewline
87 & 0.1076 & 0.3494 & 0.0291 & 1482.25 & 123.5208 & 11.114 \tabularnewline
88 & 0.1167 & 0.315 & 0.0262 & 1194.5723 & 99.5477 & 9.9774 \tabularnewline
89 & 0.1237 & 0.3774 & 0.0315 & 1746.0712 & 145.5059 & 12.0626 \tabularnewline
90 & 0.1314 & 0.4731 & 0.0394 & 2736.8082 & 228.0674 & 15.1019 \tabularnewline
91 & 0.1386 & 0.5137 & 0.0428 & 3219.769 & 268.3141 & 16.3803 \tabularnewline
92 & 0.1472 & 0.5262 & 0.0438 & 3295.3413 & 274.6118 & 16.5714 \tabularnewline
93 & 0.1541 & 0.5294 & 0.0441 & 3321.9495 & 276.8291 & 16.6382 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4629&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]82[/C][C]0.0441[/C][C]0.0835[/C][C]0.007[/C][C]83.953[/C][C]6.9961[/C][C]2.645[/C][/ROW]
[ROW][C]83[/C][C]0.0623[/C][C]0.1988[/C][C]0.0166[/C][C]477.7281[/C][C]39.8107[/C][C]6.3096[/C][/ROW]
[ROW][C]84[/C][C]0.0756[/C][C]0.1769[/C][C]0.0147[/C][C]385.2986[/C][C]32.1082[/C][C]5.6664[/C][/ROW]
[ROW][C]85[/C][C]0.0875[/C][C]0.2503[/C][C]0.0209[/C][C]766.6704[/C][C]63.8892[/C][C]7.9931[/C][/ROW]
[ROW][C]86[/C][C]0.098[/C][C]0.3432[/C][C]0.0286[/C][C]1437.7223[/C][C]119.8102[/C][C]10.9458[/C][/ROW]
[ROW][C]87[/C][C]0.1076[/C][C]0.3494[/C][C]0.0291[/C][C]1482.25[/C][C]123.5208[/C][C]11.114[/C][/ROW]
[ROW][C]88[/C][C]0.1167[/C][C]0.315[/C][C]0.0262[/C][C]1194.5723[/C][C]99.5477[/C][C]9.9774[/C][/ROW]
[ROW][C]89[/C][C]0.1237[/C][C]0.3774[/C][C]0.0315[/C][C]1746.0712[/C][C]145.5059[/C][C]12.0626[/C][/ROW]
[ROW][C]90[/C][C]0.1314[/C][C]0.4731[/C][C]0.0394[/C][C]2736.8082[/C][C]228.0674[/C][C]15.1019[/C][/ROW]
[ROW][C]91[/C][C]0.1386[/C][C]0.5137[/C][C]0.0428[/C][C]3219.769[/C][C]268.3141[/C][C]16.3803[/C][/ROW]
[ROW][C]92[/C][C]0.1472[/C][C]0.5262[/C][C]0.0438[/C][C]3295.3413[/C][C]274.6118[/C][C]16.5714[/C][/ROW]
[ROW][C]93[/C][C]0.1541[/C][C]0.5294[/C][C]0.0441[/C][C]3321.9495[/C][C]276.8291[/C][C]16.6382[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4629&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4629&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
820.04410.08350.00783.9536.99612.645
830.06230.19880.0166477.728139.81076.3096
840.07560.17690.0147385.298632.10825.6664
850.08750.25030.0209766.670463.88927.9931
860.0980.34320.02861437.7223119.810210.9458
870.10760.34940.02911482.25123.520811.114
880.11670.3150.02621194.572399.54779.9774
890.12370.37740.03151746.0712145.505912.0626
900.13140.47310.03942736.8082228.067415.1019
910.13860.51370.04283219.769268.314116.3803
920.14720.52620.04383295.3413274.611816.5714
930.15410.52940.04413321.9495276.829116.6382



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