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, 12 Dec 2017 21:09:09 +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/12/t1513109985oyv9tqxvm3b0iq1.htm/, Retrieved Wed, 15 May 2024 13:24:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=309185, Retrieved Wed, 15 May 2024 13:24:40 +0000
QR Codes:

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

Post a new message
Dataseries X:
99.5
89.9
96
86.9
85.6
82.5
80.5
82.7
87.7
92.2
93.9
94.5
94.8
85
87.4
79.5
80.5
79.8
78.8
81.5
82.6
89.5
90.7
90.7
95.7
86.6
92.4
86.3
84.7
83.1
82.2
84.5
81.2
88.2
89.1
89.1
98
91.7
90.9
87.1
84.5
83.5
85.9
89
87.6
92.9
89.1
96.9
104.1
93
98
85.9
84.8
81.5
85.3
79.3
82.3
87.8
95
104.4
103.5
99.5
96.6
88.1
86.4
83.6
85.7
79.8
81.9
87.1
92
106.1
108.5
101.4
100.1
84.4
81.6
81.5
80.9
79.9
81.2
90.5
91.7
102.7
104.8
98.7
100.8
93.6
88.1
86.8
80.8
84.6
82
93.6
99.7
102.1
106.6
95.9
92.1
85.9
79.3
83.7
84.1
83.2
85
93.1
95.4
107.3
112.5
97.8
99.1
85.6
87.2
86
92.7
98.8
99.2
101.4
98.8
113.2
119.2
107.4
111.6
94.8
97.7
87.3
91.4
93.4
90.8
96.1
102.6
107.7
111.4
98.9
100.7
91
94.8
87.3
88.8
92.3
90.9
95.2
98.2
103.5
109.7
116.4
87.5
87.2
85.5
79
81.8
78.2
78.9
76.9
84.4
93.1
101.6
97.1
99.3
77.8
74.3
80.4
85.3
80.1
78.8
91.8
100
108.4
101.7
94.4
89.5
69.8
72.5
69.1
71.9
67
63.8
73.2
74.2
84.7
97.8
87.4
81.8
68.6
64.9
64.1
63.6
59.8
66.3
78.1
86.8
89
111.3
99.7
103.7
90.4
77.6
73.9
81.5
88.2
78
84.7
94.8
101.5
112.4
96.6
96.9
76.1
76.9
83.8
89.4
89.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=309185&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=309185&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309185&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])
18859.8-------
18966.3-------
19078.1-------
19186.8-------
19289-------
193111.3-------
19499.7-------
195103.7-------
19690.4-------
19777.6-------
19873.9-------
19981.5-------
20088.2-------
2017885.799874.760695.68630.0610.31710.99990.3171
20284.793.825581.6279104.73730.05060.99780.99760.8439
20394.898.13484.0209110.61750.30030.98250.96240.9406
204101.5104.965889.9781118.23410.30430.93340.99080.9934
205112.4112.982897.4823126.7680.4670.94870.59460.9998
20696.6105.339487.034121.14280.13920.19060.75790.9832
20796.9103.173782.8495120.39680.23760.77280.47610.9558
20876.191.138965.8501111.25440.07140.28730.52870.6127
20976.987.954459.585109.74640.16010.85680.82410.4912
21083.885.739454.3834109.03930.43520.77140.84040.418
21189.488.724256.9194112.48940.47780.65770.72430.5172
21289.188.96855.4273113.67680.49580.48630.52430.5243

\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 & 59.8 & - & - & - & - & - & - & - \tabularnewline
189 & 66.3 & - & - & - & - & - & - & - \tabularnewline
190 & 78.1 & - & - & - & - & - & - & - \tabularnewline
191 & 86.8 & - & - & - & - & - & - & - \tabularnewline
192 & 89 & - & - & - & - & - & - & - \tabularnewline
193 & 111.3 & - & - & - & - & - & - & - \tabularnewline
194 & 99.7 & - & - & - & - & - & - & - \tabularnewline
195 & 103.7 & - & - & - & - & - & - & - \tabularnewline
196 & 90.4 & - & - & - & - & - & - & - \tabularnewline
197 & 77.6 & - & - & - & - & - & - & - \tabularnewline
198 & 73.9 & - & - & - & - & - & - & - \tabularnewline
199 & 81.5 & - & - & - & - & - & - & - \tabularnewline
200 & 88.2 & - & - & - & - & - & - & - \tabularnewline
201 & 78 & 85.7998 & 74.7606 & 95.6863 & 0.061 & 0.3171 & 0.9999 & 0.3171 \tabularnewline
202 & 84.7 & 93.8255 & 81.6279 & 104.7373 & 0.0506 & 0.9978 & 0.9976 & 0.8439 \tabularnewline
203 & 94.8 & 98.134 & 84.0209 & 110.6175 & 0.3003 & 0.9825 & 0.9624 & 0.9406 \tabularnewline
204 & 101.5 & 104.9658 & 89.9781 & 118.2341 & 0.3043 & 0.9334 & 0.9908 & 0.9934 \tabularnewline
205 & 112.4 & 112.9828 & 97.4823 & 126.768 & 0.467 & 0.9487 & 0.5946 & 0.9998 \tabularnewline
206 & 96.6 & 105.3394 & 87.034 & 121.1428 & 0.1392 & 0.1906 & 0.7579 & 0.9832 \tabularnewline
207 & 96.9 & 103.1737 & 82.8495 & 120.3968 & 0.2376 & 0.7728 & 0.4761 & 0.9558 \tabularnewline
208 & 76.1 & 91.1389 & 65.8501 & 111.2544 & 0.0714 & 0.2873 & 0.5287 & 0.6127 \tabularnewline
209 & 76.9 & 87.9544 & 59.585 & 109.7464 & 0.1601 & 0.8568 & 0.8241 & 0.4912 \tabularnewline
210 & 83.8 & 85.7394 & 54.3834 & 109.0393 & 0.4352 & 0.7714 & 0.8404 & 0.418 \tabularnewline
211 & 89.4 & 88.7242 & 56.9194 & 112.4894 & 0.4778 & 0.6577 & 0.7243 & 0.5172 \tabularnewline
212 & 89.1 & 88.968 & 55.4273 & 113.6768 & 0.4958 & 0.4863 & 0.5243 & 0.5243 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309185&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]59.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]66.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]78.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]86.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]111.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]99.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]103.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]90.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]77.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]73.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]81.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]88.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]78[/C][C]85.7998[/C][C]74.7606[/C][C]95.6863[/C][C]0.061[/C][C]0.3171[/C][C]0.9999[/C][C]0.3171[/C][/ROW]
[ROW][C]202[/C][C]84.7[/C][C]93.8255[/C][C]81.6279[/C][C]104.7373[/C][C]0.0506[/C][C]0.9978[/C][C]0.9976[/C][C]0.8439[/C][/ROW]
[ROW][C]203[/C][C]94.8[/C][C]98.134[/C][C]84.0209[/C][C]110.6175[/C][C]0.3003[/C][C]0.9825[/C][C]0.9624[/C][C]0.9406[/C][/ROW]
[ROW][C]204[/C][C]101.5[/C][C]104.9658[/C][C]89.9781[/C][C]118.2341[/C][C]0.3043[/C][C]0.9334[/C][C]0.9908[/C][C]0.9934[/C][/ROW]
[ROW][C]205[/C][C]112.4[/C][C]112.9828[/C][C]97.4823[/C][C]126.768[/C][C]0.467[/C][C]0.9487[/C][C]0.5946[/C][C]0.9998[/C][/ROW]
[ROW][C]206[/C][C]96.6[/C][C]105.3394[/C][C]87.034[/C][C]121.1428[/C][C]0.1392[/C][C]0.1906[/C][C]0.7579[/C][C]0.9832[/C][/ROW]
[ROW][C]207[/C][C]96.9[/C][C]103.1737[/C][C]82.8495[/C][C]120.3968[/C][C]0.2376[/C][C]0.7728[/C][C]0.4761[/C][C]0.9558[/C][/ROW]
[ROW][C]208[/C][C]76.1[/C][C]91.1389[/C][C]65.8501[/C][C]111.2544[/C][C]0.0714[/C][C]0.2873[/C][C]0.5287[/C][C]0.6127[/C][/ROW]
[ROW][C]209[/C][C]76.9[/C][C]87.9544[/C][C]59.585[/C][C]109.7464[/C][C]0.1601[/C][C]0.8568[/C][C]0.8241[/C][C]0.4912[/C][/ROW]
[ROW][C]210[/C][C]83.8[/C][C]85.7394[/C][C]54.3834[/C][C]109.0393[/C][C]0.4352[/C][C]0.7714[/C][C]0.8404[/C][C]0.418[/C][/ROW]
[ROW][C]211[/C][C]89.4[/C][C]88.7242[/C][C]56.9194[/C][C]112.4894[/C][C]0.4778[/C][C]0.6577[/C][C]0.7243[/C][C]0.5172[/C][/ROW]
[ROW][C]212[/C][C]89.1[/C][C]88.968[/C][C]55.4273[/C][C]113.6768[/C][C]0.4958[/C][C]0.4863[/C][C]0.5243[/C][C]0.5243[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309185&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309185&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])
18859.8-------
18966.3-------
19078.1-------
19186.8-------
19289-------
193111.3-------
19499.7-------
195103.7-------
19690.4-------
19777.6-------
19873.9-------
19981.5-------
20088.2-------
2017885.799874.760695.68630.0610.31710.99990.3171
20284.793.825581.6279104.73730.05060.99780.99760.8439
20394.898.13484.0209110.61750.30030.98250.96240.9406
204101.5104.965889.9781118.23410.30430.93340.99080.9934
205112.4112.982897.4823126.7680.4670.94870.59460.9998
20696.6105.339487.034121.14280.13920.19060.75790.9832
20796.9103.173782.8495120.39680.23760.77280.47610.9558
20876.191.138965.8501111.25440.07140.28730.52870.6127
20976.987.954459.585109.74640.16010.85680.82410.4912
21083.885.739454.3834109.03930.43520.77140.84040.418
21189.488.724256.9194112.48940.47780.65770.72430.5172
21289.188.96855.4273113.67680.49580.48630.52430.5243







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0588-0.10.10.095260.837300-1.01061.0106
2020.0593-0.10770.10390.098783.274572.05598.4886-1.18231.0965
2030.0649-0.03520.0810.077311.115851.74257.1932-0.4320.875
2040.0645-0.03410.06930.066412.011641.80986.4661-0.4490.7685
2050.0623-0.00520.05640.05420.339733.51585.7893-0.07550.6299
2060.0765-0.09050.06210.059676.377140.65936.3765-1.13230.7136
2070.0852-0.06470.06250.0639.359540.47376.3619-0.81280.7278
2080.1126-0.19760.07940.075226.169463.68567.9803-1.94850.8804
2090.1264-0.14370.08650.0816122.199270.18718.3778-1.43230.9417
2100.1386-0.02310.08020.07573.761163.54457.9715-0.25130.8727
2110.13670.00760.07360.06950.456757.80937.60320.08760.8013
2120.14170.00150.06760.06380.017452.99337.27960.01710.7359

\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.0588 & -0.1 & 0.1 & 0.0952 & 60.8373 & 0 & 0 & -1.0106 & 1.0106 \tabularnewline
202 & 0.0593 & -0.1077 & 0.1039 & 0.0987 & 83.2745 & 72.0559 & 8.4886 & -1.1823 & 1.0965 \tabularnewline
203 & 0.0649 & -0.0352 & 0.081 & 0.0773 & 11.1158 & 51.7425 & 7.1932 & -0.432 & 0.875 \tabularnewline
204 & 0.0645 & -0.0341 & 0.0693 & 0.0664 & 12.0116 & 41.8098 & 6.4661 & -0.449 & 0.7685 \tabularnewline
205 & 0.0623 & -0.0052 & 0.0564 & 0.0542 & 0.3397 & 33.5158 & 5.7893 & -0.0755 & 0.6299 \tabularnewline
206 & 0.0765 & -0.0905 & 0.0621 & 0.0596 & 76.3771 & 40.6593 & 6.3765 & -1.1323 & 0.7136 \tabularnewline
207 & 0.0852 & -0.0647 & 0.0625 & 0.06 & 39.3595 & 40.4737 & 6.3619 & -0.8128 & 0.7278 \tabularnewline
208 & 0.1126 & -0.1976 & 0.0794 & 0.075 & 226.1694 & 63.6856 & 7.9803 & -1.9485 & 0.8804 \tabularnewline
209 & 0.1264 & -0.1437 & 0.0865 & 0.0816 & 122.1992 & 70.1871 & 8.3778 & -1.4323 & 0.9417 \tabularnewline
210 & 0.1386 & -0.0231 & 0.0802 & 0.0757 & 3.7611 & 63.5445 & 7.9715 & -0.2513 & 0.8727 \tabularnewline
211 & 0.1367 & 0.0076 & 0.0736 & 0.0695 & 0.4567 & 57.8093 & 7.6032 & 0.0876 & 0.8013 \tabularnewline
212 & 0.1417 & 0.0015 & 0.0676 & 0.0638 & 0.0174 & 52.9933 & 7.2796 & 0.0171 & 0.7359 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309185&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.0588[/C][C]-0.1[/C][C]0.1[/C][C]0.0952[/C][C]60.8373[/C][C]0[/C][C]0[/C][C]-1.0106[/C][C]1.0106[/C][/ROW]
[ROW][C]202[/C][C]0.0593[/C][C]-0.1077[/C][C]0.1039[/C][C]0.0987[/C][C]83.2745[/C][C]72.0559[/C][C]8.4886[/C][C]-1.1823[/C][C]1.0965[/C][/ROW]
[ROW][C]203[/C][C]0.0649[/C][C]-0.0352[/C][C]0.081[/C][C]0.0773[/C][C]11.1158[/C][C]51.7425[/C][C]7.1932[/C][C]-0.432[/C][C]0.875[/C][/ROW]
[ROW][C]204[/C][C]0.0645[/C][C]-0.0341[/C][C]0.0693[/C][C]0.0664[/C][C]12.0116[/C][C]41.8098[/C][C]6.4661[/C][C]-0.449[/C][C]0.7685[/C][/ROW]
[ROW][C]205[/C][C]0.0623[/C][C]-0.0052[/C][C]0.0564[/C][C]0.0542[/C][C]0.3397[/C][C]33.5158[/C][C]5.7893[/C][C]-0.0755[/C][C]0.6299[/C][/ROW]
[ROW][C]206[/C][C]0.0765[/C][C]-0.0905[/C][C]0.0621[/C][C]0.0596[/C][C]76.3771[/C][C]40.6593[/C][C]6.3765[/C][C]-1.1323[/C][C]0.7136[/C][/ROW]
[ROW][C]207[/C][C]0.0852[/C][C]-0.0647[/C][C]0.0625[/C][C]0.06[/C][C]39.3595[/C][C]40.4737[/C][C]6.3619[/C][C]-0.8128[/C][C]0.7278[/C][/ROW]
[ROW][C]208[/C][C]0.1126[/C][C]-0.1976[/C][C]0.0794[/C][C]0.075[/C][C]226.1694[/C][C]63.6856[/C][C]7.9803[/C][C]-1.9485[/C][C]0.8804[/C][/ROW]
[ROW][C]209[/C][C]0.1264[/C][C]-0.1437[/C][C]0.0865[/C][C]0.0816[/C][C]122.1992[/C][C]70.1871[/C][C]8.3778[/C][C]-1.4323[/C][C]0.9417[/C][/ROW]
[ROW][C]210[/C][C]0.1386[/C][C]-0.0231[/C][C]0.0802[/C][C]0.0757[/C][C]3.7611[/C][C]63.5445[/C][C]7.9715[/C][C]-0.2513[/C][C]0.8727[/C][/ROW]
[ROW][C]211[/C][C]0.1367[/C][C]0.0076[/C][C]0.0736[/C][C]0.0695[/C][C]0.4567[/C][C]57.8093[/C][C]7.6032[/C][C]0.0876[/C][C]0.8013[/C][/ROW]
[ROW][C]212[/C][C]0.1417[/C][C]0.0015[/C][C]0.0676[/C][C]0.0638[/C][C]0.0174[/C][C]52.9933[/C][C]7.2796[/C][C]0.0171[/C][C]0.7359[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309185&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309185&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.0588-0.10.10.095260.837300-1.01061.0106
2020.0593-0.10770.10390.098783.274572.05598.4886-1.18231.0965
2030.0649-0.03520.0810.077311.115851.74257.1932-0.4320.875
2040.0645-0.03410.06930.066412.011641.80986.4661-0.4490.7685
2050.0623-0.00520.05640.05420.339733.51585.7893-0.07550.6299
2060.0765-0.09050.06210.059676.377140.65936.3765-1.13230.7136
2070.0852-0.06470.06250.0639.359540.47376.3619-0.81280.7278
2080.1126-0.19760.07940.075226.169463.68567.9803-1.94850.8804
2090.1264-0.14370.08650.0816122.199270.18718.3778-1.43230.9417
2100.1386-0.02310.08020.07573.761163.54457.9715-0.25130.8727
2110.13670.00760.07360.06950.456757.80937.60320.08760.8013
2120.14170.00150.06760.06380.017452.99337.27960.01710.7359



Parameters (Session):
par1 = Default ; par2 = 1 ; par3 = 2 ; par4 = 1 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ;
Parameters (R input):
par1 = 12 ; par2 = 1.9 ; par3 = 2 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; 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')