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 computationSat, 16 Dec 2017 17:42:27 +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/16/t1513443043fdczss8p6ikqxre.htm/, Retrieved Wed, 15 May 2024 08:09:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=309922, Retrieved Wed, 15 May 2024 08:09:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact68
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [voorspelling] [2017-12-16 16:42:27] [f0c04f92d9de470b9a4b46d90127e7c3] [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=309922&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=309922&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309922&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-------
2017884.736375.228494.24430.08250.23760.99990.2376
20284.792.721181.6614103.78090.07760.99550.99520.7885
20394.897.807385.3882110.22640.31750.98070.95880.9353
204101.5104.920391.2766118.56390.31160.9270.98890.9918
205112.4114.011399.2443128.77830.41530.95160.64050.9997
20696.6105.682489.8717121.49320.13010.20250.77080.9849
20796.9103.215786.426120.00540.23050.780.47750.9602
20876.189.870972.1562107.58560.06380.21840.47670.5733
20976.986.125867.5321104.71950.16540.85470.81560.4135
21083.883.746564.3135103.17940.49780.75510.83970.3267
21189.487.008866.7714107.24630.40840.6220.70320.4541
21289.186.884965.8737107.89610.41820.40730.45120.4512

\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 & 84.7363 & 75.2284 & 94.2443 & 0.0825 & 0.2376 & 0.9999 & 0.2376 \tabularnewline
202 & 84.7 & 92.7211 & 81.6614 & 103.7809 & 0.0776 & 0.9955 & 0.9952 & 0.7885 \tabularnewline
203 & 94.8 & 97.8073 & 85.3882 & 110.2264 & 0.3175 & 0.9807 & 0.9588 & 0.9353 \tabularnewline
204 & 101.5 & 104.9203 & 91.2766 & 118.5639 & 0.3116 & 0.927 & 0.9889 & 0.9918 \tabularnewline
205 & 112.4 & 114.0113 & 99.2443 & 128.7783 & 0.4153 & 0.9516 & 0.6405 & 0.9997 \tabularnewline
206 & 96.6 & 105.6824 & 89.8717 & 121.4932 & 0.1301 & 0.2025 & 0.7708 & 0.9849 \tabularnewline
207 & 96.9 & 103.2157 & 86.426 & 120.0054 & 0.2305 & 0.78 & 0.4775 & 0.9602 \tabularnewline
208 & 76.1 & 89.8709 & 72.1562 & 107.5856 & 0.0638 & 0.2184 & 0.4767 & 0.5733 \tabularnewline
209 & 76.9 & 86.1258 & 67.5321 & 104.7195 & 0.1654 & 0.8547 & 0.8156 & 0.4135 \tabularnewline
210 & 83.8 & 83.7465 & 64.3135 & 103.1794 & 0.4978 & 0.7551 & 0.8397 & 0.3267 \tabularnewline
211 & 89.4 & 87.0088 & 66.7714 & 107.2463 & 0.4084 & 0.622 & 0.7032 & 0.4541 \tabularnewline
212 & 89.1 & 86.8849 & 65.8737 & 107.8961 & 0.4182 & 0.4073 & 0.4512 & 0.4512 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309922&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]84.7363[/C][C]75.2284[/C][C]94.2443[/C][C]0.0825[/C][C]0.2376[/C][C]0.9999[/C][C]0.2376[/C][/ROW]
[ROW][C]202[/C][C]84.7[/C][C]92.7211[/C][C]81.6614[/C][C]103.7809[/C][C]0.0776[/C][C]0.9955[/C][C]0.9952[/C][C]0.7885[/C][/ROW]
[ROW][C]203[/C][C]94.8[/C][C]97.8073[/C][C]85.3882[/C][C]110.2264[/C][C]0.3175[/C][C]0.9807[/C][C]0.9588[/C][C]0.9353[/C][/ROW]
[ROW][C]204[/C][C]101.5[/C][C]104.9203[/C][C]91.2766[/C][C]118.5639[/C][C]0.3116[/C][C]0.927[/C][C]0.9889[/C][C]0.9918[/C][/ROW]
[ROW][C]205[/C][C]112.4[/C][C]114.0113[/C][C]99.2443[/C][C]128.7783[/C][C]0.4153[/C][C]0.9516[/C][C]0.6405[/C][C]0.9997[/C][/ROW]
[ROW][C]206[/C][C]96.6[/C][C]105.6824[/C][C]89.8717[/C][C]121.4932[/C][C]0.1301[/C][C]0.2025[/C][C]0.7708[/C][C]0.9849[/C][/ROW]
[ROW][C]207[/C][C]96.9[/C][C]103.2157[/C][C]86.426[/C][C]120.0054[/C][C]0.2305[/C][C]0.78[/C][C]0.4775[/C][C]0.9602[/C][/ROW]
[ROW][C]208[/C][C]76.1[/C][C]89.8709[/C][C]72.1562[/C][C]107.5856[/C][C]0.0638[/C][C]0.2184[/C][C]0.4767[/C][C]0.5733[/C][/ROW]
[ROW][C]209[/C][C]76.9[/C][C]86.1258[/C][C]67.5321[/C][C]104.7195[/C][C]0.1654[/C][C]0.8547[/C][C]0.8156[/C][C]0.4135[/C][/ROW]
[ROW][C]210[/C][C]83.8[/C][C]83.7465[/C][C]64.3135[/C][C]103.1794[/C][C]0.4978[/C][C]0.7551[/C][C]0.8397[/C][C]0.3267[/C][/ROW]
[ROW][C]211[/C][C]89.4[/C][C]87.0088[/C][C]66.7714[/C][C]107.2463[/C][C]0.4084[/C][C]0.622[/C][C]0.7032[/C][C]0.4541[/C][/ROW]
[ROW][C]212[/C][C]89.1[/C][C]86.8849[/C][C]65.8737[/C][C]107.8961[/C][C]0.4182[/C][C]0.4073[/C][C]0.4512[/C][C]0.4512[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309922&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309922&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-------
2017884.736375.228494.24430.08250.23760.99990.2376
20284.792.721181.6614103.78090.07760.99550.99520.7885
20394.897.807385.3882110.22640.31750.98070.95880.9353
204101.5104.920391.2766118.56390.31160.9270.98890.9918
205112.4114.011399.2443128.77830.41530.95160.64050.9997
20696.6105.682489.8717121.49320.13010.20250.77080.9849
20796.9103.215786.426120.00540.23050.780.47750.9602
20876.189.870972.1562107.58560.06380.21840.47670.5733
20976.986.125867.5321104.71950.16540.85470.81560.4135
21083.883.746564.3135103.17940.49780.75510.83970.3267
21189.487.008866.7714107.24630.40840.6220.70320.4541
21289.186.884965.8737107.89610.41820.40730.45120.4512







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0572-0.08640.08640.082845.378200-0.87280.8728
2020.0609-0.09470.09050.086664.338854.85857.4067-1.03930.956
2030.0648-0.03170.07090.06819.043839.58696.2918-0.38960.7672
2040.0663-0.03370.06160.059411.698232.61475.7109-0.44310.6862
2050.0661-0.01430.05220.05042.596326.6115.1586-0.20880.5907
2060.0763-0.0940.05910.056982.490835.92435.9937-1.17680.6884
2070.083-0.06520.060.057839.88836.49066.0407-0.81830.7069
2080.1006-0.1810.07510.0713189.63855.6347.4588-1.78420.8416
2090.1101-0.120.08010.07685.115258.90977.6753-1.19530.8809
2100.11846e-040.07220.06840.002953.0197.28140.00690.7935
2110.11870.02670.0680.06475.717748.71896.97990.30980.7495
2120.12340.02490.06440.06144.906545.06796.71330.2870.711

\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.0572 & -0.0864 & 0.0864 & 0.0828 & 45.3782 & 0 & 0 & -0.8728 & 0.8728 \tabularnewline
202 & 0.0609 & -0.0947 & 0.0905 & 0.0866 & 64.3388 & 54.8585 & 7.4067 & -1.0393 & 0.956 \tabularnewline
203 & 0.0648 & -0.0317 & 0.0709 & 0.0681 & 9.0438 & 39.5869 & 6.2918 & -0.3896 & 0.7672 \tabularnewline
204 & 0.0663 & -0.0337 & 0.0616 & 0.0594 & 11.6982 & 32.6147 & 5.7109 & -0.4431 & 0.6862 \tabularnewline
205 & 0.0661 & -0.0143 & 0.0522 & 0.0504 & 2.5963 & 26.611 & 5.1586 & -0.2088 & 0.5907 \tabularnewline
206 & 0.0763 & -0.094 & 0.0591 & 0.0569 & 82.4908 & 35.9243 & 5.9937 & -1.1768 & 0.6884 \tabularnewline
207 & 0.083 & -0.0652 & 0.06 & 0.0578 & 39.888 & 36.4906 & 6.0407 & -0.8183 & 0.7069 \tabularnewline
208 & 0.1006 & -0.181 & 0.0751 & 0.0713 & 189.638 & 55.634 & 7.4588 & -1.7842 & 0.8416 \tabularnewline
209 & 0.1101 & -0.12 & 0.0801 & 0.076 & 85.1152 & 58.9097 & 7.6753 & -1.1953 & 0.8809 \tabularnewline
210 & 0.1184 & 6e-04 & 0.0722 & 0.0684 & 0.0029 & 53.019 & 7.2814 & 0.0069 & 0.7935 \tabularnewline
211 & 0.1187 & 0.0267 & 0.068 & 0.0647 & 5.7177 & 48.7189 & 6.9799 & 0.3098 & 0.7495 \tabularnewline
212 & 0.1234 & 0.0249 & 0.0644 & 0.0614 & 4.9065 & 45.0679 & 6.7133 & 0.287 & 0.711 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=309922&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.0572[/C][C]-0.0864[/C][C]0.0864[/C][C]0.0828[/C][C]45.3782[/C][C]0[/C][C]0[/C][C]-0.8728[/C][C]0.8728[/C][/ROW]
[ROW][C]202[/C][C]0.0609[/C][C]-0.0947[/C][C]0.0905[/C][C]0.0866[/C][C]64.3388[/C][C]54.8585[/C][C]7.4067[/C][C]-1.0393[/C][C]0.956[/C][/ROW]
[ROW][C]203[/C][C]0.0648[/C][C]-0.0317[/C][C]0.0709[/C][C]0.0681[/C][C]9.0438[/C][C]39.5869[/C][C]6.2918[/C][C]-0.3896[/C][C]0.7672[/C][/ROW]
[ROW][C]204[/C][C]0.0663[/C][C]-0.0337[/C][C]0.0616[/C][C]0.0594[/C][C]11.6982[/C][C]32.6147[/C][C]5.7109[/C][C]-0.4431[/C][C]0.6862[/C][/ROW]
[ROW][C]205[/C][C]0.0661[/C][C]-0.0143[/C][C]0.0522[/C][C]0.0504[/C][C]2.5963[/C][C]26.611[/C][C]5.1586[/C][C]-0.2088[/C][C]0.5907[/C][/ROW]
[ROW][C]206[/C][C]0.0763[/C][C]-0.094[/C][C]0.0591[/C][C]0.0569[/C][C]82.4908[/C][C]35.9243[/C][C]5.9937[/C][C]-1.1768[/C][C]0.6884[/C][/ROW]
[ROW][C]207[/C][C]0.083[/C][C]-0.0652[/C][C]0.06[/C][C]0.0578[/C][C]39.888[/C][C]36.4906[/C][C]6.0407[/C][C]-0.8183[/C][C]0.7069[/C][/ROW]
[ROW][C]208[/C][C]0.1006[/C][C]-0.181[/C][C]0.0751[/C][C]0.0713[/C][C]189.638[/C][C]55.634[/C][C]7.4588[/C][C]-1.7842[/C][C]0.8416[/C][/ROW]
[ROW][C]209[/C][C]0.1101[/C][C]-0.12[/C][C]0.0801[/C][C]0.076[/C][C]85.1152[/C][C]58.9097[/C][C]7.6753[/C][C]-1.1953[/C][C]0.8809[/C][/ROW]
[ROW][C]210[/C][C]0.1184[/C][C]6e-04[/C][C]0.0722[/C][C]0.0684[/C][C]0.0029[/C][C]53.019[/C][C]7.2814[/C][C]0.0069[/C][C]0.7935[/C][/ROW]
[ROW][C]211[/C][C]0.1187[/C][C]0.0267[/C][C]0.068[/C][C]0.0647[/C][C]5.7177[/C][C]48.7189[/C][C]6.9799[/C][C]0.3098[/C][C]0.7495[/C][/ROW]
[ROW][C]212[/C][C]0.1234[/C][C]0.0249[/C][C]0.0644[/C][C]0.0614[/C][C]4.9065[/C][C]45.0679[/C][C]6.7133[/C][C]0.287[/C][C]0.711[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=309922&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=309922&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.0572-0.08640.08640.082845.378200-0.87280.8728
2020.0609-0.09470.09050.086664.338854.85857.4067-1.03930.956
2030.0648-0.03170.07090.06819.043839.58696.2918-0.38960.7672
2040.0663-0.03370.06160.059411.698232.61475.7109-0.44310.6862
2050.0661-0.01430.05220.05042.596326.6115.1586-0.20880.5907
2060.0763-0.0940.05910.056982.490835.92435.9937-1.17680.6884
2070.083-0.06520.060.057839.88836.49066.0407-0.81830.7069
2080.1006-0.1810.07510.0713189.63855.6347.4588-1.78420.8416
2090.1101-0.120.08010.07685.115258.90977.6753-1.19530.8809
2100.11846e-040.07220.06840.002953.0197.28140.00690.7935
2110.11870.02670.0680.06475.717748.71896.97990.30980.7495
2120.12340.02490.06440.06144.906545.06796.71330.2870.711



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