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 computationThu, 21 Dec 2017 12:19:40 +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/21/t15138554381le2jx168ig1k2v.htm/, Retrieved Tue, 14 May 2024 01:01:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310618, Retrieved Tue, 14 May 2024 01:01:59 +0000
QR Codes:

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

Post a new message
Dataseries X:
58.5
59.8
64.6
62.2
68
64.3
58.9
64.8
67.5
76.2
73.7
70.4
67.7
63.7
72.4
66
70.1
70.4
66.6
72.6
74
79
76.1
72.3
71.6
67.2
73.8
70.8
71.4
70.4
70.7
70.6
75.5
82.1
74.3
76.3
74.5
71.1
73.3
73.8
69
71.1
71.9
69
77.3
82.8
74
77.6
72.3
70.7
81
76.4
72.3
79.5
73.3
74.5
82.7
83.8
81.6
85.5
76.7
71.8
80.2
76.8
76.1
80.7
71.3
80.9
85
84.5
87.7
87.7
80.2
74.4
85.8
77
84.5
83.6
77.7
85.7
87.9
93.7
92.3
87
89.1
81.3
92.7
83.9
87.3
89.1
86.9
91.7
93
105.3
101.6
94.2
100.5
95.8
95.8
102.1
96
96.8
98.9
93.4
105.5
110.9
98.6
102.6
93.5
90.8
99.7
97.8
91.1
98.1
96
93.5
101.2
105.2
98.9
101.3
92.1
90.6
105.4
98.4
92.7
101.2
93.4
98.3
104.3
107
107.7
108.9
99.6
96.1
109
99.5
104.6
99.9
94.1
105.3
110.4
110.5
110
108.5
104.3
101.2
109.2
99.6
105.6
106.2
102.2
107.5
105.8
120.5
113.2
104.3
107.7
99.2
105.1
104.3
106.1
100.8
106.7
101.6
104.4
114.8
105.4
104
102
96.5
102.3
105.3
101.9
102.2
102.8
100.4
110.7
116.4
106
109.2
103
99.8
109.8
107.3
101.2
111.8
106.9
103.5
113.1
119.4
113.3
115
104.7
107.2
116.6
111.3
111.4
115
102.4
111.4
113.2
112.9
114.2
115.6
107.1
102.3
117.9
105.8
114.3
113.1
102.9
112.2




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310618&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 time9 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])
188103.5-------
189113.1-------
190119.4-------
191113.3-------
192115-------
193104.7-------
194107.2-------
195116.6-------
196111.3-------
197111.4-------
198115-------
199102.4-------
200111.4-------
201113.2115.5977109.92121.41840.20970.92120.79980.9212
202112.9119.2782113.4414125.26140.01830.97680.48410.9951
203114.2118.785112.7005125.02950.07510.96760.95740.9898
204115.6116.2457109.1444123.57080.43140.70790.63060.9026
205107.1110.058103.0041117.34540.21310.0680.92520.3591
206102.3108.3152100.9812115.90640.06020.62320.61330.2129
207117.9116.551108.4016124.99560.37710.99950.49550.8841
208105.8111.2798103.1094119.76170.10270.0630.49810.4889
209114.3113.7792105.1813122.71490.45450.960.69910.6991
210113.1112.7423103.8276122.0240.46990.37110.31680.6116
211102.9107.339998.4129116.65440.17510.11270.85070.1965
212112.2113.9197104.4168123.83630.3670.98530.69080.6908

\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 & 103.5 & - & - & - & - & - & - & - \tabularnewline
189 & 113.1 & - & - & - & - & - & - & - \tabularnewline
190 & 119.4 & - & - & - & - & - & - & - \tabularnewline
191 & 113.3 & - & - & - & - & - & - & - \tabularnewline
192 & 115 & - & - & - & - & - & - & - \tabularnewline
193 & 104.7 & - & - & - & - & - & - & - \tabularnewline
194 & 107.2 & - & - & - & - & - & - & - \tabularnewline
195 & 116.6 & - & - & - & - & - & - & - \tabularnewline
196 & 111.3 & - & - & - & - & - & - & - \tabularnewline
197 & 111.4 & - & - & - & - & - & - & - \tabularnewline
198 & 115 & - & - & - & - & - & - & - \tabularnewline
199 & 102.4 & - & - & - & - & - & - & - \tabularnewline
200 & 111.4 & - & - & - & - & - & - & - \tabularnewline
201 & 113.2 & 115.5977 & 109.92 & 121.4184 & 0.2097 & 0.9212 & 0.7998 & 0.9212 \tabularnewline
202 & 112.9 & 119.2782 & 113.4414 & 125.2614 & 0.0183 & 0.9768 & 0.4841 & 0.9951 \tabularnewline
203 & 114.2 & 118.785 & 112.7005 & 125.0295 & 0.0751 & 0.9676 & 0.9574 & 0.9898 \tabularnewline
204 & 115.6 & 116.2457 & 109.1444 & 123.5708 & 0.4314 & 0.7079 & 0.6306 & 0.9026 \tabularnewline
205 & 107.1 & 110.058 & 103.0041 & 117.3454 & 0.2131 & 0.068 & 0.9252 & 0.3591 \tabularnewline
206 & 102.3 & 108.3152 & 100.9812 & 115.9064 & 0.0602 & 0.6232 & 0.6133 & 0.2129 \tabularnewline
207 & 117.9 & 116.551 & 108.4016 & 124.9956 & 0.3771 & 0.9995 & 0.4955 & 0.8841 \tabularnewline
208 & 105.8 & 111.2798 & 103.1094 & 119.7617 & 0.1027 & 0.063 & 0.4981 & 0.4889 \tabularnewline
209 & 114.3 & 113.7792 & 105.1813 & 122.7149 & 0.4545 & 0.96 & 0.6991 & 0.6991 \tabularnewline
210 & 113.1 & 112.7423 & 103.8276 & 122.024 & 0.4699 & 0.3711 & 0.3168 & 0.6116 \tabularnewline
211 & 102.9 & 107.3399 & 98.4129 & 116.6544 & 0.1751 & 0.1127 & 0.8507 & 0.1965 \tabularnewline
212 & 112.2 & 113.9197 & 104.4168 & 123.8363 & 0.367 & 0.9853 & 0.6908 & 0.6908 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310618&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]103.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]113.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]119.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]113.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]115[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]104.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]107.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]116.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]111.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]115[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]102.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]113.2[/C][C]115.5977[/C][C]109.92[/C][C]121.4184[/C][C]0.2097[/C][C]0.9212[/C][C]0.7998[/C][C]0.9212[/C][/ROW]
[ROW][C]202[/C][C]112.9[/C][C]119.2782[/C][C]113.4414[/C][C]125.2614[/C][C]0.0183[/C][C]0.9768[/C][C]0.4841[/C][C]0.9951[/C][/ROW]
[ROW][C]203[/C][C]114.2[/C][C]118.785[/C][C]112.7005[/C][C]125.0295[/C][C]0.0751[/C][C]0.9676[/C][C]0.9574[/C][C]0.9898[/C][/ROW]
[ROW][C]204[/C][C]115.6[/C][C]116.2457[/C][C]109.1444[/C][C]123.5708[/C][C]0.4314[/C][C]0.7079[/C][C]0.6306[/C][C]0.9026[/C][/ROW]
[ROW][C]205[/C][C]107.1[/C][C]110.058[/C][C]103.0041[/C][C]117.3454[/C][C]0.2131[/C][C]0.068[/C][C]0.9252[/C][C]0.3591[/C][/ROW]
[ROW][C]206[/C][C]102.3[/C][C]108.3152[/C][C]100.9812[/C][C]115.9064[/C][C]0.0602[/C][C]0.6232[/C][C]0.6133[/C][C]0.2129[/C][/ROW]
[ROW][C]207[/C][C]117.9[/C][C]116.551[/C][C]108.4016[/C][C]124.9956[/C][C]0.3771[/C][C]0.9995[/C][C]0.4955[/C][C]0.8841[/C][/ROW]
[ROW][C]208[/C][C]105.8[/C][C]111.2798[/C][C]103.1094[/C][C]119.7617[/C][C]0.1027[/C][C]0.063[/C][C]0.4981[/C][C]0.4889[/C][/ROW]
[ROW][C]209[/C][C]114.3[/C][C]113.7792[/C][C]105.1813[/C][C]122.7149[/C][C]0.4545[/C][C]0.96[/C][C]0.6991[/C][C]0.6991[/C][/ROW]
[ROW][C]210[/C][C]113.1[/C][C]112.7423[/C][C]103.8276[/C][C]122.024[/C][C]0.4699[/C][C]0.3711[/C][C]0.3168[/C][C]0.6116[/C][/ROW]
[ROW][C]211[/C][C]102.9[/C][C]107.3399[/C][C]98.4129[/C][C]116.6544[/C][C]0.1751[/C][C]0.1127[/C][C]0.8507[/C][C]0.1965[/C][/ROW]
[ROW][C]212[/C][C]112.2[/C][C]113.9197[/C][C]104.4168[/C][C]123.8363[/C][C]0.367[/C][C]0.9853[/C][C]0.6908[/C][C]0.6908[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310618&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310618&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])
188103.5-------
189113.1-------
190119.4-------
191113.3-------
192115-------
193104.7-------
194107.2-------
195116.6-------
196111.3-------
197111.4-------
198115-------
199102.4-------
200111.4-------
201113.2115.5977109.92121.41840.20970.92120.79980.9212
202112.9119.2782113.4414125.26140.01830.97680.48410.9951
203114.2118.785112.7005125.02950.07510.96760.95740.9898
204115.6116.2457109.1444123.57080.43140.70790.63060.9026
205107.1110.058103.0041117.34540.21310.0680.92520.3591
206102.3108.3152100.9812115.90640.06020.62320.61330.2129
207117.9116.551108.4016124.99560.37710.99950.49550.8841
208105.8111.2798103.1094119.76170.10270.0630.49810.4889
209114.3113.7792105.1813122.71490.45450.960.69910.6991
210113.1112.7423103.8276122.0240.46990.37110.31680.6116
211102.9107.339998.4129116.65440.17510.11270.85070.1965
212112.2113.9197104.4168123.83630.3670.98530.69080.6908







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0257-0.02120.02120.0215.749200-0.36030.3603
2020.0256-0.05650.03880.03840.681423.21534.8182-0.95850.6594
2030.0268-0.04010.03930.038421.022522.48434.7418-0.6890.6693
2040.0322-0.00560.03090.03020.41716.96754.1192-0.0970.5262
2050.0338-0.02760.03020.02968.749615.32393.9146-0.44450.5099
2060.0358-0.05880.0350.034236.18318.80044.3359-0.90390.5755
2070.0370.01140.03160.0311.819916.37464.04660.20270.5223
2080.0389-0.05180.03410.033430.028318.08144.2522-0.82350.5599
2090.04010.00460.03080.03020.271216.10254.01280.07830.5064
2100.0420.00320.02810.02750.12814.5053.80850.05380.4611
2110.0443-0.04310.02940.028819.712714.97843.8702-0.66720.4799
2120.0444-0.01530.02830.02772.957213.97673.7385-0.25840.4614

\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.0257 & -0.0212 & 0.0212 & 0.021 & 5.7492 & 0 & 0 & -0.3603 & 0.3603 \tabularnewline
202 & 0.0256 & -0.0565 & 0.0388 & 0.038 & 40.6814 & 23.2153 & 4.8182 & -0.9585 & 0.6594 \tabularnewline
203 & 0.0268 & -0.0401 & 0.0393 & 0.0384 & 21.0225 & 22.4843 & 4.7418 & -0.689 & 0.6693 \tabularnewline
204 & 0.0322 & -0.0056 & 0.0309 & 0.0302 & 0.417 & 16.9675 & 4.1192 & -0.097 & 0.5262 \tabularnewline
205 & 0.0338 & -0.0276 & 0.0302 & 0.0296 & 8.7496 & 15.3239 & 3.9146 & -0.4445 & 0.5099 \tabularnewline
206 & 0.0358 & -0.0588 & 0.035 & 0.0342 & 36.183 & 18.8004 & 4.3359 & -0.9039 & 0.5755 \tabularnewline
207 & 0.037 & 0.0114 & 0.0316 & 0.031 & 1.8199 & 16.3746 & 4.0466 & 0.2027 & 0.5223 \tabularnewline
208 & 0.0389 & -0.0518 & 0.0341 & 0.0334 & 30.0283 & 18.0814 & 4.2522 & -0.8235 & 0.5599 \tabularnewline
209 & 0.0401 & 0.0046 & 0.0308 & 0.0302 & 0.2712 & 16.1025 & 4.0128 & 0.0783 & 0.5064 \tabularnewline
210 & 0.042 & 0.0032 & 0.0281 & 0.0275 & 0.128 & 14.505 & 3.8085 & 0.0538 & 0.4611 \tabularnewline
211 & 0.0443 & -0.0431 & 0.0294 & 0.0288 & 19.7127 & 14.9784 & 3.8702 & -0.6672 & 0.4799 \tabularnewline
212 & 0.0444 & -0.0153 & 0.0283 & 0.0277 & 2.9572 & 13.9767 & 3.7385 & -0.2584 & 0.4614 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310618&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.0257[/C][C]-0.0212[/C][C]0.0212[/C][C]0.021[/C][C]5.7492[/C][C]0[/C][C]0[/C][C]-0.3603[/C][C]0.3603[/C][/ROW]
[ROW][C]202[/C][C]0.0256[/C][C]-0.0565[/C][C]0.0388[/C][C]0.038[/C][C]40.6814[/C][C]23.2153[/C][C]4.8182[/C][C]-0.9585[/C][C]0.6594[/C][/ROW]
[ROW][C]203[/C][C]0.0268[/C][C]-0.0401[/C][C]0.0393[/C][C]0.0384[/C][C]21.0225[/C][C]22.4843[/C][C]4.7418[/C][C]-0.689[/C][C]0.6693[/C][/ROW]
[ROW][C]204[/C][C]0.0322[/C][C]-0.0056[/C][C]0.0309[/C][C]0.0302[/C][C]0.417[/C][C]16.9675[/C][C]4.1192[/C][C]-0.097[/C][C]0.5262[/C][/ROW]
[ROW][C]205[/C][C]0.0338[/C][C]-0.0276[/C][C]0.0302[/C][C]0.0296[/C][C]8.7496[/C][C]15.3239[/C][C]3.9146[/C][C]-0.4445[/C][C]0.5099[/C][/ROW]
[ROW][C]206[/C][C]0.0358[/C][C]-0.0588[/C][C]0.035[/C][C]0.0342[/C][C]36.183[/C][C]18.8004[/C][C]4.3359[/C][C]-0.9039[/C][C]0.5755[/C][/ROW]
[ROW][C]207[/C][C]0.037[/C][C]0.0114[/C][C]0.0316[/C][C]0.031[/C][C]1.8199[/C][C]16.3746[/C][C]4.0466[/C][C]0.2027[/C][C]0.5223[/C][/ROW]
[ROW][C]208[/C][C]0.0389[/C][C]-0.0518[/C][C]0.0341[/C][C]0.0334[/C][C]30.0283[/C][C]18.0814[/C][C]4.2522[/C][C]-0.8235[/C][C]0.5599[/C][/ROW]
[ROW][C]209[/C][C]0.0401[/C][C]0.0046[/C][C]0.0308[/C][C]0.0302[/C][C]0.2712[/C][C]16.1025[/C][C]4.0128[/C][C]0.0783[/C][C]0.5064[/C][/ROW]
[ROW][C]210[/C][C]0.042[/C][C]0.0032[/C][C]0.0281[/C][C]0.0275[/C][C]0.128[/C][C]14.505[/C][C]3.8085[/C][C]0.0538[/C][C]0.4611[/C][/ROW]
[ROW][C]211[/C][C]0.0443[/C][C]-0.0431[/C][C]0.0294[/C][C]0.0288[/C][C]19.7127[/C][C]14.9784[/C][C]3.8702[/C][C]-0.6672[/C][C]0.4799[/C][/ROW]
[ROW][C]212[/C][C]0.0444[/C][C]-0.0153[/C][C]0.0283[/C][C]0.0277[/C][C]2.9572[/C][C]13.9767[/C][C]3.7385[/C][C]-0.2584[/C][C]0.4614[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310618&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310618&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.0257-0.02120.02120.0215.749200-0.36030.3603
2020.0256-0.05650.03880.03840.681423.21534.8182-0.95850.6594
2030.0268-0.04010.03930.038421.022522.48434.7418-0.6890.6693
2040.0322-0.00560.03090.03020.41716.96754.1192-0.0970.5262
2050.0338-0.02760.03020.02968.749615.32393.9146-0.44450.5099
2060.0358-0.05880.0350.034236.18318.80044.3359-0.90390.5755
2070.0370.01140.03160.0311.819916.37464.04660.20270.5223
2080.0389-0.05180.03410.033430.028318.08144.2522-0.82350.5599
2090.04010.00460.03080.03020.271216.10254.01280.07830.5064
2100.0420.00320.02810.02750.12814.5053.80850.05380.4611
2110.0443-0.04310.02940.028819.712714.97843.8702-0.66720.4799
2120.0444-0.01530.02830.02772.957213.97673.7385-0.25840.4614



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