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:35:07 +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/t1513856266s3tnq36x6phbvui.htm/, Retrieved Tue, 14 May 2024 20:28:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310621, Retrieved Tue, 14 May 2024 20:28:52 +0000
QR Codes:

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

Post a new message
Dataseries X:
52
54.9
60.5
54.8
60.1
60.3
49.8
53.8
64.8
62
65.2
60.1
61.2
63.6
68.6
63.1
66.5
71.9
58.1
61.5
66.2
72.3
67
62.9
66.4
65.6
70.9
68.4
66.4
67.6
64.1
62.1
70
74.4
67
64.8
70.7
64
72.5
70.4
63.6
69.8
67.7
66.4
78.9
79.9
69.1
81.2
66
71.8
86.1
76.1
70.5
83.3
74.8
73.4
86.5
82
80.8
91.5
77
72.3
83.5
79
76.7
83.1
71.1
75.5
90.9
85.4
84.8
83.8
79.3
79.9
93
78.1
82.3
87.3
74.6
80
91.3
94.2
90.9
88
81.6
77.4
91
79.9
83.4
91.6
85.2
84.1
87
92.8
89.2
87.3
89.5
86.8
92
92.2
86.4
92.9
91.2
80.3
102
99
89.2
103
80.4
83.4
97.6
87
84.4
94.1
88.9
82.3
94.7
94.5
91.6
96.8
87.9
99.9
109.5
91.2
89.4
109.7
96.9
94.1
104.4
100.8
107.4
108.9
95.2
102.7
130.9
104
106.5
106.1
97.8
112.2
114.5
105.8
101
101.2
96.5
99.5
123.8
94.6
95.8
105.4
104.4
105.2
112.7
114.8
108.9
103.8
102.5
98.1
118.2
114.8
109.9
116.7
116.9
104.4
113.5
123.8
116.4
114.1
102.8
112.7
121.1
120.8
117.8
130.4
110.9
105.4
137.6
133.3
123.3
122.8
110.2
101.4
128.7
120.6
110.1
121.6
113
115.9
131.1
127.4
123.9
120.8
108.5
112.9
129.6
121.3
119.1
140.8
127.4
128.1
136.6
126.5
120.8
144.3
116
123.4
138.6
118.3
124.2
136
127.4
131.6




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310621&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])
188115.9-------
189131.1-------
190127.4-------
191123.9-------
192120.8-------
193108.5-------
194112.9-------
195129.6-------
196121.3-------
197119.1-------
198140.8-------
199127.4-------
200128.1-------
201136.6139.9017124.3858157.79890.35880.90190.83250.9019
202126.5139.3777123.6181157.61080.08310.61740.90110.8873
203120.8133.0342117.8326150.65090.08670.76640.84520.7085
204144.3133.473117.9284151.54230.12010.91540.91540.72
205116122.0251107.8002138.56290.23760.00410.94550.2358
206123.4123.9098109.1755141.0960.47680.81650.89540.3164
207138.6145.8332127.6666167.19180.25340.98020.93180.9482
208118.3131.5987115.2571150.80080.08730.23740.85340.6395
209124.2128.4987112.3679147.48950.32860.85370.8340.5164
210136142.5436124.0339164.4690.27930.94950.56190.9017
211127.4130.0723113.2254150.01850.39640.28010.60360.5768
212131.6128.9926112.0788149.06360.39950.56180.53470.5347

\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 & 115.9 & - & - & - & - & - & - & - \tabularnewline
189 & 131.1 & - & - & - & - & - & - & - \tabularnewline
190 & 127.4 & - & - & - & - & - & - & - \tabularnewline
191 & 123.9 & - & - & - & - & - & - & - \tabularnewline
192 & 120.8 & - & - & - & - & - & - & - \tabularnewline
193 & 108.5 & - & - & - & - & - & - & - \tabularnewline
194 & 112.9 & - & - & - & - & - & - & - \tabularnewline
195 & 129.6 & - & - & - & - & - & - & - \tabularnewline
196 & 121.3 & - & - & - & - & - & - & - \tabularnewline
197 & 119.1 & - & - & - & - & - & - & - \tabularnewline
198 & 140.8 & - & - & - & - & - & - & - \tabularnewline
199 & 127.4 & - & - & - & - & - & - & - \tabularnewline
200 & 128.1 & - & - & - & - & - & - & - \tabularnewline
201 & 136.6 & 139.9017 & 124.3858 & 157.7989 & 0.3588 & 0.9019 & 0.8325 & 0.9019 \tabularnewline
202 & 126.5 & 139.3777 & 123.6181 & 157.6108 & 0.0831 & 0.6174 & 0.9011 & 0.8873 \tabularnewline
203 & 120.8 & 133.0342 & 117.8326 & 150.6509 & 0.0867 & 0.7664 & 0.8452 & 0.7085 \tabularnewline
204 & 144.3 & 133.473 & 117.9284 & 151.5423 & 0.1201 & 0.9154 & 0.9154 & 0.72 \tabularnewline
205 & 116 & 122.0251 & 107.8002 & 138.5629 & 0.2376 & 0.0041 & 0.9455 & 0.2358 \tabularnewline
206 & 123.4 & 123.9098 & 109.1755 & 141.096 & 0.4768 & 0.8165 & 0.8954 & 0.3164 \tabularnewline
207 & 138.6 & 145.8332 & 127.6666 & 167.1918 & 0.2534 & 0.9802 & 0.9318 & 0.9482 \tabularnewline
208 & 118.3 & 131.5987 & 115.2571 & 150.8008 & 0.0873 & 0.2374 & 0.8534 & 0.6395 \tabularnewline
209 & 124.2 & 128.4987 & 112.3679 & 147.4895 & 0.3286 & 0.8537 & 0.834 & 0.5164 \tabularnewline
210 & 136 & 142.5436 & 124.0339 & 164.469 & 0.2793 & 0.9495 & 0.5619 & 0.9017 \tabularnewline
211 & 127.4 & 130.0723 & 113.2254 & 150.0185 & 0.3964 & 0.2801 & 0.6036 & 0.5768 \tabularnewline
212 & 131.6 & 128.9926 & 112.0788 & 149.0636 & 0.3995 & 0.5618 & 0.5347 & 0.5347 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310621&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]115.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]131.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]127.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]123.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]120.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]108.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]112.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]129.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]121.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]119.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]140.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]127.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]128.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]136.6[/C][C]139.9017[/C][C]124.3858[/C][C]157.7989[/C][C]0.3588[/C][C]0.9019[/C][C]0.8325[/C][C]0.9019[/C][/ROW]
[ROW][C]202[/C][C]126.5[/C][C]139.3777[/C][C]123.6181[/C][C]157.6108[/C][C]0.0831[/C][C]0.6174[/C][C]0.9011[/C][C]0.8873[/C][/ROW]
[ROW][C]203[/C][C]120.8[/C][C]133.0342[/C][C]117.8326[/C][C]150.6509[/C][C]0.0867[/C][C]0.7664[/C][C]0.8452[/C][C]0.7085[/C][/ROW]
[ROW][C]204[/C][C]144.3[/C][C]133.473[/C][C]117.9284[/C][C]151.5423[/C][C]0.1201[/C][C]0.9154[/C][C]0.9154[/C][C]0.72[/C][/ROW]
[ROW][C]205[/C][C]116[/C][C]122.0251[/C][C]107.8002[/C][C]138.5629[/C][C]0.2376[/C][C]0.0041[/C][C]0.9455[/C][C]0.2358[/C][/ROW]
[ROW][C]206[/C][C]123.4[/C][C]123.9098[/C][C]109.1755[/C][C]141.096[/C][C]0.4768[/C][C]0.8165[/C][C]0.8954[/C][C]0.3164[/C][/ROW]
[ROW][C]207[/C][C]138.6[/C][C]145.8332[/C][C]127.6666[/C][C]167.1918[/C][C]0.2534[/C][C]0.9802[/C][C]0.9318[/C][C]0.9482[/C][/ROW]
[ROW][C]208[/C][C]118.3[/C][C]131.5987[/C][C]115.2571[/C][C]150.8008[/C][C]0.0873[/C][C]0.2374[/C][C]0.8534[/C][C]0.6395[/C][/ROW]
[ROW][C]209[/C][C]124.2[/C][C]128.4987[/C][C]112.3679[/C][C]147.4895[/C][C]0.3286[/C][C]0.8537[/C][C]0.834[/C][C]0.5164[/C][/ROW]
[ROW][C]210[/C][C]136[/C][C]142.5436[/C][C]124.0339[/C][C]164.469[/C][C]0.2793[/C][C]0.9495[/C][C]0.5619[/C][C]0.9017[/C][/ROW]
[ROW][C]211[/C][C]127.4[/C][C]130.0723[/C][C]113.2254[/C][C]150.0185[/C][C]0.3964[/C][C]0.2801[/C][C]0.6036[/C][C]0.5768[/C][/ROW]
[ROW][C]212[/C][C]131.6[/C][C]128.9926[/C][C]112.0788[/C][C]149.0636[/C][C]0.3995[/C][C]0.5618[/C][C]0.5347[/C][C]0.5347[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310621&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310621&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])
188115.9-------
189131.1-------
190127.4-------
191123.9-------
192120.8-------
193108.5-------
194112.9-------
195129.6-------
196121.3-------
197119.1-------
198140.8-------
199127.4-------
200128.1-------
201136.6139.9017124.3858157.79890.35880.90190.83250.9019
202126.5139.3777123.6181157.61080.08310.61740.90110.8873
203120.8133.0342117.8326150.65090.08670.76640.84520.7085
204144.3133.473117.9284151.54230.12010.91540.91540.72
205116122.0251107.8002138.56290.23760.00410.94550.2358
206123.4123.9098109.1755141.0960.47680.81650.89540.3164
207138.6145.8332127.6666167.19180.25340.98020.93180.9482
208118.3131.5987115.2571150.80080.08730.23740.85340.6395
209124.2128.4987112.3679147.48950.32860.85370.8340.5164
210136142.5436124.0339164.4690.27930.94950.56190.9017
211127.4130.0723113.2254150.01850.39640.28010.60360.5768
212131.6128.9926112.0788149.06360.39950.56180.53470.5347







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0653-0.02420.02420.023910.90100-0.25760.2576
2020.0667-0.10180.0630.0604165.835488.36829.4004-1.00460.6311
2030.0676-0.10130.07570.0724149.6759108.804110.4309-0.95440.7389
2040.06910.0750.07560.0738117.2247110.909310.53130.84470.7653
2050.0691-0.05190.07080.069136.301695.98779.7973-0.470.7063
2060.0708-0.00410.05970.05830.259980.03318.9461-0.03980.5952
2070.0747-0.05220.05860.057252.318776.07398.722-0.56430.5908
2080.0744-0.11240.06540.0634176.854288.67149.4166-1.03750.6466
2090.0754-0.03460.0620.060118.478480.87228.9929-0.33540.612
2100.0785-0.04810.06060.058842.819177.06698.7788-0.51050.6019
2110.0782-0.0210.0570.05547.14170.718.4089-0.20850.5661
2120.07940.01980.05390.05246.798765.38418.0860.20340.5359

\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.0653 & -0.0242 & 0.0242 & 0.0239 & 10.901 & 0 & 0 & -0.2576 & 0.2576 \tabularnewline
202 & 0.0667 & -0.1018 & 0.063 & 0.0604 & 165.8354 & 88.3682 & 9.4004 & -1.0046 & 0.6311 \tabularnewline
203 & 0.0676 & -0.1013 & 0.0757 & 0.0724 & 149.6759 & 108.8041 & 10.4309 & -0.9544 & 0.7389 \tabularnewline
204 & 0.0691 & 0.075 & 0.0756 & 0.0738 & 117.2247 & 110.9093 & 10.5313 & 0.8447 & 0.7653 \tabularnewline
205 & 0.0691 & -0.0519 & 0.0708 & 0.0691 & 36.3016 & 95.9877 & 9.7973 & -0.47 & 0.7063 \tabularnewline
206 & 0.0708 & -0.0041 & 0.0597 & 0.0583 & 0.2599 & 80.0331 & 8.9461 & -0.0398 & 0.5952 \tabularnewline
207 & 0.0747 & -0.0522 & 0.0586 & 0.0572 & 52.3187 & 76.0739 & 8.722 & -0.5643 & 0.5908 \tabularnewline
208 & 0.0744 & -0.1124 & 0.0654 & 0.0634 & 176.8542 & 88.6714 & 9.4166 & -1.0375 & 0.6466 \tabularnewline
209 & 0.0754 & -0.0346 & 0.062 & 0.0601 & 18.4784 & 80.8722 & 8.9929 & -0.3354 & 0.612 \tabularnewline
210 & 0.0785 & -0.0481 & 0.0606 & 0.0588 & 42.8191 & 77.0669 & 8.7788 & -0.5105 & 0.6019 \tabularnewline
211 & 0.0782 & -0.021 & 0.057 & 0.0554 & 7.141 & 70.71 & 8.4089 & -0.2085 & 0.5661 \tabularnewline
212 & 0.0794 & 0.0198 & 0.0539 & 0.0524 & 6.7987 & 65.3841 & 8.086 & 0.2034 & 0.5359 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310621&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.0653[/C][C]-0.0242[/C][C]0.0242[/C][C]0.0239[/C][C]10.901[/C][C]0[/C][C]0[/C][C]-0.2576[/C][C]0.2576[/C][/ROW]
[ROW][C]202[/C][C]0.0667[/C][C]-0.1018[/C][C]0.063[/C][C]0.0604[/C][C]165.8354[/C][C]88.3682[/C][C]9.4004[/C][C]-1.0046[/C][C]0.6311[/C][/ROW]
[ROW][C]203[/C][C]0.0676[/C][C]-0.1013[/C][C]0.0757[/C][C]0.0724[/C][C]149.6759[/C][C]108.8041[/C][C]10.4309[/C][C]-0.9544[/C][C]0.7389[/C][/ROW]
[ROW][C]204[/C][C]0.0691[/C][C]0.075[/C][C]0.0756[/C][C]0.0738[/C][C]117.2247[/C][C]110.9093[/C][C]10.5313[/C][C]0.8447[/C][C]0.7653[/C][/ROW]
[ROW][C]205[/C][C]0.0691[/C][C]-0.0519[/C][C]0.0708[/C][C]0.0691[/C][C]36.3016[/C][C]95.9877[/C][C]9.7973[/C][C]-0.47[/C][C]0.7063[/C][/ROW]
[ROW][C]206[/C][C]0.0708[/C][C]-0.0041[/C][C]0.0597[/C][C]0.0583[/C][C]0.2599[/C][C]80.0331[/C][C]8.9461[/C][C]-0.0398[/C][C]0.5952[/C][/ROW]
[ROW][C]207[/C][C]0.0747[/C][C]-0.0522[/C][C]0.0586[/C][C]0.0572[/C][C]52.3187[/C][C]76.0739[/C][C]8.722[/C][C]-0.5643[/C][C]0.5908[/C][/ROW]
[ROW][C]208[/C][C]0.0744[/C][C]-0.1124[/C][C]0.0654[/C][C]0.0634[/C][C]176.8542[/C][C]88.6714[/C][C]9.4166[/C][C]-1.0375[/C][C]0.6466[/C][/ROW]
[ROW][C]209[/C][C]0.0754[/C][C]-0.0346[/C][C]0.062[/C][C]0.0601[/C][C]18.4784[/C][C]80.8722[/C][C]8.9929[/C][C]-0.3354[/C][C]0.612[/C][/ROW]
[ROW][C]210[/C][C]0.0785[/C][C]-0.0481[/C][C]0.0606[/C][C]0.0588[/C][C]42.8191[/C][C]77.0669[/C][C]8.7788[/C][C]-0.5105[/C][C]0.6019[/C][/ROW]
[ROW][C]211[/C][C]0.0782[/C][C]-0.021[/C][C]0.057[/C][C]0.0554[/C][C]7.141[/C][C]70.71[/C][C]8.4089[/C][C]-0.2085[/C][C]0.5661[/C][/ROW]
[ROW][C]212[/C][C]0.0794[/C][C]0.0198[/C][C]0.0539[/C][C]0.0524[/C][C]6.7987[/C][C]65.3841[/C][C]8.086[/C][C]0.2034[/C][C]0.5359[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310621&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310621&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.0653-0.02420.02420.023910.90100-0.25760.2576
2020.0667-0.10180.0630.0604165.835488.36829.4004-1.00460.6311
2030.0676-0.10130.07570.0724149.6759108.804110.4309-0.95440.7389
2040.06910.0750.07560.0738117.2247110.909310.53130.84470.7653
2050.0691-0.05190.07080.069136.301695.98779.7973-0.470.7063
2060.0708-0.00410.05970.05830.259980.03318.9461-0.03980.5952
2070.0747-0.05220.05860.057252.318776.07398.722-0.56430.5908
2080.0744-0.11240.06540.0634176.854288.67149.4166-1.03750.6466
2090.0754-0.03460.0620.060118.478480.87228.9929-0.33540.612
2100.0785-0.04810.06060.058842.819177.06698.7788-0.51050.6019
2110.0782-0.0210.0570.05547.14170.718.4089-0.20850.5661
2120.07940.01980.05390.05246.798765.38418.0860.20340.5359



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