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 computationWed, 20 Dec 2017 10:14:47 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2017/Dec/20/t1513761352exxpgasi4zef7w1.htm/, Retrieved Tue, 14 May 2024 00:24:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310461, Retrieved Tue, 14 May 2024 00:24:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact108
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2017-12-20 09:14:47] [9daa1cf3c40a2e57e8b63b2aa362ac76] [Current]
Feedback Forum

Post a new message
Dataseries X:
50
52.4
57.5
52.5
57.5
57.6
48.3
52
62.1
59.1
62.6
57.9
59.3
61.5
66
61.1
63.8
69.6
57
59.9
63.8
69.8
64.6
60.8
64.7
63.6
68.8
66.4
64.4
65.3
63
61.1
67.7
72.3
65.4
63.2
69.4
62.3
71
68.6
62
68.2
66.8
65.5
76.9
78.1
67.6
80.1
64.7
70.4
84.6
75.1
69.6
81.8
74.2
72.9
84.9
80.5
79.6
90.8
76.5
70.9
82.3
77.8
75.6
81.3
71
75.1
89.2
84.1
82.7
82.4
78.2
78.5
91.5
76.6
80.6
85.9
74.5
79.4
89.7
92.7
89.6
87
80.9
76.2
89.7
79.1
82.4
90.3
85.8
83.5
85.1
90.6
87.7
86
89.7
86.2
91.1
91.3
85.5
92
91.5
80
100.9
97.3
89.1
104
80.2
83.3
97.5
86.8
84.3
93.4
90.2
82.5
93.7
93.9
91.1
96.9
88.2
100.9
109.5
91
89.5
109.6
97.9
94.9
103.5
100
107.1
108
95
102.2
131.4
104.5
105.6
106.1
98
113
113.2
105.4
100.1
100.7
96.1
98.2
123.5
93.9
94.8
103.5
105.3
105.8
112
114.5
108.3
103.8
103
97.7
118.7
115.1
110
117.3
119.1
105.9
114.1
124.6
117.3
115
103.6
113.4
122
122.5
119.6
132.6
113
107.5
139.3
134.6
125.6
124
111.9
101.5
130.2
121.9
111.3
122
116.4
119.1
133
128.9
126.1
122.3
110.2
113.6
131
123.2
120.7
142.8
131.7
131.6
139
128.5
122.7
148.4
118.6
126.3
141
120.9
127
138.5
131.9
136.3




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310461&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=310461&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310461&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







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[200])
188119.1-------
189133-------
190128.9-------
191126.1-------
192122.3-------
193110.2-------
194113.6-------
195131-------
196123.2-------
197120.7-------
198142.8-------
199131.7-------
200131.6-------
201139139.3373128.513150.16160.47570.91940.87440.9194
202128.5137.9055126.6196149.19130.05120.42460.94110.8633
203122.7134.6047123.2299145.97950.02010.85360.92860.6977
204148.4134.0433122.4018145.68470.00780.97190.9760.6596
205118.6124.9267112.9632136.89010.151e-040.99210.1371
206126.3126.2806114.0343138.52680.49880.89050.97880.1973
207141142.9197130.4064155.4330.38180.99540.96910.9619
208120.9133.4101120.6313146.18890.02750.12220.94130.6094
209127130.77117.7297143.81030.28550.9310.93490.4504
210138.5143.3878130.0917156.68390.23560.99210.53450.9589
211131.9135.4517121.9048148.99860.30370.32960.70640.7113
212136.3134.4495120.6563148.24270.39630.64140.65720.6572

\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[200]) \tabularnewline
188 & 119.1 & - & - & - & - & - & - & - \tabularnewline
189 & 133 & - & - & - & - & - & - & - \tabularnewline
190 & 128.9 & - & - & - & - & - & - & - \tabularnewline
191 & 126.1 & - & - & - & - & - & - & - \tabularnewline
192 & 122.3 & - & - & - & - & - & - & - \tabularnewline
193 & 110.2 & - & - & - & - & - & - & - \tabularnewline
194 & 113.6 & - & - & - & - & - & - & - \tabularnewline
195 & 131 & - & - & - & - & - & - & - \tabularnewline
196 & 123.2 & - & - & - & - & - & - & - \tabularnewline
197 & 120.7 & - & - & - & - & - & - & - \tabularnewline
198 & 142.8 & - & - & - & - & - & - & - \tabularnewline
199 & 131.7 & - & - & - & - & - & - & - \tabularnewline
200 & 131.6 & - & - & - & - & - & - & - \tabularnewline
201 & 139 & 139.3373 & 128.513 & 150.1616 & 0.4757 & 0.9194 & 0.8744 & 0.9194 \tabularnewline
202 & 128.5 & 137.9055 & 126.6196 & 149.1913 & 0.0512 & 0.4246 & 0.9411 & 0.8633 \tabularnewline
203 & 122.7 & 134.6047 & 123.2299 & 145.9795 & 0.0201 & 0.8536 & 0.9286 & 0.6977 \tabularnewline
204 & 148.4 & 134.0433 & 122.4018 & 145.6847 & 0.0078 & 0.9719 & 0.976 & 0.6596 \tabularnewline
205 & 118.6 & 124.9267 & 112.9632 & 136.8901 & 0.15 & 1e-04 & 0.9921 & 0.1371 \tabularnewline
206 & 126.3 & 126.2806 & 114.0343 & 138.5268 & 0.4988 & 0.8905 & 0.9788 & 0.1973 \tabularnewline
207 & 141 & 142.9197 & 130.4064 & 155.433 & 0.3818 & 0.9954 & 0.9691 & 0.9619 \tabularnewline
208 & 120.9 & 133.4101 & 120.6313 & 146.1889 & 0.0275 & 0.1222 & 0.9413 & 0.6094 \tabularnewline
209 & 127 & 130.77 & 117.7297 & 143.8103 & 0.2855 & 0.931 & 0.9349 & 0.4504 \tabularnewline
210 & 138.5 & 143.3878 & 130.0917 & 156.6839 & 0.2356 & 0.9921 & 0.5345 & 0.9589 \tabularnewline
211 & 131.9 & 135.4517 & 121.9048 & 148.9986 & 0.3037 & 0.3296 & 0.7064 & 0.7113 \tabularnewline
212 & 136.3 & 134.4495 & 120.6563 & 148.2427 & 0.3963 & 0.6414 & 0.6572 & 0.6572 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310461&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[200])[/C][/ROW]
[ROW][C]188[/C][C]119.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]133[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]128.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]126.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]122.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]110.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]113.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]131[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]123.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]120.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]142.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]131.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]131.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]139[/C][C]139.3373[/C][C]128.513[/C][C]150.1616[/C][C]0.4757[/C][C]0.9194[/C][C]0.8744[/C][C]0.9194[/C][/ROW]
[ROW][C]202[/C][C]128.5[/C][C]137.9055[/C][C]126.6196[/C][C]149.1913[/C][C]0.0512[/C][C]0.4246[/C][C]0.9411[/C][C]0.8633[/C][/ROW]
[ROW][C]203[/C][C]122.7[/C][C]134.6047[/C][C]123.2299[/C][C]145.9795[/C][C]0.0201[/C][C]0.8536[/C][C]0.9286[/C][C]0.6977[/C][/ROW]
[ROW][C]204[/C][C]148.4[/C][C]134.0433[/C][C]122.4018[/C][C]145.6847[/C][C]0.0078[/C][C]0.9719[/C][C]0.976[/C][C]0.6596[/C][/ROW]
[ROW][C]205[/C][C]118.6[/C][C]124.9267[/C][C]112.9632[/C][C]136.8901[/C][C]0.15[/C][C]1e-04[/C][C]0.9921[/C][C]0.1371[/C][/ROW]
[ROW][C]206[/C][C]126.3[/C][C]126.2806[/C][C]114.0343[/C][C]138.5268[/C][C]0.4988[/C][C]0.8905[/C][C]0.9788[/C][C]0.1973[/C][/ROW]
[ROW][C]207[/C][C]141[/C][C]142.9197[/C][C]130.4064[/C][C]155.433[/C][C]0.3818[/C][C]0.9954[/C][C]0.9691[/C][C]0.9619[/C][/ROW]
[ROW][C]208[/C][C]120.9[/C][C]133.4101[/C][C]120.6313[/C][C]146.1889[/C][C]0.0275[/C][C]0.1222[/C][C]0.9413[/C][C]0.6094[/C][/ROW]
[ROW][C]209[/C][C]127[/C][C]130.77[/C][C]117.7297[/C][C]143.8103[/C][C]0.2855[/C][C]0.931[/C][C]0.9349[/C][C]0.4504[/C][/ROW]
[ROW][C]210[/C][C]138.5[/C][C]143.3878[/C][C]130.0917[/C][C]156.6839[/C][C]0.2356[/C][C]0.9921[/C][C]0.5345[/C][C]0.9589[/C][/ROW]
[ROW][C]211[/C][C]131.9[/C][C]135.4517[/C][C]121.9048[/C][C]148.9986[/C][C]0.3037[/C][C]0.3296[/C][C]0.7064[/C][C]0.7113[/C][/ROW]
[ROW][C]212[/C][C]136.3[/C][C]134.4495[/C][C]120.6563[/C][C]148.2427[/C][C]0.3963[/C][C]0.6414[/C][C]0.6572[/C][C]0.6572[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310461&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310461&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[200])
188119.1-------
189133-------
190128.9-------
191126.1-------
192122.3-------
193110.2-------
194113.6-------
195131-------
196123.2-------
197120.7-------
198142.8-------
199131.7-------
200131.6-------
201139139.3373128.513150.16160.47570.91940.87440.9194
202128.5137.9055126.6196149.19130.05120.42460.94110.8633
203122.7134.6047123.2299145.97950.02010.85360.92860.6977
204148.4134.0433122.4018145.68470.00780.97190.9760.6596
205118.6124.9267112.9632136.89010.151e-040.99210.1371
206126.3126.2806114.0343138.52680.49880.89050.97880.1973
207141142.9197130.4064155.4330.38180.99540.96910.9619
208120.9133.4101120.6313146.18890.02750.12220.94130.6094
209127130.77117.7297143.81030.28550.9310.93490.4504
210138.5143.3878130.0917156.68390.23560.99210.53450.9589
211131.9135.4517121.9048148.99860.30370.32960.70640.7113
212136.3134.4495120.6563148.24270.39630.64140.65720.6572







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0396-0.00240.00240.00240.113800-0.0260.026
2020.0418-0.07320.03780.036588.462644.28826.6549-0.7240.375
2030.0431-0.0970.05750.0552141.722476.76628.7616-0.91640.5555
2040.04430.09670.06730.0668206.116109.103710.44531.10510.6929
2050.0489-0.05330.06450.063840.026895.28839.7616-0.4870.6517
2060.04952e-040.05380.05324e-0479.4078.91110.00150.5433
2070.0447-0.01360.04810.04763.685268.58968.2819-0.14780.4868
2080.0489-0.10350.0550.0539156.501879.57868.9207-0.9630.5463
2090.0509-0.02970.05220.051214.212672.31578.5039-0.29020.5179
2100.0473-0.03530.05050.049523.890467.47328.2142-0.37620.5037
2110.051-0.02690.04840.047412.614762.4867.9048-0.27340.4828
2120.05230.01360.04550.04463.424557.56437.58710.14240.4544

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
201 & 0.0396 & -0.0024 & 0.0024 & 0.0024 & 0.1138 & 0 & 0 & -0.026 & 0.026 \tabularnewline
202 & 0.0418 & -0.0732 & 0.0378 & 0.0365 & 88.4626 & 44.2882 & 6.6549 & -0.724 & 0.375 \tabularnewline
203 & 0.0431 & -0.097 & 0.0575 & 0.0552 & 141.7224 & 76.7662 & 8.7616 & -0.9164 & 0.5555 \tabularnewline
204 & 0.0443 & 0.0967 & 0.0673 & 0.0668 & 206.116 & 109.1037 & 10.4453 & 1.1051 & 0.6929 \tabularnewline
205 & 0.0489 & -0.0533 & 0.0645 & 0.0638 & 40.0268 & 95.2883 & 9.7616 & -0.487 & 0.6517 \tabularnewline
206 & 0.0495 & 2e-04 & 0.0538 & 0.0532 & 4e-04 & 79.407 & 8.9111 & 0.0015 & 0.5433 \tabularnewline
207 & 0.0447 & -0.0136 & 0.0481 & 0.0476 & 3.6852 & 68.5896 & 8.2819 & -0.1478 & 0.4868 \tabularnewline
208 & 0.0489 & -0.1035 & 0.055 & 0.0539 & 156.5018 & 79.5786 & 8.9207 & -0.963 & 0.5463 \tabularnewline
209 & 0.0509 & -0.0297 & 0.0522 & 0.0512 & 14.2126 & 72.3157 & 8.5039 & -0.2902 & 0.5179 \tabularnewline
210 & 0.0473 & -0.0353 & 0.0505 & 0.0495 & 23.8904 & 67.4732 & 8.2142 & -0.3762 & 0.5037 \tabularnewline
211 & 0.051 & -0.0269 & 0.0484 & 0.0474 & 12.6147 & 62.486 & 7.9048 & -0.2734 & 0.4828 \tabularnewline
212 & 0.0523 & 0.0136 & 0.0455 & 0.0446 & 3.4245 & 57.5643 & 7.5871 & 0.1424 & 0.4544 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310461&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]sMAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][C]ScaledE[/C][C]MASE[/C][/ROW]
[ROW][C]201[/C][C]0.0396[/C][C]-0.0024[/C][C]0.0024[/C][C]0.0024[/C][C]0.1138[/C][C]0[/C][C]0[/C][C]-0.026[/C][C]0.026[/C][/ROW]
[ROW][C]202[/C][C]0.0418[/C][C]-0.0732[/C][C]0.0378[/C][C]0.0365[/C][C]88.4626[/C][C]44.2882[/C][C]6.6549[/C][C]-0.724[/C][C]0.375[/C][/ROW]
[ROW][C]203[/C][C]0.0431[/C][C]-0.097[/C][C]0.0575[/C][C]0.0552[/C][C]141.7224[/C][C]76.7662[/C][C]8.7616[/C][C]-0.9164[/C][C]0.5555[/C][/ROW]
[ROW][C]204[/C][C]0.0443[/C][C]0.0967[/C][C]0.0673[/C][C]0.0668[/C][C]206.116[/C][C]109.1037[/C][C]10.4453[/C][C]1.1051[/C][C]0.6929[/C][/ROW]
[ROW][C]205[/C][C]0.0489[/C][C]-0.0533[/C][C]0.0645[/C][C]0.0638[/C][C]40.0268[/C][C]95.2883[/C][C]9.7616[/C][C]-0.487[/C][C]0.6517[/C][/ROW]
[ROW][C]206[/C][C]0.0495[/C][C]2e-04[/C][C]0.0538[/C][C]0.0532[/C][C]4e-04[/C][C]79.407[/C][C]8.9111[/C][C]0.0015[/C][C]0.5433[/C][/ROW]
[ROW][C]207[/C][C]0.0447[/C][C]-0.0136[/C][C]0.0481[/C][C]0.0476[/C][C]3.6852[/C][C]68.5896[/C][C]8.2819[/C][C]-0.1478[/C][C]0.4868[/C][/ROW]
[ROW][C]208[/C][C]0.0489[/C][C]-0.1035[/C][C]0.055[/C][C]0.0539[/C][C]156.5018[/C][C]79.5786[/C][C]8.9207[/C][C]-0.963[/C][C]0.5463[/C][/ROW]
[ROW][C]209[/C][C]0.0509[/C][C]-0.0297[/C][C]0.0522[/C][C]0.0512[/C][C]14.2126[/C][C]72.3157[/C][C]8.5039[/C][C]-0.2902[/C][C]0.5179[/C][/ROW]
[ROW][C]210[/C][C]0.0473[/C][C]-0.0353[/C][C]0.0505[/C][C]0.0495[/C][C]23.8904[/C][C]67.4732[/C][C]8.2142[/C][C]-0.3762[/C][C]0.5037[/C][/ROW]
[ROW][C]211[/C][C]0.051[/C][C]-0.0269[/C][C]0.0484[/C][C]0.0474[/C][C]12.6147[/C][C]62.486[/C][C]7.9048[/C][C]-0.2734[/C][C]0.4828[/C][/ROW]
[ROW][C]212[/C][C]0.0523[/C][C]0.0136[/C][C]0.0455[/C][C]0.0446[/C][C]3.4245[/C][C]57.5643[/C][C]7.5871[/C][C]0.1424[/C][C]0.4544[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310461&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310461&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.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0396-0.00240.00240.00240.113800-0.0260.026
2020.0418-0.07320.03780.036588.462644.28826.6549-0.7240.375
2030.0431-0.0970.05750.0552141.722476.76628.7616-0.91640.5555
2040.04430.09670.06730.0668206.116109.103710.44531.10510.6929
2050.0489-0.05330.06450.063840.026895.28839.7616-0.4870.6517
2060.04952e-040.05380.05324e-0479.4078.91110.00150.5433
2070.0447-0.01360.04810.04763.685268.58968.2819-0.14780.4868
2080.0489-0.10350.0550.0539156.501879.57868.9207-0.9630.5463
2090.0509-0.02970.05220.051214.212672.31578.5039-0.29020.5179
2100.0473-0.03530.05050.049523.890467.47328.2142-0.37620.5037
2110.051-0.02690.04840.047412.614762.4867.9048-0.27340.4828
2120.05230.01360.04550.04463.424557.56437.58710.14240.4544



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 1 ; par8 = 1 ; 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*2
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.spe <- array(0, dim=fx)
perf.scalederr <- array(0, dim=fx)
perf.mase <- array(0, dim=fx)
perf.mase1 <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.smape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.smape1 <- 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)
perf.scaleddenom <- 0
for (i in 2:fx) {
perf.scaleddenom = perf.scaleddenom + abs(x[nx+i] - x[nx+i-1])
}
perf.scaleddenom = perf.scaleddenom / (fx-1)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.scalederr[i] = (x[nx+i] - forecast$pred[i]) / perf.scaleddenom
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / x[nx+i]
perf.spe[i] = 2*(x[nx+i] - forecast$pred[i]) / (x[nx+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.smape[1] = abs(perf.spe[1])
perf.mape1[1] = perf.mape[1]
perf.smape1[1] = perf.smape[1]
perf.mse[1] = perf.se[1]
perf.mase[1] = abs(perf.scalederr[1])
perf.mase1[1] = perf.mase[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.smape[i] = perf.smape[i-1] + abs(perf.spe[i])
perf.smape1[i] = perf.smape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
perf.mase[i] = perf.mase[i-1] + abs(perf.scalederr[i])
perf.mase1[i] = perf.mase[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',10,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,'sMAPE',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.element(a,'ScaledE',1,header=TRUE)
a<-table.element(a,'MASE',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.smape1[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.element(a,round(perf.scalederr[i],4))
a<-table.element(a,round(perf.mase1[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')