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 computationMon, 18 Dec 2017 14:16:52 +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/18/t1513603027w2r8ibw3rew2wa8.htm/, Retrieved Tue, 14 May 2024 16:18:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310169, Retrieved Tue, 14 May 2024 16:18:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact57
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forecasting] [2017-12-18 13:16:52] [0687db01a969247b131332e81d79dad3] [Current]
Feedback Forum

Post a new message
Dataseries X:
63.2
68.6
77.7
68.1
75.1
73.3
60.5
65.9
77.7
77.1
77.7
71.3
76
75.3
81.7
72.5
77.4
81.1
65.1
68.7
75.6
79.7
75.3
67.7
73.2
72.2
79.3
77.5
75.6
77.4
69.2
67.1
77.9
82.7
75.7
70.1
76.4
74.3
80.5
78
73.5
78.8
71.2
66.2
82.7
83.8
75
80.4
74.6
77.7
89.8
82.4
77
89.6
75.7
75.1
89.9
88.8
86.5
90
84
82.7
91.7
87.5
82
92.2
73.1
75.6
91.6
87.5
90.1
91.3
87.6
88.4
100.7
85.3
92
96.8
77.9
80.9
95.3
99.3
96.1
92.5
93.7
92.1
103.6
92.5
95.7
103.4
89
89.1
98.7
109.4
101.1
95.4
101.4
102.1
103.6
106
98.4
106.6
95.8
87.2
108.5
107
92
94.9
84.4
85
94
84.5
88.2
92.1
81.1
81.2
96.1
95.3
92.1
91.7
90.3
96.1
108.7
95.9
95.1
109.4
91.2
91.4
107.4
105.6
105.3
103.7
99.5
103.2
123.1
102.2
110
106.2
91.3
99.3
111.8
104.4
102.4
101
100.6
104.5
117.4
97.4
99.5
106.4
95.2
94
104.1
105.8
101.1
93.5
97.9
96.8
108.4
103.5
101.3
107.4
100.7
91.1
105
112.8
105.6
101
101.9
103.5
109.5
105
102.9
108.5
96.9
88.4
112.4
111.3
101.6
101.2
101.8
98.8
114.4
104.5
97.6
109.1
94.5
90.4
111.8
110.5
106.8
101.8
103.7
107.4
117.5
109.6
102.8
115.5
97.8
100.2
112.9
108.7
109
113.9
106.9
109.6
124.5
104.2
110.8
118.7
102.1
105.1




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310169&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])
18890.4-------
189111.8-------
190110.5-------
191106.8-------
192101.8-------
193103.7-------
194107.4-------
195117.5-------
196109.6-------
197102.8-------
198115.5-------
19997.8-------
200100.2-------
201112.9116.401108.7263124.44710.196910.86881
202108.7115.6858107.7741123.99520.04970.74440.88940.9999
203109112.3662104.149121.02690.22310.79660.89610.9971
204113.9108.858799.3174119.02390.16550.48910.91320.9525
205106.9108.289198.5145118.72310.39710.14590.80570.9357
206109.6110.349399.8257121.62590.44820.72560.69590.9611
207124.5121.3477109.2801134.31840.31690.96210.71950.9993
208104.2111.452699.7505124.08330.13020.02150.61310.9596
209110.8111.27299.0094124.56010.47220.85160.89430.9488
210118.7118.3091104.9632132.79980.47890.84510.6480.9928
211102.1102.862490.4243116.45140.45620.01120.76740.6495
212105.1102.101689.269116.17280.33810.50010.60440.6044

\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 & 90.4 & - & - & - & - & - & - & - \tabularnewline
189 & 111.8 & - & - & - & - & - & - & - \tabularnewline
190 & 110.5 & - & - & - & - & - & - & - \tabularnewline
191 & 106.8 & - & - & - & - & - & - & - \tabularnewline
192 & 101.8 & - & - & - & - & - & - & - \tabularnewline
193 & 103.7 & - & - & - & - & - & - & - \tabularnewline
194 & 107.4 & - & - & - & - & - & - & - \tabularnewline
195 & 117.5 & - & - & - & - & - & - & - \tabularnewline
196 & 109.6 & - & - & - & - & - & - & - \tabularnewline
197 & 102.8 & - & - & - & - & - & - & - \tabularnewline
198 & 115.5 & - & - & - & - & - & - & - \tabularnewline
199 & 97.8 & - & - & - & - & - & - & - \tabularnewline
200 & 100.2 & - & - & - & - & - & - & - \tabularnewline
201 & 112.9 & 116.401 & 108.7263 & 124.4471 & 0.1969 & 1 & 0.8688 & 1 \tabularnewline
202 & 108.7 & 115.6858 & 107.7741 & 123.9952 & 0.0497 & 0.7444 & 0.8894 & 0.9999 \tabularnewline
203 & 109 & 112.3662 & 104.149 & 121.0269 & 0.2231 & 0.7966 & 0.8961 & 0.9971 \tabularnewline
204 & 113.9 & 108.8587 & 99.3174 & 119.0239 & 0.1655 & 0.4891 & 0.9132 & 0.9525 \tabularnewline
205 & 106.9 & 108.2891 & 98.5145 & 118.7231 & 0.3971 & 0.1459 & 0.8057 & 0.9357 \tabularnewline
206 & 109.6 & 110.3493 & 99.8257 & 121.6259 & 0.4482 & 0.7256 & 0.6959 & 0.9611 \tabularnewline
207 & 124.5 & 121.3477 & 109.2801 & 134.3184 & 0.3169 & 0.9621 & 0.7195 & 0.9993 \tabularnewline
208 & 104.2 & 111.4526 & 99.7505 & 124.0833 & 0.1302 & 0.0215 & 0.6131 & 0.9596 \tabularnewline
209 & 110.8 & 111.272 & 99.0094 & 124.5601 & 0.4722 & 0.8516 & 0.8943 & 0.9488 \tabularnewline
210 & 118.7 & 118.3091 & 104.9632 & 132.7998 & 0.4789 & 0.8451 & 0.648 & 0.9928 \tabularnewline
211 & 102.1 & 102.8624 & 90.4243 & 116.4514 & 0.4562 & 0.0112 & 0.7674 & 0.6495 \tabularnewline
212 & 105.1 & 102.1016 & 89.269 & 116.1728 & 0.3381 & 0.5001 & 0.6044 & 0.6044 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310169&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]90.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]111.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]110.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]106.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]101.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]103.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]107.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]117.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]109.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]102.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]115.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]97.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]100.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]112.9[/C][C]116.401[/C][C]108.7263[/C][C]124.4471[/C][C]0.1969[/C][C]1[/C][C]0.8688[/C][C]1[/C][/ROW]
[ROW][C]202[/C][C]108.7[/C][C]115.6858[/C][C]107.7741[/C][C]123.9952[/C][C]0.0497[/C][C]0.7444[/C][C]0.8894[/C][C]0.9999[/C][/ROW]
[ROW][C]203[/C][C]109[/C][C]112.3662[/C][C]104.149[/C][C]121.0269[/C][C]0.2231[/C][C]0.7966[/C][C]0.8961[/C][C]0.9971[/C][/ROW]
[ROW][C]204[/C][C]113.9[/C][C]108.8587[/C][C]99.3174[/C][C]119.0239[/C][C]0.1655[/C][C]0.4891[/C][C]0.9132[/C][C]0.9525[/C][/ROW]
[ROW][C]205[/C][C]106.9[/C][C]108.2891[/C][C]98.5145[/C][C]118.7231[/C][C]0.3971[/C][C]0.1459[/C][C]0.8057[/C][C]0.9357[/C][/ROW]
[ROW][C]206[/C][C]109.6[/C][C]110.3493[/C][C]99.8257[/C][C]121.6259[/C][C]0.4482[/C][C]0.7256[/C][C]0.6959[/C][C]0.9611[/C][/ROW]
[ROW][C]207[/C][C]124.5[/C][C]121.3477[/C][C]109.2801[/C][C]134.3184[/C][C]0.3169[/C][C]0.9621[/C][C]0.7195[/C][C]0.9993[/C][/ROW]
[ROW][C]208[/C][C]104.2[/C][C]111.4526[/C][C]99.7505[/C][C]124.0833[/C][C]0.1302[/C][C]0.0215[/C][C]0.6131[/C][C]0.9596[/C][/ROW]
[ROW][C]209[/C][C]110.8[/C][C]111.272[/C][C]99.0094[/C][C]124.5601[/C][C]0.4722[/C][C]0.8516[/C][C]0.8943[/C][C]0.9488[/C][/ROW]
[ROW][C]210[/C][C]118.7[/C][C]118.3091[/C][C]104.9632[/C][C]132.7998[/C][C]0.4789[/C][C]0.8451[/C][C]0.648[/C][C]0.9928[/C][/ROW]
[ROW][C]211[/C][C]102.1[/C][C]102.8624[/C][C]90.4243[/C][C]116.4514[/C][C]0.4562[/C][C]0.0112[/C][C]0.7674[/C][C]0.6495[/C][/ROW]
[ROW][C]212[/C][C]105.1[/C][C]102.1016[/C][C]89.269[/C][C]116.1728[/C][C]0.3381[/C][C]0.5001[/C][C]0.6044[/C][C]0.6044[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310169&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310169&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])
18890.4-------
189111.8-------
190110.5-------
191106.8-------
192101.8-------
193103.7-------
194107.4-------
195117.5-------
196109.6-------
197102.8-------
198115.5-------
19997.8-------
200100.2-------
201112.9116.401108.7263124.44710.196910.86881
202108.7115.6858107.7741123.99520.04970.74440.88940.9999
203109112.3662104.149121.02690.22310.79660.89610.9971
204113.9108.858799.3174119.02390.16550.48910.91320.9525
205106.9108.289198.5145118.72310.39710.14590.80570.9357
206109.6110.349399.8257121.62590.44820.72560.69590.9611
207124.5121.3477109.2801134.31840.31690.96210.71950.9993
208104.2111.452699.7505124.08330.13020.02150.61310.9596
209110.8111.27299.0094124.56010.47220.85160.89430.9488
210118.7118.3091104.9632132.79980.47890.84510.6480.9928
211102.1102.862490.4243116.45140.45620.01120.76740.6495
212105.1102.101689.269116.17280.33810.50010.60440.6044







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0353-0.0310.0310.030512.257100-0.43560.4356
2020.0366-0.06430.04760.046448.800830.5295.5253-0.86930.6525
2030.0393-0.03090.04210.041111.331524.12984.9122-0.41890.5746
2040.04760.04430.04260.042125.414224.45094.94480.62730.5878
2050.0492-0.0130.03670.03631.929519.94664.4662-0.17280.5048
2060.0521-0.00680.03170.03140.561416.71584.0885-0.09320.4362
2070.05450.02530.03080.03059.937215.74743.96830.39230.4299
2080.0578-0.06960.03560.035152.600220.3544.5115-0.90250.489
2090.0609-0.00430.03220.03170.222818.11724.2564-0.05870.4412
2100.06250.00330.02930.02890.152816.32084.03990.04860.4019
2110.0674-0.00750.02730.02690.581314.88993.8587-0.09490.374
2120.07030.02850.02740.02718.990614.39833.79450.37310.3739

\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.0353 & -0.031 & 0.031 & 0.0305 & 12.2571 & 0 & 0 & -0.4356 & 0.4356 \tabularnewline
202 & 0.0366 & -0.0643 & 0.0476 & 0.0464 & 48.8008 & 30.529 & 5.5253 & -0.8693 & 0.6525 \tabularnewline
203 & 0.0393 & -0.0309 & 0.0421 & 0.0411 & 11.3315 & 24.1298 & 4.9122 & -0.4189 & 0.5746 \tabularnewline
204 & 0.0476 & 0.0443 & 0.0426 & 0.0421 & 25.4142 & 24.4509 & 4.9448 & 0.6273 & 0.5878 \tabularnewline
205 & 0.0492 & -0.013 & 0.0367 & 0.0363 & 1.9295 & 19.9466 & 4.4662 & -0.1728 & 0.5048 \tabularnewline
206 & 0.0521 & -0.0068 & 0.0317 & 0.0314 & 0.5614 & 16.7158 & 4.0885 & -0.0932 & 0.4362 \tabularnewline
207 & 0.0545 & 0.0253 & 0.0308 & 0.0305 & 9.9372 & 15.7474 & 3.9683 & 0.3923 & 0.4299 \tabularnewline
208 & 0.0578 & -0.0696 & 0.0356 & 0.0351 & 52.6002 & 20.354 & 4.5115 & -0.9025 & 0.489 \tabularnewline
209 & 0.0609 & -0.0043 & 0.0322 & 0.0317 & 0.2228 & 18.1172 & 4.2564 & -0.0587 & 0.4412 \tabularnewline
210 & 0.0625 & 0.0033 & 0.0293 & 0.0289 & 0.1528 & 16.3208 & 4.0399 & 0.0486 & 0.4019 \tabularnewline
211 & 0.0674 & -0.0075 & 0.0273 & 0.0269 & 0.5813 & 14.8899 & 3.8587 & -0.0949 & 0.374 \tabularnewline
212 & 0.0703 & 0.0285 & 0.0274 & 0.0271 & 8.9906 & 14.3983 & 3.7945 & 0.3731 & 0.3739 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310169&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.0353[/C][C]-0.031[/C][C]0.031[/C][C]0.0305[/C][C]12.2571[/C][C]0[/C][C]0[/C][C]-0.4356[/C][C]0.4356[/C][/ROW]
[ROW][C]202[/C][C]0.0366[/C][C]-0.0643[/C][C]0.0476[/C][C]0.0464[/C][C]48.8008[/C][C]30.529[/C][C]5.5253[/C][C]-0.8693[/C][C]0.6525[/C][/ROW]
[ROW][C]203[/C][C]0.0393[/C][C]-0.0309[/C][C]0.0421[/C][C]0.0411[/C][C]11.3315[/C][C]24.1298[/C][C]4.9122[/C][C]-0.4189[/C][C]0.5746[/C][/ROW]
[ROW][C]204[/C][C]0.0476[/C][C]0.0443[/C][C]0.0426[/C][C]0.0421[/C][C]25.4142[/C][C]24.4509[/C][C]4.9448[/C][C]0.6273[/C][C]0.5878[/C][/ROW]
[ROW][C]205[/C][C]0.0492[/C][C]-0.013[/C][C]0.0367[/C][C]0.0363[/C][C]1.9295[/C][C]19.9466[/C][C]4.4662[/C][C]-0.1728[/C][C]0.5048[/C][/ROW]
[ROW][C]206[/C][C]0.0521[/C][C]-0.0068[/C][C]0.0317[/C][C]0.0314[/C][C]0.5614[/C][C]16.7158[/C][C]4.0885[/C][C]-0.0932[/C][C]0.4362[/C][/ROW]
[ROW][C]207[/C][C]0.0545[/C][C]0.0253[/C][C]0.0308[/C][C]0.0305[/C][C]9.9372[/C][C]15.7474[/C][C]3.9683[/C][C]0.3923[/C][C]0.4299[/C][/ROW]
[ROW][C]208[/C][C]0.0578[/C][C]-0.0696[/C][C]0.0356[/C][C]0.0351[/C][C]52.6002[/C][C]20.354[/C][C]4.5115[/C][C]-0.9025[/C][C]0.489[/C][/ROW]
[ROW][C]209[/C][C]0.0609[/C][C]-0.0043[/C][C]0.0322[/C][C]0.0317[/C][C]0.2228[/C][C]18.1172[/C][C]4.2564[/C][C]-0.0587[/C][C]0.4412[/C][/ROW]
[ROW][C]210[/C][C]0.0625[/C][C]0.0033[/C][C]0.0293[/C][C]0.0289[/C][C]0.1528[/C][C]16.3208[/C][C]4.0399[/C][C]0.0486[/C][C]0.4019[/C][/ROW]
[ROW][C]211[/C][C]0.0674[/C][C]-0.0075[/C][C]0.0273[/C][C]0.0269[/C][C]0.5813[/C][C]14.8899[/C][C]3.8587[/C][C]-0.0949[/C][C]0.374[/C][/ROW]
[ROW][C]212[/C][C]0.0703[/C][C]0.0285[/C][C]0.0274[/C][C]0.0271[/C][C]8.9906[/C][C]14.3983[/C][C]3.7945[/C][C]0.3731[/C][C]0.3739[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310169&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310169&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.0353-0.0310.0310.030512.257100-0.43560.4356
2020.0366-0.06430.04760.046448.800830.5295.5253-0.86930.6525
2030.0393-0.03090.04210.041111.331524.12984.9122-0.41890.5746
2040.04760.04430.04260.042125.414224.45094.94480.62730.5878
2050.0492-0.0130.03670.03631.929519.94664.4662-0.17280.5048
2060.0521-0.00680.03170.03140.561416.71584.0885-0.09320.4362
2070.05450.02530.03080.03059.937215.74743.96830.39230.4299
2080.0578-0.06960.03560.035152.600220.3544.5115-0.90250.489
2090.0609-0.00430.03220.03170.222818.11724.2564-0.05870.4412
2100.06250.00330.02930.02890.152816.32084.03990.04860.4019
2110.0674-0.00750.02730.02690.581314.88993.8587-0.09490.374
2120.07030.02850.02740.02718.990614.39833.79450.37310.3739



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