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 computationMon, 18 Dec 2017 23:04:13 +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/18/t1513634736515l7cj1ynsgcnb.htm/, Retrieved Tue, 14 May 2024 15:04:04 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310257, Retrieved Tue, 14 May 2024 15:04:04 +0000
QR Codes:

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

Post a new message
Dataseries X:
58.4
64.8
73.8
65
73
71.1
58.2
64
75
74.9
75
68.3
72.5
72.4
79.6
70.7
76.4
79.7
64.2
67.9
74.1
78.5
73.4
65.4
69.9
69.6
76.8
75.6
74
76
68.1
65.5
76.9
81.7
73.6
68.7
73.3
71.5
78.3
76.5
71.8
77.6
70
64
81.3
82.5
73.1
78.1
70.7
74.9
88
81.3
75.7
89.8
74.6
74.9
90
88.1
84.9
87.7
80.5
79
89.9
86.3
81.1
92.4
71.8
76.1
92.5
87
89.5
88.7
83.8
84.9
99
84.6
92.7
97.6
78
81.9
96.5
99.9
96.2
90.5
91.4
89.7
102.7
91.5
96.2
104.5
90.3
90.3
100.4
111.3
101.3
94.4
100.4
102
104.3
108.8
101.3
108.9
98.5
88.8
111.8
109.6
92.5
94.5
80.8
83.7
94.2
86.2
89
94.7
81.9
80.2
96.5
95.6
91.9
89.9
86.3
94
108
96.3
94.6
111.7
92
91.9
109.2
106.8
105.8
103.6
97.6
102.8
124.8
103.9
112.2
108.5
92.4
101.1
114.9
106.4
104
101.6
99.4
102.3
121.3
99.3
102.9
111.4
98.5
98.5
108.5
112.1
105.3
95.2
98.2
96.6
109.6
108
106.7
111.5
104.5
94.3
109.6
116.4
106.5
100.5
101.7
104.1
112.3
111.2
108.2
115.1
102.3
93.6
120.6
118.4
106.6
105.3
101.5
100.1
119.5
111.2
103.7
117.8
101.7
97.4
120
117
110.6
105.3
100.9
108.1
119.3
113
108.6
123.3
101.4
103.5
119.4
113.1
112
115.8
105.4
110.9
128.5
109
117.2
124.4
104.7
108.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=310257&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=310257&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310257&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])
18897.4-------
189120-------
190117-------
191110.6-------
192105.3-------
193100.9-------
194108.1-------
195119.3-------
196113-------
197108.6-------
198123.3-------
199101.4-------
200103.5-------
201119.4122.0138113.2558131.30540.290710.66451
202113.1120.5794111.7927129.91020.05810.59780.77390.9998
203112115.3037106.4282124.76160.24680.6760.83520.9928
204115.8111.2195101.1971122.02070.20290.44370.85860.9194
205105.4108.224198.1728119.08240.30510.08570.90690.8031
206110.9111.2106100.4404122.88550.47920.83530.69920.9022
207128.5125.0513112.4452138.76350.3110.97850.79450.999
208109115.57103.3925128.86880.16640.02830.64760.9624
209117.2115.9422103.2526129.84990.42970.83610.84960.9602
210124.4124.4024110.4378139.74520.49990.82120.5560.9962
211104.7106.957194.2499120.99930.37640.00750.7810.6853
212108.6106.327293.2827120.79180.37910.58730.64920.6492

\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 & 97.4 & - & - & - & - & - & - & - \tabularnewline
189 & 120 & - & - & - & - & - & - & - \tabularnewline
190 & 117 & - & - & - & - & - & - & - \tabularnewline
191 & 110.6 & - & - & - & - & - & - & - \tabularnewline
192 & 105.3 & - & - & - & - & - & - & - \tabularnewline
193 & 100.9 & - & - & - & - & - & - & - \tabularnewline
194 & 108.1 & - & - & - & - & - & - & - \tabularnewline
195 & 119.3 & - & - & - & - & - & - & - \tabularnewline
196 & 113 & - & - & - & - & - & - & - \tabularnewline
197 & 108.6 & - & - & - & - & - & - & - \tabularnewline
198 & 123.3 & - & - & - & - & - & - & - \tabularnewline
199 & 101.4 & - & - & - & - & - & - & - \tabularnewline
200 & 103.5 & - & - & - & - & - & - & - \tabularnewline
201 & 119.4 & 122.0138 & 113.2558 & 131.3054 & 0.2907 & 1 & 0.6645 & 1 \tabularnewline
202 & 113.1 & 120.5794 & 111.7927 & 129.9102 & 0.0581 & 0.5978 & 0.7739 & 0.9998 \tabularnewline
203 & 112 & 115.3037 & 106.4282 & 124.7616 & 0.2468 & 0.676 & 0.8352 & 0.9928 \tabularnewline
204 & 115.8 & 111.2195 & 101.1971 & 122.0207 & 0.2029 & 0.4437 & 0.8586 & 0.9194 \tabularnewline
205 & 105.4 & 108.2241 & 98.1728 & 119.0824 & 0.3051 & 0.0857 & 0.9069 & 0.8031 \tabularnewline
206 & 110.9 & 111.2106 & 100.4404 & 122.8855 & 0.4792 & 0.8353 & 0.6992 & 0.9022 \tabularnewline
207 & 128.5 & 125.0513 & 112.4452 & 138.7635 & 0.311 & 0.9785 & 0.7945 & 0.999 \tabularnewline
208 & 109 & 115.57 & 103.3925 & 128.8688 & 0.1664 & 0.0283 & 0.6476 & 0.9624 \tabularnewline
209 & 117.2 & 115.9422 & 103.2526 & 129.8499 & 0.4297 & 0.8361 & 0.8496 & 0.9602 \tabularnewline
210 & 124.4 & 124.4024 & 110.4378 & 139.7452 & 0.4999 & 0.8212 & 0.556 & 0.9962 \tabularnewline
211 & 104.7 & 106.9571 & 94.2499 & 120.9993 & 0.3764 & 0.0075 & 0.781 & 0.6853 \tabularnewline
212 & 108.6 & 106.3272 & 93.2827 & 120.7918 & 0.3791 & 0.5873 & 0.6492 & 0.6492 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310257&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]97.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]120[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]110.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]105.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]100.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]108.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]119.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]113[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]108.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]123.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]101.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]103.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]119.4[/C][C]122.0138[/C][C]113.2558[/C][C]131.3054[/C][C]0.2907[/C][C]1[/C][C]0.6645[/C][C]1[/C][/ROW]
[ROW][C]202[/C][C]113.1[/C][C]120.5794[/C][C]111.7927[/C][C]129.9102[/C][C]0.0581[/C][C]0.5978[/C][C]0.7739[/C][C]0.9998[/C][/ROW]
[ROW][C]203[/C][C]112[/C][C]115.3037[/C][C]106.4282[/C][C]124.7616[/C][C]0.2468[/C][C]0.676[/C][C]0.8352[/C][C]0.9928[/C][/ROW]
[ROW][C]204[/C][C]115.8[/C][C]111.2195[/C][C]101.1971[/C][C]122.0207[/C][C]0.2029[/C][C]0.4437[/C][C]0.8586[/C][C]0.9194[/C][/ROW]
[ROW][C]205[/C][C]105.4[/C][C]108.2241[/C][C]98.1728[/C][C]119.0824[/C][C]0.3051[/C][C]0.0857[/C][C]0.9069[/C][C]0.8031[/C][/ROW]
[ROW][C]206[/C][C]110.9[/C][C]111.2106[/C][C]100.4404[/C][C]122.8855[/C][C]0.4792[/C][C]0.8353[/C][C]0.6992[/C][C]0.9022[/C][/ROW]
[ROW][C]207[/C][C]128.5[/C][C]125.0513[/C][C]112.4452[/C][C]138.7635[/C][C]0.311[/C][C]0.9785[/C][C]0.7945[/C][C]0.999[/C][/ROW]
[ROW][C]208[/C][C]109[/C][C]115.57[/C][C]103.3925[/C][C]128.8688[/C][C]0.1664[/C][C]0.0283[/C][C]0.6476[/C][C]0.9624[/C][/ROW]
[ROW][C]209[/C][C]117.2[/C][C]115.9422[/C][C]103.2526[/C][C]129.8499[/C][C]0.4297[/C][C]0.8361[/C][C]0.8496[/C][C]0.9602[/C][/ROW]
[ROW][C]210[/C][C]124.4[/C][C]124.4024[/C][C]110.4378[/C][C]139.7452[/C][C]0.4999[/C][C]0.8212[/C][C]0.556[/C][C]0.9962[/C][/ROW]
[ROW][C]211[/C][C]104.7[/C][C]106.9571[/C][C]94.2499[/C][C]120.9993[/C][C]0.3764[/C][C]0.0075[/C][C]0.781[/C][C]0.6853[/C][/ROW]
[ROW][C]212[/C][C]108.6[/C][C]106.3272[/C][C]93.2827[/C][C]120.7918[/C][C]0.3791[/C][C]0.5873[/C][C]0.6492[/C][C]0.6492[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310257&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310257&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])
18897.4-------
189120-------
190117-------
191110.6-------
192105.3-------
193100.9-------
194108.1-------
195119.3-------
196113-------
197108.6-------
198123.3-------
199101.4-------
200103.5-------
201119.4122.0138113.2558131.30540.290710.66451
202113.1120.5794111.7927129.91020.05810.59780.77390.9998
203112115.3037106.4282124.76160.24680.6760.83520.9928
204115.8111.2195101.1971122.02070.20290.44370.85860.9194
205105.4108.224198.1728119.08240.30510.08570.90690.8031
206110.9111.2106100.4404122.88550.47920.83530.69920.9022
207128.5125.0513112.4452138.76350.3110.97850.79450.999
208109115.57103.3925128.86880.16640.02830.64760.9624
209117.2115.9422103.2526129.84990.42970.83610.84960.9602
210124.4124.4024110.4378139.74520.49990.82120.5560.9962
211104.7106.957194.2499120.99930.37640.00750.7810.6853
212108.6106.327293.2827120.79180.37910.58730.64920.6492







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0389-0.02190.02190.02176.83200-0.27860.2786
2020.0395-0.06610.0440.042855.941931.3875.6024-0.79720.5379
2030.0419-0.02950.03920.038210.914124.56274.9561-0.35210.476
2040.04950.03960.03930.038820.98123.66734.86490.48820.479
2050.0512-0.02680.03680.03637.975620.52894.5309-0.3010.4434
2060.0536-0.00280.03110.03070.096517.12354.1381-0.03310.3751
2070.05590.02680.03050.030211.893316.37634.04680.36760.374
2080.0587-0.06030.03420.033843.165119.72494.4413-0.70030.4148
2090.06120.01070.03160.03121.58217.70914.20820.13410.3836
2100.062900.02850.0281015.93813.9923-3e-040.3453
2110.067-0.02160.02780.02755.094414.95243.8668-0.24060.3357
2120.06940.02090.02730.02695.165614.13683.75990.24230.3279

\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.0389 & -0.0219 & 0.0219 & 0.0217 & 6.832 & 0 & 0 & -0.2786 & 0.2786 \tabularnewline
202 & 0.0395 & -0.0661 & 0.044 & 0.0428 & 55.9419 & 31.387 & 5.6024 & -0.7972 & 0.5379 \tabularnewline
203 & 0.0419 & -0.0295 & 0.0392 & 0.0382 & 10.9141 & 24.5627 & 4.9561 & -0.3521 & 0.476 \tabularnewline
204 & 0.0495 & 0.0396 & 0.0393 & 0.0388 & 20.981 & 23.6673 & 4.8649 & 0.4882 & 0.479 \tabularnewline
205 & 0.0512 & -0.0268 & 0.0368 & 0.0363 & 7.9756 & 20.5289 & 4.5309 & -0.301 & 0.4434 \tabularnewline
206 & 0.0536 & -0.0028 & 0.0311 & 0.0307 & 0.0965 & 17.1235 & 4.1381 & -0.0331 & 0.3751 \tabularnewline
207 & 0.0559 & 0.0268 & 0.0305 & 0.0302 & 11.8933 & 16.3763 & 4.0468 & 0.3676 & 0.374 \tabularnewline
208 & 0.0587 & -0.0603 & 0.0342 & 0.0338 & 43.1651 & 19.7249 & 4.4413 & -0.7003 & 0.4148 \tabularnewline
209 & 0.0612 & 0.0107 & 0.0316 & 0.0312 & 1.582 & 17.7091 & 4.2082 & 0.1341 & 0.3836 \tabularnewline
210 & 0.0629 & 0 & 0.0285 & 0.0281 & 0 & 15.9381 & 3.9923 & -3e-04 & 0.3453 \tabularnewline
211 & 0.067 & -0.0216 & 0.0278 & 0.0275 & 5.0944 & 14.9524 & 3.8668 & -0.2406 & 0.3357 \tabularnewline
212 & 0.0694 & 0.0209 & 0.0273 & 0.0269 & 5.1656 & 14.1368 & 3.7599 & 0.2423 & 0.3279 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310257&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.0389[/C][C]-0.0219[/C][C]0.0219[/C][C]0.0217[/C][C]6.832[/C][C]0[/C][C]0[/C][C]-0.2786[/C][C]0.2786[/C][/ROW]
[ROW][C]202[/C][C]0.0395[/C][C]-0.0661[/C][C]0.044[/C][C]0.0428[/C][C]55.9419[/C][C]31.387[/C][C]5.6024[/C][C]-0.7972[/C][C]0.5379[/C][/ROW]
[ROW][C]203[/C][C]0.0419[/C][C]-0.0295[/C][C]0.0392[/C][C]0.0382[/C][C]10.9141[/C][C]24.5627[/C][C]4.9561[/C][C]-0.3521[/C][C]0.476[/C][/ROW]
[ROW][C]204[/C][C]0.0495[/C][C]0.0396[/C][C]0.0393[/C][C]0.0388[/C][C]20.981[/C][C]23.6673[/C][C]4.8649[/C][C]0.4882[/C][C]0.479[/C][/ROW]
[ROW][C]205[/C][C]0.0512[/C][C]-0.0268[/C][C]0.0368[/C][C]0.0363[/C][C]7.9756[/C][C]20.5289[/C][C]4.5309[/C][C]-0.301[/C][C]0.4434[/C][/ROW]
[ROW][C]206[/C][C]0.0536[/C][C]-0.0028[/C][C]0.0311[/C][C]0.0307[/C][C]0.0965[/C][C]17.1235[/C][C]4.1381[/C][C]-0.0331[/C][C]0.3751[/C][/ROW]
[ROW][C]207[/C][C]0.0559[/C][C]0.0268[/C][C]0.0305[/C][C]0.0302[/C][C]11.8933[/C][C]16.3763[/C][C]4.0468[/C][C]0.3676[/C][C]0.374[/C][/ROW]
[ROW][C]208[/C][C]0.0587[/C][C]-0.0603[/C][C]0.0342[/C][C]0.0338[/C][C]43.1651[/C][C]19.7249[/C][C]4.4413[/C][C]-0.7003[/C][C]0.4148[/C][/ROW]
[ROW][C]209[/C][C]0.0612[/C][C]0.0107[/C][C]0.0316[/C][C]0.0312[/C][C]1.582[/C][C]17.7091[/C][C]4.2082[/C][C]0.1341[/C][C]0.3836[/C][/ROW]
[ROW][C]210[/C][C]0.0629[/C][C]0[/C][C]0.0285[/C][C]0.0281[/C][C]0[/C][C]15.9381[/C][C]3.9923[/C][C]-3e-04[/C][C]0.3453[/C][/ROW]
[ROW][C]211[/C][C]0.067[/C][C]-0.0216[/C][C]0.0278[/C][C]0.0275[/C][C]5.0944[/C][C]14.9524[/C][C]3.8668[/C][C]-0.2406[/C][C]0.3357[/C][/ROW]
[ROW][C]212[/C][C]0.0694[/C][C]0.0209[/C][C]0.0273[/C][C]0.0269[/C][C]5.1656[/C][C]14.1368[/C][C]3.7599[/C][C]0.2423[/C][C]0.3279[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310257&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310257&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.0389-0.02190.02190.02176.83200-0.27860.2786
2020.0395-0.06610.0440.042855.941931.3875.6024-0.79720.5379
2030.0419-0.02950.03920.038210.914124.56274.9561-0.35210.476
2040.04950.03960.03930.038820.98123.66734.86490.48820.479
2050.0512-0.02680.03680.03637.975620.52894.5309-0.3010.4434
2060.0536-0.00280.03110.03070.096517.12354.1381-0.03310.3751
2070.05590.02680.03050.030211.893316.37634.04680.36760.374
2080.0587-0.06030.03420.033843.165119.72494.4413-0.70030.4148
2090.06120.01070.03160.03121.58217.70914.20820.13410.3836
2100.062900.02850.0281015.93813.9923-3e-040.3453
2110.067-0.02160.02780.02755.094414.95243.8668-0.24060.3357
2120.06940.02090.02730.02695.165614.13683.75990.24230.3279



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 = 0.2 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; 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')