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 computationWed, 20 Dec 2017 11:51:36 +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/20/t1513767109uppbc0yslpjsncn.htm/, Retrieved Tue, 14 May 2024 14:32:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310475, Retrieved Tue, 14 May 2024 14:32:28 +0000
QR Codes:

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

Post a new message
Dataseries X:
63.9
67.1
75.5
68.1
75
71.9
67
67.9
72.7
73.3
71.9
67
72.5
71
76.9
69.1
75.2
72.2
65.7
65
65.6
68.1
63.5
56.3
65.2
65.5
71
71.6
71
70.8
71.8
63.9
71
72.6
68.5
64.3
74.7
70.7
77.1
76.6
71.2
73
71.8
63.3
73.3
74.7
68.1
66.5
72.3
73.6
82.4
78.4
73.1
85.6
80
79.4
90.1
91.1
89
85.4
85.7
82.8
95.7
91.5
87.3
91.5
83.5
84.4
92.2
91.8
92.5
84.8
94.3
91
102
89.8
97.6
100.5
92.9
95.3
98.6
99.2
97.4
89.4
99.2
96
101.4
97.8
103.7
100.5
98
95.6
92.6
105.5
97.1
88.2
106.7
105.6
107.4
113.1
108.4
112
114.5
106.1
112.9
111.7
84.7
72.8
74.3
76.4
77.8
75.7
74.8
85
87.6
81.7
94.3
91.2
85.4
80.3
90.9
92.3
101.9
98.4
102.7
105.6
102.8
95.7
106.8
104.3
101.5
97.2
100.8
101.8
117
104.3
109
107.2
101.7
103.5
103.7
100
99.8
91.4
102.2
104.2
106.3
98.6
102.4
98.4
105.2
99
96.8
102.7
98.1
86.8
101.6
95.6
98.1
99.6
98.1
95.7
99.8
94.5
96
101.8
92.8
84.4
96.9
89.6
99.5
97
90.5
91.8
102
87.4
97.6
98.6
92
88.8
99.9
93.7
100.8
94.1
90.9
94.3
93.2
85
91.4
91.8
86.6
82.7
90.1
93.8
96.2
91.7
86.9
91.6
85.5
86.4
89.2
89.1
89.7
88.1
94.6
90.3
101.4
94.3
97.8
99.5
97.5
90.3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310475&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])
18885-------
18991.4-------
19091.8-------
19186.6-------
19282.7-------
19390.1-------
19493.8-------
19596.2-------
19691.7-------
19786.9-------
19891.6-------
19985.5-------
20086.4-------
20189.290.505881.867899.14390.38350.82420.41960.8242
20289.191.576181.6453101.50690.31250.68050.48240.8465
20389.786.401275.298297.50430.28020.31690.4860.5001
20488.179.887867.448692.3270.09780.0610.32880.1524
20594.688.5475.0129102.06710.190.52540.41060.6217
20690.387.364172.8288101.89950.34610.16460.19270.5517
207101.494.196678.702109.69110.18110.6890.40.838
20894.389.983273.5928106.37350.30290.08610.41870.6658
20997.890.126772.8866107.36680.19150.31760.64310.6641
21099.591.87973.8281109.92990.2040.26010.51210.7241
21197.590.431171.6048109.25750.23090.17250.69620.6626
21290.386.379866.8087105.95090.34730.13270.49920.4992

\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 & 85 & - & - & - & - & - & - & - \tabularnewline
189 & 91.4 & - & - & - & - & - & - & - \tabularnewline
190 & 91.8 & - & - & - & - & - & - & - \tabularnewline
191 & 86.6 & - & - & - & - & - & - & - \tabularnewline
192 & 82.7 & - & - & - & - & - & - & - \tabularnewline
193 & 90.1 & - & - & - & - & - & - & - \tabularnewline
194 & 93.8 & - & - & - & - & - & - & - \tabularnewline
195 & 96.2 & - & - & - & - & - & - & - \tabularnewline
196 & 91.7 & - & - & - & - & - & - & - \tabularnewline
197 & 86.9 & - & - & - & - & - & - & - \tabularnewline
198 & 91.6 & - & - & - & - & - & - & - \tabularnewline
199 & 85.5 & - & - & - & - & - & - & - \tabularnewline
200 & 86.4 & - & - & - & - & - & - & - \tabularnewline
201 & 89.2 & 90.5058 & 81.8678 & 99.1439 & 0.3835 & 0.8242 & 0.4196 & 0.8242 \tabularnewline
202 & 89.1 & 91.5761 & 81.6453 & 101.5069 & 0.3125 & 0.6805 & 0.4824 & 0.8465 \tabularnewline
203 & 89.7 & 86.4012 & 75.2982 & 97.5043 & 0.2802 & 0.3169 & 0.486 & 0.5001 \tabularnewline
204 & 88.1 & 79.8878 & 67.4486 & 92.327 & 0.0978 & 0.061 & 0.3288 & 0.1524 \tabularnewline
205 & 94.6 & 88.54 & 75.0129 & 102.0671 & 0.19 & 0.5254 & 0.4106 & 0.6217 \tabularnewline
206 & 90.3 & 87.3641 & 72.8288 & 101.8995 & 0.3461 & 0.1646 & 0.1927 & 0.5517 \tabularnewline
207 & 101.4 & 94.1966 & 78.702 & 109.6911 & 0.1811 & 0.689 & 0.4 & 0.838 \tabularnewline
208 & 94.3 & 89.9832 & 73.5928 & 106.3735 & 0.3029 & 0.0861 & 0.4187 & 0.6658 \tabularnewline
209 & 97.8 & 90.1267 & 72.8866 & 107.3668 & 0.1915 & 0.3176 & 0.6431 & 0.6641 \tabularnewline
210 & 99.5 & 91.879 & 73.8281 & 109.9299 & 0.204 & 0.2601 & 0.5121 & 0.7241 \tabularnewline
211 & 97.5 & 90.4311 & 71.6048 & 109.2575 & 0.2309 & 0.1725 & 0.6962 & 0.6626 \tabularnewline
212 & 90.3 & 86.3798 & 66.8087 & 105.9509 & 0.3473 & 0.1327 & 0.4992 & 0.4992 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310475&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]85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]91.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]91.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]86.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]82.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]90.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]93.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]96.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]91.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]86.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]91.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]85.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]86.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]89.2[/C][C]90.5058[/C][C]81.8678[/C][C]99.1439[/C][C]0.3835[/C][C]0.8242[/C][C]0.4196[/C][C]0.8242[/C][/ROW]
[ROW][C]202[/C][C]89.1[/C][C]91.5761[/C][C]81.6453[/C][C]101.5069[/C][C]0.3125[/C][C]0.6805[/C][C]0.4824[/C][C]0.8465[/C][/ROW]
[ROW][C]203[/C][C]89.7[/C][C]86.4012[/C][C]75.2982[/C][C]97.5043[/C][C]0.2802[/C][C]0.3169[/C][C]0.486[/C][C]0.5001[/C][/ROW]
[ROW][C]204[/C][C]88.1[/C][C]79.8878[/C][C]67.4486[/C][C]92.327[/C][C]0.0978[/C][C]0.061[/C][C]0.3288[/C][C]0.1524[/C][/ROW]
[ROW][C]205[/C][C]94.6[/C][C]88.54[/C][C]75.0129[/C][C]102.0671[/C][C]0.19[/C][C]0.5254[/C][C]0.4106[/C][C]0.6217[/C][/ROW]
[ROW][C]206[/C][C]90.3[/C][C]87.3641[/C][C]72.8288[/C][C]101.8995[/C][C]0.3461[/C][C]0.1646[/C][C]0.1927[/C][C]0.5517[/C][/ROW]
[ROW][C]207[/C][C]101.4[/C][C]94.1966[/C][C]78.702[/C][C]109.6911[/C][C]0.1811[/C][C]0.689[/C][C]0.4[/C][C]0.838[/C][/ROW]
[ROW][C]208[/C][C]94.3[/C][C]89.9832[/C][C]73.5928[/C][C]106.3735[/C][C]0.3029[/C][C]0.0861[/C][C]0.4187[/C][C]0.6658[/C][/ROW]
[ROW][C]209[/C][C]97.8[/C][C]90.1267[/C][C]72.8866[/C][C]107.3668[/C][C]0.1915[/C][C]0.3176[/C][C]0.6431[/C][C]0.6641[/C][/ROW]
[ROW][C]210[/C][C]99.5[/C][C]91.879[/C][C]73.8281[/C][C]109.9299[/C][C]0.204[/C][C]0.2601[/C][C]0.5121[/C][C]0.7241[/C][/ROW]
[ROW][C]211[/C][C]97.5[/C][C]90.4311[/C][C]71.6048[/C][C]109.2575[/C][C]0.2309[/C][C]0.1725[/C][C]0.6962[/C][C]0.6626[/C][/ROW]
[ROW][C]212[/C][C]90.3[/C][C]86.3798[/C][C]66.8087[/C][C]105.9509[/C][C]0.3473[/C][C]0.1327[/C][C]0.4992[/C][C]0.4992[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310475&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310475&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])
18885-------
18991.4-------
19091.8-------
19186.6-------
19282.7-------
19390.1-------
19493.8-------
19596.2-------
19691.7-------
19786.9-------
19891.6-------
19985.5-------
20086.4-------
20189.290.505881.867899.14390.38350.82420.41960.8242
20289.191.576181.6453101.50690.31250.68050.48240.8465
20389.786.401275.298297.50430.28020.31690.4860.5001
20488.179.887867.448692.3270.09780.0610.32880.1524
20594.688.5475.0129102.06710.190.52540.41060.6217
20690.387.364172.8288101.89950.34610.16460.19270.5517
207101.494.196678.702109.69110.18110.6890.40.838
20894.389.983273.5928106.37350.30290.08610.41870.6658
20997.890.126772.8866107.36680.19150.31760.64310.6641
21099.591.87973.8281109.92990.2040.26010.51210.7241
21197.590.431171.6048109.25750.23090.17250.69620.6626
21290.386.379866.8087105.95090.34730.13270.49920.4992







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0487-0.01460.01460.01451.705200-0.31430.3143
2020.0553-0.02780.02120.0216.13123.91821.9794-0.5960.4552
2030.06560.03680.02640.026510.88186.23942.49790.7940.5681
2040.07940.09320.04310.044367.4421.53954.64111.97670.9203
2050.07790.06410.04730.048736.723824.57644.95751.45861.0279
2060.08490.03250.04480.04618.619221.91694.68150.70670.9744
2070.08390.0710.04860.0551.889326.19865.11851.73391.0829
2080.09290.04580.04820.049618.635225.25325.02531.03911.0774
2090.09760.07850.05160.053258.879428.98945.38421.8471.1629
2100.10020.07660.05410.055858.07931.89845.64791.83441.2301
2110.10620.07250.05580.057649.96933.54125.79151.70151.2729
2120.11560.04340.05470.056515.368132.02685.65920.94361.2455

\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.0487 & -0.0146 & 0.0146 & 0.0145 & 1.7052 & 0 & 0 & -0.3143 & 0.3143 \tabularnewline
202 & 0.0553 & -0.0278 & 0.0212 & 0.021 & 6.1312 & 3.9182 & 1.9794 & -0.596 & 0.4552 \tabularnewline
203 & 0.0656 & 0.0368 & 0.0264 & 0.0265 & 10.8818 & 6.2394 & 2.4979 & 0.794 & 0.5681 \tabularnewline
204 & 0.0794 & 0.0932 & 0.0431 & 0.0443 & 67.44 & 21.5395 & 4.6411 & 1.9767 & 0.9203 \tabularnewline
205 & 0.0779 & 0.0641 & 0.0473 & 0.0487 & 36.7238 & 24.5764 & 4.9575 & 1.4586 & 1.0279 \tabularnewline
206 & 0.0849 & 0.0325 & 0.0448 & 0.0461 & 8.6192 & 21.9169 & 4.6815 & 0.7067 & 0.9744 \tabularnewline
207 & 0.0839 & 0.071 & 0.0486 & 0.05 & 51.8893 & 26.1986 & 5.1185 & 1.7339 & 1.0829 \tabularnewline
208 & 0.0929 & 0.0458 & 0.0482 & 0.0496 & 18.6352 & 25.2532 & 5.0253 & 1.0391 & 1.0774 \tabularnewline
209 & 0.0976 & 0.0785 & 0.0516 & 0.0532 & 58.8794 & 28.9894 & 5.3842 & 1.847 & 1.1629 \tabularnewline
210 & 0.1002 & 0.0766 & 0.0541 & 0.0558 & 58.079 & 31.8984 & 5.6479 & 1.8344 & 1.2301 \tabularnewline
211 & 0.1062 & 0.0725 & 0.0558 & 0.0576 & 49.969 & 33.5412 & 5.7915 & 1.7015 & 1.2729 \tabularnewline
212 & 0.1156 & 0.0434 & 0.0547 & 0.0565 & 15.3681 & 32.0268 & 5.6592 & 0.9436 & 1.2455 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310475&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.0487[/C][C]-0.0146[/C][C]0.0146[/C][C]0.0145[/C][C]1.7052[/C][C]0[/C][C]0[/C][C]-0.3143[/C][C]0.3143[/C][/ROW]
[ROW][C]202[/C][C]0.0553[/C][C]-0.0278[/C][C]0.0212[/C][C]0.021[/C][C]6.1312[/C][C]3.9182[/C][C]1.9794[/C][C]-0.596[/C][C]0.4552[/C][/ROW]
[ROW][C]203[/C][C]0.0656[/C][C]0.0368[/C][C]0.0264[/C][C]0.0265[/C][C]10.8818[/C][C]6.2394[/C][C]2.4979[/C][C]0.794[/C][C]0.5681[/C][/ROW]
[ROW][C]204[/C][C]0.0794[/C][C]0.0932[/C][C]0.0431[/C][C]0.0443[/C][C]67.44[/C][C]21.5395[/C][C]4.6411[/C][C]1.9767[/C][C]0.9203[/C][/ROW]
[ROW][C]205[/C][C]0.0779[/C][C]0.0641[/C][C]0.0473[/C][C]0.0487[/C][C]36.7238[/C][C]24.5764[/C][C]4.9575[/C][C]1.4586[/C][C]1.0279[/C][/ROW]
[ROW][C]206[/C][C]0.0849[/C][C]0.0325[/C][C]0.0448[/C][C]0.0461[/C][C]8.6192[/C][C]21.9169[/C][C]4.6815[/C][C]0.7067[/C][C]0.9744[/C][/ROW]
[ROW][C]207[/C][C]0.0839[/C][C]0.071[/C][C]0.0486[/C][C]0.05[/C][C]51.8893[/C][C]26.1986[/C][C]5.1185[/C][C]1.7339[/C][C]1.0829[/C][/ROW]
[ROW][C]208[/C][C]0.0929[/C][C]0.0458[/C][C]0.0482[/C][C]0.0496[/C][C]18.6352[/C][C]25.2532[/C][C]5.0253[/C][C]1.0391[/C][C]1.0774[/C][/ROW]
[ROW][C]209[/C][C]0.0976[/C][C]0.0785[/C][C]0.0516[/C][C]0.0532[/C][C]58.8794[/C][C]28.9894[/C][C]5.3842[/C][C]1.847[/C][C]1.1629[/C][/ROW]
[ROW][C]210[/C][C]0.1002[/C][C]0.0766[/C][C]0.0541[/C][C]0.0558[/C][C]58.079[/C][C]31.8984[/C][C]5.6479[/C][C]1.8344[/C][C]1.2301[/C][/ROW]
[ROW][C]211[/C][C]0.1062[/C][C]0.0725[/C][C]0.0558[/C][C]0.0576[/C][C]49.969[/C][C]33.5412[/C][C]5.7915[/C][C]1.7015[/C][C]1.2729[/C][/ROW]
[ROW][C]212[/C][C]0.1156[/C][C]0.0434[/C][C]0.0547[/C][C]0.0565[/C][C]15.3681[/C][C]32.0268[/C][C]5.6592[/C][C]0.9436[/C][C]1.2455[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310475&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310475&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.0487-0.01460.01460.01451.705200-0.31430.3143
2020.0553-0.02780.02120.0216.13123.91821.9794-0.5960.4552
2030.06560.03680.02640.026510.88186.23942.49790.7940.5681
2040.07940.09320.04310.044367.4421.53954.64111.97670.9203
2050.07790.06410.04730.048736.723824.57644.95751.45861.0279
2060.08490.03250.04480.04618.619221.91694.68150.70670.9744
2070.08390.0710.04860.0551.889326.19865.11851.73391.0829
2080.09290.04580.04820.049618.635225.25325.02531.03911.0774
2090.09760.07850.05160.053258.879428.98945.38421.8471.1629
2100.10020.07660.05410.055858.07931.89845.64791.83441.2301
2110.10620.07250.05580.057649.96933.54125.79151.70151.2729
2120.11560.04340.05470.056515.368132.02685.65920.94361.2455



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