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 computationSun, 10 Dec 2017 12:41:10 +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/10/t151290695096sy6t3derfzie1.htm/, Retrieved Thu, 31 Oct 2024 23:04:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=308903, Retrieved Thu, 31 Oct 2024 23:04:38 +0000
QR Codes:

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

Post a new message
Dataseries X:
62
67.1
75.9
67
74.2
72.2
60.2
65.8
76.2
76.6
76.8
70.6
74.5
73.5
80.2
71.5
76.6
79.6
65.5
69.2
74.8
79.4
75
67.7
72.5
71.2
78.3
76.6
74.9
76.5
69.4
67.4
77.2
82.2
75.1
70.6
75.6
73.5
79.4
77.5
72.9
78
71.5
66.6
81.8
83.5
74.6
79.8
73.9
76.6
88.9
81.7
76.5
88.8
75.5
75.2
89
87.9
85.7
89.2
82.7
81
90.3
86.3
81.5
91.1
73.1
76.4
91
86.9
89.6
90.5
86.3
86.5
98.8
84.3
91.2
95.5
78.1
81.5
94.4
98.5
95.3
91.6
92.8
90.5
102.2
91.5
94.9
102.1
88.8
89.4
97.8
108.8
100.8
95
101
101
102.5
105.6
98.3
105.5
96.4
88
108.1
107.2
92.5
95.7
84.8
85.4
94.6
86
88.6
93.3
83.1
82.6
96.7
96.2
92.6
92.7
89.9
95.4
108.4
96.2
95
109
91.9
92.2
107.1
105.6
105.4
103.9
99.2
102.4
121.8
102.3
110.1
106
91.9
100.1
112
105
103.3
101.8
100.9
104.2
116.8
97.8
100.7
107.2
96.3
95.9
104.6
107.5
102.5
94.9
98.7
96.8
108.3
103.9
102.4
107.3
101.9
92.5
105.4
113.2
105.7
101.7
101.8
102.9
109.2
105.6
103.4
108.8
98.1
90
112.8
112.2
102.2
102.5
101.8
98.8
114.3
105.2
98.3
110.1
96.4
92.1
112.2
111.6
107.6
103.4
103.6
107.7
117.9
110.4
104.4
116.2
98.9
102.1
113.7
109.5
110.3
114.5
107
109.4
124.6
104.8
112
119.2
103
106.5




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308903&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 time3 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])
18892.1-------
189112.2-------
190111.6-------
191107.6-------
192103.4-------
193103.6-------
194107.7-------
195117.9-------
196110.4-------
197104.4-------
198116.2-------
19998.9-------
200102.1-------
201113.7115.1148109.1165120.81560.313310.84191
202109.5114.1289107.9078120.0280.0620.55670.79961
203110.3111.6256104.9382117.93440.34020.74550.89450.9985
204114.5108.1771100.102115.690.04950.28980.89370.9436
205107107.223398.74115.08290.47780.03480.81690.8993
206109.4109.853101.1621117.90490.45610.75630.69990.9704
207124.6119.3202110.8172127.25640.09610.99290.63711
208104.8111.3499101.8207120.12540.07170.00150.5840.9806
209112109.740799.6408118.98630.3160.85250.87120.9474
210119.2116.7002106.8373125.79220.2950.84450.54290.9992
211103104.495192.9557114.88120.38890.00280.85450.6744
212106.5103.975991.9579114.7420.32290.57050.63360.6336

\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 & 92.1 & - & - & - & - & - & - & - \tabularnewline
189 & 112.2 & - & - & - & - & - & - & - \tabularnewline
190 & 111.6 & - & - & - & - & - & - & - \tabularnewline
191 & 107.6 & - & - & - & - & - & - & - \tabularnewline
192 & 103.4 & - & - & - & - & - & - & - \tabularnewline
193 & 103.6 & - & - & - & - & - & - & - \tabularnewline
194 & 107.7 & - & - & - & - & - & - & - \tabularnewline
195 & 117.9 & - & - & - & - & - & - & - \tabularnewline
196 & 110.4 & - & - & - & - & - & - & - \tabularnewline
197 & 104.4 & - & - & - & - & - & - & - \tabularnewline
198 & 116.2 & - & - & - & - & - & - & - \tabularnewline
199 & 98.9 & - & - & - & - & - & - & - \tabularnewline
200 & 102.1 & - & - & - & - & - & - & - \tabularnewline
201 & 113.7 & 115.1148 & 109.1165 & 120.8156 & 0.3133 & 1 & 0.8419 & 1 \tabularnewline
202 & 109.5 & 114.1289 & 107.9078 & 120.028 & 0.062 & 0.5567 & 0.7996 & 1 \tabularnewline
203 & 110.3 & 111.6256 & 104.9382 & 117.9344 & 0.3402 & 0.7455 & 0.8945 & 0.9985 \tabularnewline
204 & 114.5 & 108.1771 & 100.102 & 115.69 & 0.0495 & 0.2898 & 0.8937 & 0.9436 \tabularnewline
205 & 107 & 107.2233 & 98.74 & 115.0829 & 0.4778 & 0.0348 & 0.8169 & 0.8993 \tabularnewline
206 & 109.4 & 109.853 & 101.1621 & 117.9049 & 0.4561 & 0.7563 & 0.6999 & 0.9704 \tabularnewline
207 & 124.6 & 119.3202 & 110.8172 & 127.2564 & 0.0961 & 0.9929 & 0.6371 & 1 \tabularnewline
208 & 104.8 & 111.3499 & 101.8207 & 120.1254 & 0.0717 & 0.0015 & 0.584 & 0.9806 \tabularnewline
209 & 112 & 109.7407 & 99.6408 & 118.9863 & 0.316 & 0.8525 & 0.8712 & 0.9474 \tabularnewline
210 & 119.2 & 116.7002 & 106.8373 & 125.7922 & 0.295 & 0.8445 & 0.5429 & 0.9992 \tabularnewline
211 & 103 & 104.4951 & 92.9557 & 114.8812 & 0.3889 & 0.0028 & 0.8545 & 0.6744 \tabularnewline
212 & 106.5 & 103.9759 & 91.9579 & 114.742 & 0.3229 & 0.5705 & 0.6336 & 0.6336 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308903&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]92.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]111.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]107.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]103.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]103.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]107.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]117.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]110.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]104.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]116.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]98.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]102.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]113.7[/C][C]115.1148[/C][C]109.1165[/C][C]120.8156[/C][C]0.3133[/C][C]1[/C][C]0.8419[/C][C]1[/C][/ROW]
[ROW][C]202[/C][C]109.5[/C][C]114.1289[/C][C]107.9078[/C][C]120.028[/C][C]0.062[/C][C]0.5567[/C][C]0.7996[/C][C]1[/C][/ROW]
[ROW][C]203[/C][C]110.3[/C][C]111.6256[/C][C]104.9382[/C][C]117.9344[/C][C]0.3402[/C][C]0.7455[/C][C]0.8945[/C][C]0.9985[/C][/ROW]
[ROW][C]204[/C][C]114.5[/C][C]108.1771[/C][C]100.102[/C][C]115.69[/C][C]0.0495[/C][C]0.2898[/C][C]0.8937[/C][C]0.9436[/C][/ROW]
[ROW][C]205[/C][C]107[/C][C]107.2233[/C][C]98.74[/C][C]115.0829[/C][C]0.4778[/C][C]0.0348[/C][C]0.8169[/C][C]0.8993[/C][/ROW]
[ROW][C]206[/C][C]109.4[/C][C]109.853[/C][C]101.1621[/C][C]117.9049[/C][C]0.4561[/C][C]0.7563[/C][C]0.6999[/C][C]0.9704[/C][/ROW]
[ROW][C]207[/C][C]124.6[/C][C]119.3202[/C][C]110.8172[/C][C]127.2564[/C][C]0.0961[/C][C]0.9929[/C][C]0.6371[/C][C]1[/C][/ROW]
[ROW][C]208[/C][C]104.8[/C][C]111.3499[/C][C]101.8207[/C][C]120.1254[/C][C]0.0717[/C][C]0.0015[/C][C]0.584[/C][C]0.9806[/C][/ROW]
[ROW][C]209[/C][C]112[/C][C]109.7407[/C][C]99.6408[/C][C]118.9863[/C][C]0.316[/C][C]0.8525[/C][C]0.8712[/C][C]0.9474[/C][/ROW]
[ROW][C]210[/C][C]119.2[/C][C]116.7002[/C][C]106.8373[/C][C]125.7922[/C][C]0.295[/C][C]0.8445[/C][C]0.5429[/C][C]0.9992[/C][/ROW]
[ROW][C]211[/C][C]103[/C][C]104.4951[/C][C]92.9557[/C][C]114.8812[/C][C]0.3889[/C][C]0.0028[/C][C]0.8545[/C][C]0.6744[/C][/ROW]
[ROW][C]212[/C][C]106.5[/C][C]103.9759[/C][C]91.9579[/C][C]114.742[/C][C]0.3229[/C][C]0.5705[/C][C]0.6336[/C][C]0.6336[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308903&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308903&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])
18892.1-------
189112.2-------
190111.6-------
191107.6-------
192103.4-------
193103.6-------
194107.7-------
195117.9-------
196110.4-------
197104.4-------
198116.2-------
19998.9-------
200102.1-------
201113.7115.1148109.1165120.81560.313310.84191
202109.5114.1289107.9078120.0280.0620.55670.79961
203110.3111.6256104.9382117.93440.34020.74550.89450.9985
204114.5108.1771100.102115.690.04950.28980.89370.9436
205107107.223398.74115.08290.47780.03480.81690.8993
206109.4109.853101.1621117.90490.45610.75630.69990.9704
207124.6119.3202110.8172127.25640.09610.99290.63711
208104.8111.3499101.8207120.12540.07170.00150.5840.9806
209112109.740799.6408118.98630.3160.85250.87120.9474
210119.2116.7002106.8373125.79220.2950.84450.54290.9992
211103104.495192.9557114.88120.38890.00280.85450.6744
212106.5103.975991.9579114.7420.32290.57050.63360.6336







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0253-0.01240.01240.01242.001600-0.17640.1764
2020.0264-0.04230.02740.026921.426811.71423.4226-0.57730.3769
2030.0288-0.0120.02220.02191.75718.39522.8974-0.16530.3064
2040.03540.05520.03050.030639.978916.29114.03620.78860.4269
2050.0374-0.00210.02480.02490.049913.04283.6115-0.02780.3471
2060.0374-0.00410.02140.02150.205210.90323.302-0.05650.2987
2070.03390.04240.02440.024627.875813.32793.65070.65850.3501
2080.0402-0.06250.02910.029142.900617.02454.1261-0.81690.4084
2090.0430.02020.02810.02815.104515.73.96230.28180.3943
2100.03970.0210.02740.02746.248814.75493.84120.31180.3861
2110.0507-0.01450.02620.02622.235413.61683.6901-0.18650.3679
2120.05280.02370.0260.0266.37113.0133.60730.31480.3635

\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.0253 & -0.0124 & 0.0124 & 0.0124 & 2.0016 & 0 & 0 & -0.1764 & 0.1764 \tabularnewline
202 & 0.0264 & -0.0423 & 0.0274 & 0.0269 & 21.4268 & 11.7142 & 3.4226 & -0.5773 & 0.3769 \tabularnewline
203 & 0.0288 & -0.012 & 0.0222 & 0.0219 & 1.7571 & 8.3952 & 2.8974 & -0.1653 & 0.3064 \tabularnewline
204 & 0.0354 & 0.0552 & 0.0305 & 0.0306 & 39.9789 & 16.2911 & 4.0362 & 0.7886 & 0.4269 \tabularnewline
205 & 0.0374 & -0.0021 & 0.0248 & 0.0249 & 0.0499 & 13.0428 & 3.6115 & -0.0278 & 0.3471 \tabularnewline
206 & 0.0374 & -0.0041 & 0.0214 & 0.0215 & 0.2052 & 10.9032 & 3.302 & -0.0565 & 0.2987 \tabularnewline
207 & 0.0339 & 0.0424 & 0.0244 & 0.0246 & 27.8758 & 13.3279 & 3.6507 & 0.6585 & 0.3501 \tabularnewline
208 & 0.0402 & -0.0625 & 0.0291 & 0.0291 & 42.9006 & 17.0245 & 4.1261 & -0.8169 & 0.4084 \tabularnewline
209 & 0.043 & 0.0202 & 0.0281 & 0.0281 & 5.1045 & 15.7 & 3.9623 & 0.2818 & 0.3943 \tabularnewline
210 & 0.0397 & 0.021 & 0.0274 & 0.0274 & 6.2488 & 14.7549 & 3.8412 & 0.3118 & 0.3861 \tabularnewline
211 & 0.0507 & -0.0145 & 0.0262 & 0.0262 & 2.2354 & 13.6168 & 3.6901 & -0.1865 & 0.3679 \tabularnewline
212 & 0.0528 & 0.0237 & 0.026 & 0.026 & 6.371 & 13.013 & 3.6073 & 0.3148 & 0.3635 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=308903&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.0253[/C][C]-0.0124[/C][C]0.0124[/C][C]0.0124[/C][C]2.0016[/C][C]0[/C][C]0[/C][C]-0.1764[/C][C]0.1764[/C][/ROW]
[ROW][C]202[/C][C]0.0264[/C][C]-0.0423[/C][C]0.0274[/C][C]0.0269[/C][C]21.4268[/C][C]11.7142[/C][C]3.4226[/C][C]-0.5773[/C][C]0.3769[/C][/ROW]
[ROW][C]203[/C][C]0.0288[/C][C]-0.012[/C][C]0.0222[/C][C]0.0219[/C][C]1.7571[/C][C]8.3952[/C][C]2.8974[/C][C]-0.1653[/C][C]0.3064[/C][/ROW]
[ROW][C]204[/C][C]0.0354[/C][C]0.0552[/C][C]0.0305[/C][C]0.0306[/C][C]39.9789[/C][C]16.2911[/C][C]4.0362[/C][C]0.7886[/C][C]0.4269[/C][/ROW]
[ROW][C]205[/C][C]0.0374[/C][C]-0.0021[/C][C]0.0248[/C][C]0.0249[/C][C]0.0499[/C][C]13.0428[/C][C]3.6115[/C][C]-0.0278[/C][C]0.3471[/C][/ROW]
[ROW][C]206[/C][C]0.0374[/C][C]-0.0041[/C][C]0.0214[/C][C]0.0215[/C][C]0.2052[/C][C]10.9032[/C][C]3.302[/C][C]-0.0565[/C][C]0.2987[/C][/ROW]
[ROW][C]207[/C][C]0.0339[/C][C]0.0424[/C][C]0.0244[/C][C]0.0246[/C][C]27.8758[/C][C]13.3279[/C][C]3.6507[/C][C]0.6585[/C][C]0.3501[/C][/ROW]
[ROW][C]208[/C][C]0.0402[/C][C]-0.0625[/C][C]0.0291[/C][C]0.0291[/C][C]42.9006[/C][C]17.0245[/C][C]4.1261[/C][C]-0.8169[/C][C]0.4084[/C][/ROW]
[ROW][C]209[/C][C]0.043[/C][C]0.0202[/C][C]0.0281[/C][C]0.0281[/C][C]5.1045[/C][C]15.7[/C][C]3.9623[/C][C]0.2818[/C][C]0.3943[/C][/ROW]
[ROW][C]210[/C][C]0.0397[/C][C]0.021[/C][C]0.0274[/C][C]0.0274[/C][C]6.2488[/C][C]14.7549[/C][C]3.8412[/C][C]0.3118[/C][C]0.3861[/C][/ROW]
[ROW][C]211[/C][C]0.0507[/C][C]-0.0145[/C][C]0.0262[/C][C]0.0262[/C][C]2.2354[/C][C]13.6168[/C][C]3.6901[/C][C]-0.1865[/C][C]0.3679[/C][/ROW]
[ROW][C]212[/C][C]0.0528[/C][C]0.0237[/C][C]0.026[/C][C]0.026[/C][C]6.371[/C][C]13.013[/C][C]3.6073[/C][C]0.3148[/C][C]0.3635[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=308903&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=308903&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.0253-0.01240.01240.01242.001600-0.17640.1764
2020.0264-0.04230.02740.026921.426811.71423.4226-0.57730.3769
2030.0288-0.0120.02220.02191.75718.39522.8974-0.16530.3064
2040.03540.05520.03050.030639.978916.29114.03620.78860.4269
2050.0374-0.00210.02480.02490.049913.04283.6115-0.02780.3471
2060.0374-0.00410.02140.02150.205210.90323.302-0.05650.2987
2070.03390.04240.02440.024627.875813.32793.65070.65850.3501
2080.0402-0.06250.02910.029142.900617.02454.1261-0.81690.4084
2090.0430.02020.02810.02815.104515.73.96230.28180.3943
2100.03970.0210.02740.02746.248814.75493.84120.31180.3861
2110.0507-0.01450.02620.02622.235413.61683.6901-0.18650.3679
2120.05280.02370.0260.0266.37113.0133.60730.31480.3635



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