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 computationTue, 19 Dec 2017 14:18:46 +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/19/t1513689595zukaucvqp47yz0y.htm/, Retrieved Fri, 01 Nov 2024 00:37:42 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310338, Retrieved Fri, 01 Nov 2024 00:37:42 +0000
QR Codes:

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

Post a new message
Dataseries X:
78
100.1
113.2
93.1
115.4
103.3
45.1
104.7
111.3
111.5
100.9
82.1
85.4
97.7
106.6
92.6
109.2
110
52.5
105.3
102.3
118.5
100
74.4
89.2
91.9
107
103.6
101.8
105.1
55.5
92.1
109.8
112.7
98.5
70.3
84.5
91.1
107.6
102.2
96
107.3
59.9
90.2
116.3
115.6
92
76.5
87.9
95.8
116.9
102.9
95.8
117.3
52.8
100.1
116.3
111.8
98.5
86.2
79.9
92.3
100.5
112.5
101.1
121.5
49.6
104.8
120.4
108.3
105.2
85.7
86.8
95.1
117
100.1
112.3
119.6
51.8
105.5
119.9
115.4
112.8
85.1
96.2
103.6
119.9
103.7
109
119.6
57
109.2
112.6
126
109.7
80.1
105.8
114.1
98.3
125.3
111.6
119.7
65
99
124.5
119
98.8
81.8
90.3
102
119.3
104.3
102.8
118.8
60.9
101
122.6
122.2
95
75.6
83.1
89.8
126.1
108.6
98.9
124.3
56.8
102.7
121.7
118.2
101
69
88.6
109.6
128.2
102
122.7
110.5
54
108.1
125
114.1
112.4
87.3
95.4
96.9
125.8
102
112.5
118.9
62.7
110
114.7
124.4
111.9
77
84.1
96.5
106.8
107.9
107.5
114.3
66.6
97.9
117.8
123.8
103.3
84.2
103.6
103.6
112.2
102.7
100.8
109.4
63.5
92.3
119.2
121.5
97.6
78.3
95.6
97.9
114.4
100.9
94.4
117.2
61
95.8
116.2
118.5
94.3
74.4
94.9
102
102.9
109.5
99.7
118.3
56.2
100.3
116.9
108.7
93.9
85.3
85.3
102.4
121.6
91.4
110.2
112.7
55.7
100.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=310338&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=310338&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310338&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])
18895.8-------
189116.2-------
190118.5-------
19194.3-------
19274.4-------
19394.9-------
194102-------
195102.9-------
196109.5-------
19799.7-------
198118.3-------
19956.2-------
200100.3-------
201116.9116.4845103.3747129.59440.47520.99220.5170.9922
202108.7118.0413104.8571131.22560.08250.56740.47280.9958
20393.998.695185.51111.88020.2380.06850.74320.4057
20485.377.266764.081790.45160.11620.00670.6653e-04
20585.392.093778.9229105.26450.1560.8440.33810.111
206102.4100.313287.1425113.4840.37810.98730.40090.5008
207121.6108.820395.6495121.99110.02860.83030.81080.8976
20891.4106.432193.2613119.60290.01260.0120.3240.8193
209110.2103.06389.8922116.23370.14410.95870.69160.6595
210112.7116.3033103.1325129.47410.29590.81810.38320.9914
21155.756.717443.546669.88820.439800.53070
212100.1100.784987.6141113.95570.459410.52880.5288

\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 & 95.8 & - & - & - & - & - & - & - \tabularnewline
189 & 116.2 & - & - & - & - & - & - & - \tabularnewline
190 & 118.5 & - & - & - & - & - & - & - \tabularnewline
191 & 94.3 & - & - & - & - & - & - & - \tabularnewline
192 & 74.4 & - & - & - & - & - & - & - \tabularnewline
193 & 94.9 & - & - & - & - & - & - & - \tabularnewline
194 & 102 & - & - & - & - & - & - & - \tabularnewline
195 & 102.9 & - & - & - & - & - & - & - \tabularnewline
196 & 109.5 & - & - & - & - & - & - & - \tabularnewline
197 & 99.7 & - & - & - & - & - & - & - \tabularnewline
198 & 118.3 & - & - & - & - & - & - & - \tabularnewline
199 & 56.2 & - & - & - & - & - & - & - \tabularnewline
200 & 100.3 & - & - & - & - & - & - & - \tabularnewline
201 & 116.9 & 116.4845 & 103.3747 & 129.5944 & 0.4752 & 0.9922 & 0.517 & 0.9922 \tabularnewline
202 & 108.7 & 118.0413 & 104.8571 & 131.2256 & 0.0825 & 0.5674 & 0.4728 & 0.9958 \tabularnewline
203 & 93.9 & 98.6951 & 85.51 & 111.8802 & 0.238 & 0.0685 & 0.7432 & 0.4057 \tabularnewline
204 & 85.3 & 77.2667 & 64.0817 & 90.4516 & 0.1162 & 0.0067 & 0.665 & 3e-04 \tabularnewline
205 & 85.3 & 92.0937 & 78.9229 & 105.2645 & 0.156 & 0.844 & 0.3381 & 0.111 \tabularnewline
206 & 102.4 & 100.3132 & 87.1425 & 113.484 & 0.3781 & 0.9873 & 0.4009 & 0.5008 \tabularnewline
207 & 121.6 & 108.8203 & 95.6495 & 121.9911 & 0.0286 & 0.8303 & 0.8108 & 0.8976 \tabularnewline
208 & 91.4 & 106.4321 & 93.2613 & 119.6029 & 0.0126 & 0.012 & 0.324 & 0.8193 \tabularnewline
209 & 110.2 & 103.063 & 89.8922 & 116.2337 & 0.1441 & 0.9587 & 0.6916 & 0.6595 \tabularnewline
210 & 112.7 & 116.3033 & 103.1325 & 129.4741 & 0.2959 & 0.8181 & 0.3832 & 0.9914 \tabularnewline
211 & 55.7 & 56.7174 & 43.5466 & 69.8882 & 0.4398 & 0 & 0.5307 & 0 \tabularnewline
212 & 100.1 & 100.7849 & 87.6141 & 113.9557 & 0.4594 & 1 & 0.5288 & 0.5288 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310338&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]95.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]118.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]94.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]74.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]94.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]102.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]109.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]99.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]118.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]56.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]100.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]116.9[/C][C]116.4845[/C][C]103.3747[/C][C]129.5944[/C][C]0.4752[/C][C]0.9922[/C][C]0.517[/C][C]0.9922[/C][/ROW]
[ROW][C]202[/C][C]108.7[/C][C]118.0413[/C][C]104.8571[/C][C]131.2256[/C][C]0.0825[/C][C]0.5674[/C][C]0.4728[/C][C]0.9958[/C][/ROW]
[ROW][C]203[/C][C]93.9[/C][C]98.6951[/C][C]85.51[/C][C]111.8802[/C][C]0.238[/C][C]0.0685[/C][C]0.7432[/C][C]0.4057[/C][/ROW]
[ROW][C]204[/C][C]85.3[/C][C]77.2667[/C][C]64.0817[/C][C]90.4516[/C][C]0.1162[/C][C]0.0067[/C][C]0.665[/C][C]3e-04[/C][/ROW]
[ROW][C]205[/C][C]85.3[/C][C]92.0937[/C][C]78.9229[/C][C]105.2645[/C][C]0.156[/C][C]0.844[/C][C]0.3381[/C][C]0.111[/C][/ROW]
[ROW][C]206[/C][C]102.4[/C][C]100.3132[/C][C]87.1425[/C][C]113.484[/C][C]0.3781[/C][C]0.9873[/C][C]0.4009[/C][C]0.5008[/C][/ROW]
[ROW][C]207[/C][C]121.6[/C][C]108.8203[/C][C]95.6495[/C][C]121.9911[/C][C]0.0286[/C][C]0.8303[/C][C]0.8108[/C][C]0.8976[/C][/ROW]
[ROW][C]208[/C][C]91.4[/C][C]106.4321[/C][C]93.2613[/C][C]119.6029[/C][C]0.0126[/C][C]0.012[/C][C]0.324[/C][C]0.8193[/C][/ROW]
[ROW][C]209[/C][C]110.2[/C][C]103.063[/C][C]89.8922[/C][C]116.2337[/C][C]0.1441[/C][C]0.9587[/C][C]0.6916[/C][C]0.6595[/C][/ROW]
[ROW][C]210[/C][C]112.7[/C][C]116.3033[/C][C]103.1325[/C][C]129.4741[/C][C]0.2959[/C][C]0.8181[/C][C]0.3832[/C][C]0.9914[/C][/ROW]
[ROW][C]211[/C][C]55.7[/C][C]56.7174[/C][C]43.5466[/C][C]69.8882[/C][C]0.4398[/C][C]0[/C][C]0.5307[/C][C]0[/C][/ROW]
[ROW][C]212[/C][C]100.1[/C][C]100.7849[/C][C]87.6141[/C][C]113.9557[/C][C]0.4594[/C][C]1[/C][C]0.5288[/C][C]0.5288[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310338&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310338&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])
18895.8-------
189116.2-------
190118.5-------
19194.3-------
19274.4-------
19394.9-------
194102-------
195102.9-------
196109.5-------
19799.7-------
198118.3-------
19956.2-------
200100.3-------
201116.9116.4845103.3747129.59440.47520.99220.5170.9922
202108.7118.0413104.8571131.22560.08250.56740.47280.9958
20393.998.695185.51111.88020.2380.06850.74320.4057
20485.377.266764.081790.45160.11620.00670.6653e-04
20585.392.093778.9229105.26450.1560.8440.33810.111
206102.4100.313287.1425113.4840.37810.98730.40090.5008
207121.6108.820395.6495121.99110.02860.83030.81080.8976
20891.4106.432193.2613119.60290.01260.0120.3240.8193
209110.2103.06389.8922116.23370.14410.95870.69160.6595
210112.7116.3033103.1325129.47410.29590.81810.38320.9914
21155.756.717443.546669.88820.439800.53070
212100.1100.784987.6141113.95570.459410.52880.5288







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.05740.00360.00360.00360.1726000.02070.0207
2020.057-0.08590.04470.04387.260343.71656.6118-0.46540.243
2030.0682-0.05110.04690.045322.993136.80876.067-0.23890.2417
2040.08710.09420.05870.058664.533943.746.61360.40020.2813
2050.073-0.07960.06290.062246.154244.22286.65-0.33850.2927
2060.0670.02040.05580.05534.354537.57816.13010.1040.2613
2070.06180.10510.06280.0632163.321155.54147.45260.63670.3149
2080.0631-0.16450.07550.0743225.962876.84418.7661-0.74890.3691
2090.06520.06480.07430.073550.937573.96568.60030.35560.3676
2100.0578-0.0320.07010.069312.983667.86748.2382-0.17950.3488
2110.1185-0.01830.06540.06471.035161.79177.8608-0.05070.3217
2120.0667-0.00680.06050.05980.469156.68157.5287-0.03410.2978

\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.0574 & 0.0036 & 0.0036 & 0.0036 & 0.1726 & 0 & 0 & 0.0207 & 0.0207 \tabularnewline
202 & 0.057 & -0.0859 & 0.0447 & 0.043 & 87.2603 & 43.7165 & 6.6118 & -0.4654 & 0.243 \tabularnewline
203 & 0.0682 & -0.0511 & 0.0469 & 0.0453 & 22.9931 & 36.8087 & 6.067 & -0.2389 & 0.2417 \tabularnewline
204 & 0.0871 & 0.0942 & 0.0587 & 0.0586 & 64.5339 & 43.74 & 6.6136 & 0.4002 & 0.2813 \tabularnewline
205 & 0.073 & -0.0796 & 0.0629 & 0.0622 & 46.1542 & 44.2228 & 6.65 & -0.3385 & 0.2927 \tabularnewline
206 & 0.067 & 0.0204 & 0.0558 & 0.0553 & 4.3545 & 37.5781 & 6.1301 & 0.104 & 0.2613 \tabularnewline
207 & 0.0618 & 0.1051 & 0.0628 & 0.0632 & 163.3211 & 55.5414 & 7.4526 & 0.6367 & 0.3149 \tabularnewline
208 & 0.0631 & -0.1645 & 0.0755 & 0.0743 & 225.9628 & 76.8441 & 8.7661 & -0.7489 & 0.3691 \tabularnewline
209 & 0.0652 & 0.0648 & 0.0743 & 0.0735 & 50.9375 & 73.9656 & 8.6003 & 0.3556 & 0.3676 \tabularnewline
210 & 0.0578 & -0.032 & 0.0701 & 0.0693 & 12.9836 & 67.8674 & 8.2382 & -0.1795 & 0.3488 \tabularnewline
211 & 0.1185 & -0.0183 & 0.0654 & 0.0647 & 1.0351 & 61.7917 & 7.8608 & -0.0507 & 0.3217 \tabularnewline
212 & 0.0667 & -0.0068 & 0.0605 & 0.0598 & 0.4691 & 56.6815 & 7.5287 & -0.0341 & 0.2978 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310338&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.0574[/C][C]0.0036[/C][C]0.0036[/C][C]0.0036[/C][C]0.1726[/C][C]0[/C][C]0[/C][C]0.0207[/C][C]0.0207[/C][/ROW]
[ROW][C]202[/C][C]0.057[/C][C]-0.0859[/C][C]0.0447[/C][C]0.043[/C][C]87.2603[/C][C]43.7165[/C][C]6.6118[/C][C]-0.4654[/C][C]0.243[/C][/ROW]
[ROW][C]203[/C][C]0.0682[/C][C]-0.0511[/C][C]0.0469[/C][C]0.0453[/C][C]22.9931[/C][C]36.8087[/C][C]6.067[/C][C]-0.2389[/C][C]0.2417[/C][/ROW]
[ROW][C]204[/C][C]0.0871[/C][C]0.0942[/C][C]0.0587[/C][C]0.0586[/C][C]64.5339[/C][C]43.74[/C][C]6.6136[/C][C]0.4002[/C][C]0.2813[/C][/ROW]
[ROW][C]205[/C][C]0.073[/C][C]-0.0796[/C][C]0.0629[/C][C]0.0622[/C][C]46.1542[/C][C]44.2228[/C][C]6.65[/C][C]-0.3385[/C][C]0.2927[/C][/ROW]
[ROW][C]206[/C][C]0.067[/C][C]0.0204[/C][C]0.0558[/C][C]0.0553[/C][C]4.3545[/C][C]37.5781[/C][C]6.1301[/C][C]0.104[/C][C]0.2613[/C][/ROW]
[ROW][C]207[/C][C]0.0618[/C][C]0.1051[/C][C]0.0628[/C][C]0.0632[/C][C]163.3211[/C][C]55.5414[/C][C]7.4526[/C][C]0.6367[/C][C]0.3149[/C][/ROW]
[ROW][C]208[/C][C]0.0631[/C][C]-0.1645[/C][C]0.0755[/C][C]0.0743[/C][C]225.9628[/C][C]76.8441[/C][C]8.7661[/C][C]-0.7489[/C][C]0.3691[/C][/ROW]
[ROW][C]209[/C][C]0.0652[/C][C]0.0648[/C][C]0.0743[/C][C]0.0735[/C][C]50.9375[/C][C]73.9656[/C][C]8.6003[/C][C]0.3556[/C][C]0.3676[/C][/ROW]
[ROW][C]210[/C][C]0.0578[/C][C]-0.032[/C][C]0.0701[/C][C]0.0693[/C][C]12.9836[/C][C]67.8674[/C][C]8.2382[/C][C]-0.1795[/C][C]0.3488[/C][/ROW]
[ROW][C]211[/C][C]0.1185[/C][C]-0.0183[/C][C]0.0654[/C][C]0.0647[/C][C]1.0351[/C][C]61.7917[/C][C]7.8608[/C][C]-0.0507[/C][C]0.3217[/C][/ROW]
[ROW][C]212[/C][C]0.0667[/C][C]-0.0068[/C][C]0.0605[/C][C]0.0598[/C][C]0.4691[/C][C]56.6815[/C][C]7.5287[/C][C]-0.0341[/C][C]0.2978[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310338&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310338&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.05740.00360.00360.00360.1726000.02070.0207
2020.057-0.08590.04470.04387.260343.71656.6118-0.46540.243
2030.0682-0.05110.04690.045322.993136.80876.067-0.23890.2417
2040.08710.09420.05870.058664.533943.746.61360.40020.2813
2050.073-0.07960.06290.062246.154244.22286.65-0.33850.2927
2060.0670.02040.05580.05534.354537.57816.13010.1040.2613
2070.06180.10510.06280.0632163.321155.54147.45260.63670.3149
2080.0631-0.16450.07550.0743225.962876.84418.7661-0.74890.3691
2090.06520.06480.07430.073550.937573.96568.60030.35560.3676
2100.0578-0.0320.07010.069312.983667.86748.2382-0.17950.3488
2110.1185-0.01830.06540.06471.035161.79177.8608-0.05070.3217
2120.0667-0.00680.06050.05980.469156.68157.5287-0.03410.2978



Parameters (Session):
par1 = 8 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = 0 ; par5 = 0 ; par6 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; 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')