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, 06 Dec 2017 20:57:49 +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/06/t1512590411q5tcc7e5nqj7gbd.htm/, Retrieved Mon, 13 May 2024 22:25:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=308641, Retrieved Mon, 13 May 2024 22:25:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact61
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2017-12-06 19:57:49] [f1ade19563a25eb31edff11eb9af1158] [Current]
Feedback Forum

Post a new message
Dataseries X:
72.9
85
98.8
86.3
101.9
95.1
71.6
84.4
97.5
100.7
92.9
74.4
81.4
84
95.9
86.8
98.9
101.3
74.5
86
92.6
103.5
90
68
79.7
81.2
91.8
96.5
93.2
98.9
79.2
79.2
99.4
105
88.3
65.3
78.1
82.3
93.8
96
89.2
99.2
81.7
76
101.1
103.5
84.5
74
78.3
83
100.9
95.4
89
109.5
77.5
83.4
104.6
101.4
93
81.7
80
85.5
95.2
102.7
96.2
113.8
76.8
88.9
109.2
101.4
99.1
84.1
87.9
90
108.5
99.5
111.3
117.5
82.7
94.9
115.2
116.6
110.1
88.5
100.1
102.9
120.1
108.2
114.4
123.5
92.3
101.1
114.8
127
112.4
85.3
109.2
113.7
110.4
127.3
117.4
124.6
100.7
93.5
124.5
121.7
98
81.6
82.7
86.8
104
99.4
94.9
110
85.2
85.7
112.4
110.9
95.7
77.1
80.2
84.5
112.8
107.3
100.6
123
89.1
93.9
115.9
113.1
102.4
77.2
91.7
99.7
120.9
104.7
120.3
112.1
83.7
98.1
119.1
108.5
108.5
86
91.2
92
113.9
100.7
107.3
115
87.6
95.9
106.9
113.9
101.9
75.8
83.6
88.7
97.9
105.6
105.2
111.1
92.5
88.3
107
112.7
95.5
78.7
93.2
91.5
102.8
107
98.5
108.8
90.9
85.6
111.9
111.9
93.3
77.8
88.4
92.7
109.6
103.4
96.5
117.5
90.7
86.7
107.5
109.5
94.7
78.7
89.1
97.3
106.6
106.9
102.7
116.3
84.5
92.9
110.7
104.1
99.1
86.9
88.4
97.9
116.9
100.8
112.8
118.8
84.4
95.5




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time6 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 time6 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308641&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]6 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=308641&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308641&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 time6 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])
18886.7-------
189107.5-------
190109.5-------
19194.7-------
19278.7-------
19389.1-------
19497.3-------
195106.6-------
196106.9-------
197102.7-------
198116.3-------
19984.5-------
20092.9-------
201110.7109.9953100.3899120.51970.44780.99930.67890.9993
202104.1110.6695100.8563121.43760.11590.49780.58430.9994
20399.1100.695391.387110.95170.38020.25760.8740.9318
20486.979.842271.330789.36940.073300.59290.0036
20588.487.799778.281298.47570.45610.56560.40570.1745
20697.993.375682.843105.24730.22750.79430.25850.5313
207116.9105.731593.1728119.98290.06230.85930.45250.9612
208100.8104.28891.6684118.64490.3170.04260.36070.94
209112.8105.378492.2492120.37630.16610.72520.63680.9485
210118.8112.484598.0838128.99940.22680.48510.32530.9899
21184.484.204773.242896.80710.487900.48170.0881
21295.591.440479.2895105.45350.28510.83760.41910.4191

\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 & 86.7 & - & - & - & - & - & - & - \tabularnewline
189 & 107.5 & - & - & - & - & - & - & - \tabularnewline
190 & 109.5 & - & - & - & - & - & - & - \tabularnewline
191 & 94.7 & - & - & - & - & - & - & - \tabularnewline
192 & 78.7 & - & - & - & - & - & - & - \tabularnewline
193 & 89.1 & - & - & - & - & - & - & - \tabularnewline
194 & 97.3 & - & - & - & - & - & - & - \tabularnewline
195 & 106.6 & - & - & - & - & - & - & - \tabularnewline
196 & 106.9 & - & - & - & - & - & - & - \tabularnewline
197 & 102.7 & - & - & - & - & - & - & - \tabularnewline
198 & 116.3 & - & - & - & - & - & - & - \tabularnewline
199 & 84.5 & - & - & - & - & - & - & - \tabularnewline
200 & 92.9 & - & - & - & - & - & - & - \tabularnewline
201 & 110.7 & 109.9953 & 100.3899 & 120.5197 & 0.4478 & 0.9993 & 0.6789 & 0.9993 \tabularnewline
202 & 104.1 & 110.6695 & 100.8563 & 121.4376 & 0.1159 & 0.4978 & 0.5843 & 0.9994 \tabularnewline
203 & 99.1 & 100.6953 & 91.387 & 110.9517 & 0.3802 & 0.2576 & 0.874 & 0.9318 \tabularnewline
204 & 86.9 & 79.8422 & 71.3307 & 89.3694 & 0.0733 & 0 & 0.5929 & 0.0036 \tabularnewline
205 & 88.4 & 87.7997 & 78.2812 & 98.4757 & 0.4561 & 0.5656 & 0.4057 & 0.1745 \tabularnewline
206 & 97.9 & 93.3756 & 82.843 & 105.2473 & 0.2275 & 0.7943 & 0.2585 & 0.5313 \tabularnewline
207 & 116.9 & 105.7315 & 93.1728 & 119.9829 & 0.0623 & 0.8593 & 0.4525 & 0.9612 \tabularnewline
208 & 100.8 & 104.288 & 91.6684 & 118.6449 & 0.317 & 0.0426 & 0.3607 & 0.94 \tabularnewline
209 & 112.8 & 105.3784 & 92.2492 & 120.3763 & 0.1661 & 0.7252 & 0.6368 & 0.9485 \tabularnewline
210 & 118.8 & 112.4845 & 98.0838 & 128.9994 & 0.2268 & 0.4851 & 0.3253 & 0.9899 \tabularnewline
211 & 84.4 & 84.2047 & 73.2428 & 96.8071 & 0.4879 & 0 & 0.4817 & 0.0881 \tabularnewline
212 & 95.5 & 91.4404 & 79.2895 & 105.4535 & 0.2851 & 0.8376 & 0.4191 & 0.4191 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308641&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]86.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]107.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]109.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]94.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]78.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]89.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]97.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]106.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]106.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]102.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]116.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]84.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]92.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]110.7[/C][C]109.9953[/C][C]100.3899[/C][C]120.5197[/C][C]0.4478[/C][C]0.9993[/C][C]0.6789[/C][C]0.9993[/C][/ROW]
[ROW][C]202[/C][C]104.1[/C][C]110.6695[/C][C]100.8563[/C][C]121.4376[/C][C]0.1159[/C][C]0.4978[/C][C]0.5843[/C][C]0.9994[/C][/ROW]
[ROW][C]203[/C][C]99.1[/C][C]100.6953[/C][C]91.387[/C][C]110.9517[/C][C]0.3802[/C][C]0.2576[/C][C]0.874[/C][C]0.9318[/C][/ROW]
[ROW][C]204[/C][C]86.9[/C][C]79.8422[/C][C]71.3307[/C][C]89.3694[/C][C]0.0733[/C][C]0[/C][C]0.5929[/C][C]0.0036[/C][/ROW]
[ROW][C]205[/C][C]88.4[/C][C]87.7997[/C][C]78.2812[/C][C]98.4757[/C][C]0.4561[/C][C]0.5656[/C][C]0.4057[/C][C]0.1745[/C][/ROW]
[ROW][C]206[/C][C]97.9[/C][C]93.3756[/C][C]82.843[/C][C]105.2473[/C][C]0.2275[/C][C]0.7943[/C][C]0.2585[/C][C]0.5313[/C][/ROW]
[ROW][C]207[/C][C]116.9[/C][C]105.7315[/C][C]93.1728[/C][C]119.9829[/C][C]0.0623[/C][C]0.8593[/C][C]0.4525[/C][C]0.9612[/C][/ROW]
[ROW][C]208[/C][C]100.8[/C][C]104.288[/C][C]91.6684[/C][C]118.6449[/C][C]0.317[/C][C]0.0426[/C][C]0.3607[/C][C]0.94[/C][/ROW]
[ROW][C]209[/C][C]112.8[/C][C]105.3784[/C][C]92.2492[/C][C]120.3763[/C][C]0.1661[/C][C]0.7252[/C][C]0.6368[/C][C]0.9485[/C][/ROW]
[ROW][C]210[/C][C]118.8[/C][C]112.4845[/C][C]98.0838[/C][C]128.9994[/C][C]0.2268[/C][C]0.4851[/C][C]0.3253[/C][C]0.9899[/C][/ROW]
[ROW][C]211[/C][C]84.4[/C][C]84.2047[/C][C]73.2428[/C][C]96.8071[/C][C]0.4879[/C][C]0[/C][C]0.4817[/C][C]0.0881[/C][/ROW]
[ROW][C]212[/C][C]95.5[/C][C]91.4404[/C][C]79.2895[/C][C]105.4535[/C][C]0.2851[/C][C]0.8376[/C][C]0.4191[/C][C]0.4191[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308641&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308641&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])
18886.7-------
189107.5-------
190109.5-------
19194.7-------
19278.7-------
19389.1-------
19497.3-------
195106.6-------
196106.9-------
197102.7-------
198116.3-------
19984.5-------
20092.9-------
201110.7109.9953100.3899120.51970.44780.99930.67890.9993
202104.1110.6695100.8563121.43760.11590.49780.58430.9994
20399.1100.695391.387110.95170.38020.25760.8740.9318
20486.979.842271.330789.36940.073300.59290.0036
20588.487.799778.281298.47570.45610.56560.40570.1745
20697.993.375682.843105.24730.22750.79430.25850.5313
207116.9105.731593.1728119.98290.06230.85930.45250.9612
208100.8104.28891.6684118.64490.3170.04260.36070.94
209112.8105.378492.2492120.37630.16610.72520.63680.9485
210118.8112.484598.0838128.99940.22680.48510.32530.9899
21184.484.204773.242896.80710.487900.48170.0881
21295.591.440479.2895105.45350.28510.83760.41910.4191







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.04880.00640.00640.00640.4966000.05810.0581
2020.0496-0.06310.03470.033843.158521.82764.672-0.54170.2999
2030.052-0.01610.02850.02782.54515.43.9243-0.13150.2438
2040.06090.08120.04170.04249.812224.00314.89930.5820.3283
2050.0620.00680.03470.0350.360319.27454.39030.04950.2726
2060.06490.04620.03660.037120.470319.47384.41290.37310.2893
2070.06880.09550.0450.0461124.735834.51125.87460.92090.3796
2080.0702-0.03460.04370.044612.166131.71815.6319-0.28760.3681
2090.07260.06580.04620.047255.079734.31385.85780.6120.3952
2100.07490.05320.04690.047939.886234.87115.90520.52080.4077
2110.07640.00230.04280.04380.038231.70445.63070.01610.3721
2120.07820.04250.04280.043816.480330.43585.51690.33470.369

\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.0488 & 0.0064 & 0.0064 & 0.0064 & 0.4966 & 0 & 0 & 0.0581 & 0.0581 \tabularnewline
202 & 0.0496 & -0.0631 & 0.0347 & 0.0338 & 43.1585 & 21.8276 & 4.672 & -0.5417 & 0.2999 \tabularnewline
203 & 0.052 & -0.0161 & 0.0285 & 0.0278 & 2.545 & 15.4 & 3.9243 & -0.1315 & 0.2438 \tabularnewline
204 & 0.0609 & 0.0812 & 0.0417 & 0.042 & 49.8122 & 24.0031 & 4.8993 & 0.582 & 0.3283 \tabularnewline
205 & 0.062 & 0.0068 & 0.0347 & 0.035 & 0.3603 & 19.2745 & 4.3903 & 0.0495 & 0.2726 \tabularnewline
206 & 0.0649 & 0.0462 & 0.0366 & 0.0371 & 20.4703 & 19.4738 & 4.4129 & 0.3731 & 0.2893 \tabularnewline
207 & 0.0688 & 0.0955 & 0.045 & 0.0461 & 124.7358 & 34.5112 & 5.8746 & 0.9209 & 0.3796 \tabularnewline
208 & 0.0702 & -0.0346 & 0.0437 & 0.0446 & 12.1661 & 31.7181 & 5.6319 & -0.2876 & 0.3681 \tabularnewline
209 & 0.0726 & 0.0658 & 0.0462 & 0.0472 & 55.0797 & 34.3138 & 5.8578 & 0.612 & 0.3952 \tabularnewline
210 & 0.0749 & 0.0532 & 0.0469 & 0.0479 & 39.8862 & 34.8711 & 5.9052 & 0.5208 & 0.4077 \tabularnewline
211 & 0.0764 & 0.0023 & 0.0428 & 0.0438 & 0.0382 & 31.7044 & 5.6307 & 0.0161 & 0.3721 \tabularnewline
212 & 0.0782 & 0.0425 & 0.0428 & 0.0438 & 16.4803 & 30.4358 & 5.5169 & 0.3347 & 0.369 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308641&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.0488[/C][C]0.0064[/C][C]0.0064[/C][C]0.0064[/C][C]0.4966[/C][C]0[/C][C]0[/C][C]0.0581[/C][C]0.0581[/C][/ROW]
[ROW][C]202[/C][C]0.0496[/C][C]-0.0631[/C][C]0.0347[/C][C]0.0338[/C][C]43.1585[/C][C]21.8276[/C][C]4.672[/C][C]-0.5417[/C][C]0.2999[/C][/ROW]
[ROW][C]203[/C][C]0.052[/C][C]-0.0161[/C][C]0.0285[/C][C]0.0278[/C][C]2.545[/C][C]15.4[/C][C]3.9243[/C][C]-0.1315[/C][C]0.2438[/C][/ROW]
[ROW][C]204[/C][C]0.0609[/C][C]0.0812[/C][C]0.0417[/C][C]0.042[/C][C]49.8122[/C][C]24.0031[/C][C]4.8993[/C][C]0.582[/C][C]0.3283[/C][/ROW]
[ROW][C]205[/C][C]0.062[/C][C]0.0068[/C][C]0.0347[/C][C]0.035[/C][C]0.3603[/C][C]19.2745[/C][C]4.3903[/C][C]0.0495[/C][C]0.2726[/C][/ROW]
[ROW][C]206[/C][C]0.0649[/C][C]0.0462[/C][C]0.0366[/C][C]0.0371[/C][C]20.4703[/C][C]19.4738[/C][C]4.4129[/C][C]0.3731[/C][C]0.2893[/C][/ROW]
[ROW][C]207[/C][C]0.0688[/C][C]0.0955[/C][C]0.045[/C][C]0.0461[/C][C]124.7358[/C][C]34.5112[/C][C]5.8746[/C][C]0.9209[/C][C]0.3796[/C][/ROW]
[ROW][C]208[/C][C]0.0702[/C][C]-0.0346[/C][C]0.0437[/C][C]0.0446[/C][C]12.1661[/C][C]31.7181[/C][C]5.6319[/C][C]-0.2876[/C][C]0.3681[/C][/ROW]
[ROW][C]209[/C][C]0.0726[/C][C]0.0658[/C][C]0.0462[/C][C]0.0472[/C][C]55.0797[/C][C]34.3138[/C][C]5.8578[/C][C]0.612[/C][C]0.3952[/C][/ROW]
[ROW][C]210[/C][C]0.0749[/C][C]0.0532[/C][C]0.0469[/C][C]0.0479[/C][C]39.8862[/C][C]34.8711[/C][C]5.9052[/C][C]0.5208[/C][C]0.4077[/C][/ROW]
[ROW][C]211[/C][C]0.0764[/C][C]0.0023[/C][C]0.0428[/C][C]0.0438[/C][C]0.0382[/C][C]31.7044[/C][C]5.6307[/C][C]0.0161[/C][C]0.3721[/C][/ROW]
[ROW][C]212[/C][C]0.0782[/C][C]0.0425[/C][C]0.0428[/C][C]0.0438[/C][C]16.4803[/C][C]30.4358[/C][C]5.5169[/C][C]0.3347[/C][C]0.369[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308641&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308641&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.04880.00640.00640.00640.4966000.05810.0581
2020.0496-0.06310.03470.033843.158521.82764.672-0.54170.2999
2030.052-0.01610.02850.02782.54515.43.9243-0.13150.2438
2040.06090.08120.04170.04249.812224.00314.89930.5820.3283
2050.0620.00680.03470.0350.360319.27454.39030.04950.2726
2060.06490.04620.03660.037120.470319.47384.41290.37310.2893
2070.06880.09550.0450.0461124.735834.51125.87460.92090.3796
2080.0702-0.03460.04370.044612.166131.71815.6319-0.28760.3681
2090.07260.06580.04620.047255.079734.31385.85780.6120.3952
2100.07490.05320.04690.047939.886234.87115.90520.52080.4077
2110.07640.00230.04280.04380.038231.70445.63070.01610.3721
2120.07820.04250.04280.043816.480330.43585.51690.33470.369



Parameters (Session):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par10 <- 'FALSE'
par9 <- '1'
par8 <- '2'
par7 <- '1'
par6 <- '3'
par5 <- '12'
par4 <- '1'
par3 <- '0'
par2 <- '0.0'
par1 <- '12'
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')