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, 19 Dec 2017 14:51:19 +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/19/t1513691578hw94zb14iui6z20.htm/, Retrieved Wed, 15 May 2024 00:25:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310351, Retrieved Wed, 15 May 2024 00:25:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact58
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting] [2017-12-19 13:51:19] [19616f283b6fb6898d2f08fc009ad795] [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 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=310351&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=310351&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310351&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])
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.7116.0687108.6603123.82370.27470.99980.83590.9998
202109.5116.4605108.931124.34690.04180.75370.88650.9998
203110.3112.8232105.1319120.89990.27020.790.89750.9954
204114.5109.6226100.8257118.94320.15250.44340.90470.9432
205107108.313199.3654117.81010.39320.10080.83460.9001
206109.4109.7995100.3415119.86450.4690.70720.65870.9331
207124.6121.0857110.2721132.62070.27520.97650.70590.9994
208104.8111.7454101.226123.00710.11340.01260.59260.9534
209112111.7396100.8104123.47240.48270.87680.88990.9463
210119.2118.49106.6335131.23990.45650.84080.63760.9941
211103104.058892.94116.07690.43150.00680.79990.6253
212106.5103.657892.2197116.05380.32660.54140.59730.5973

\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 & 116.0687 & 108.6603 & 123.8237 & 0.2747 & 0.9998 & 0.8359 & 0.9998 \tabularnewline
202 & 109.5 & 116.4605 & 108.931 & 124.3469 & 0.0418 & 0.7537 & 0.8865 & 0.9998 \tabularnewline
203 & 110.3 & 112.8232 & 105.1319 & 120.8999 & 0.2702 & 0.79 & 0.8975 & 0.9954 \tabularnewline
204 & 114.5 & 109.6226 & 100.8257 & 118.9432 & 0.1525 & 0.4434 & 0.9047 & 0.9432 \tabularnewline
205 & 107 & 108.3131 & 99.3654 & 117.8101 & 0.3932 & 0.1008 & 0.8346 & 0.9001 \tabularnewline
206 & 109.4 & 109.7995 & 100.3415 & 119.8645 & 0.469 & 0.7072 & 0.6587 & 0.9331 \tabularnewline
207 & 124.6 & 121.0857 & 110.2721 & 132.6207 & 0.2752 & 0.9765 & 0.7059 & 0.9994 \tabularnewline
208 & 104.8 & 111.7454 & 101.226 & 123.0071 & 0.1134 & 0.0126 & 0.5926 & 0.9534 \tabularnewline
209 & 112 & 111.7396 & 100.8104 & 123.4724 & 0.4827 & 0.8768 & 0.8899 & 0.9463 \tabularnewline
210 & 119.2 & 118.49 & 106.6335 & 131.2399 & 0.4565 & 0.8408 & 0.6376 & 0.9941 \tabularnewline
211 & 103 & 104.0588 & 92.94 & 116.0769 & 0.4315 & 0.0068 & 0.7999 & 0.6253 \tabularnewline
212 & 106.5 & 103.6578 & 92.2197 & 116.0538 & 0.3266 & 0.5414 & 0.5973 & 0.5973 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310351&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]116.0687[/C][C]108.6603[/C][C]123.8237[/C][C]0.2747[/C][C]0.9998[/C][C]0.8359[/C][C]0.9998[/C][/ROW]
[ROW][C]202[/C][C]109.5[/C][C]116.4605[/C][C]108.931[/C][C]124.3469[/C][C]0.0418[/C][C]0.7537[/C][C]0.8865[/C][C]0.9998[/C][/ROW]
[ROW][C]203[/C][C]110.3[/C][C]112.8232[/C][C]105.1319[/C][C]120.8999[/C][C]0.2702[/C][C]0.79[/C][C]0.8975[/C][C]0.9954[/C][/ROW]
[ROW][C]204[/C][C]114.5[/C][C]109.6226[/C][C]100.8257[/C][C]118.9432[/C][C]0.1525[/C][C]0.4434[/C][C]0.9047[/C][C]0.9432[/C][/ROW]
[ROW][C]205[/C][C]107[/C][C]108.3131[/C][C]99.3654[/C][C]117.8101[/C][C]0.3932[/C][C]0.1008[/C][C]0.8346[/C][C]0.9001[/C][/ROW]
[ROW][C]206[/C][C]109.4[/C][C]109.7995[/C][C]100.3415[/C][C]119.8645[/C][C]0.469[/C][C]0.7072[/C][C]0.6587[/C][C]0.9331[/C][/ROW]
[ROW][C]207[/C][C]124.6[/C][C]121.0857[/C][C]110.2721[/C][C]132.6207[/C][C]0.2752[/C][C]0.9765[/C][C]0.7059[/C][C]0.9994[/C][/ROW]
[ROW][C]208[/C][C]104.8[/C][C]111.7454[/C][C]101.226[/C][C]123.0071[/C][C]0.1134[/C][C]0.0126[/C][C]0.5926[/C][C]0.9534[/C][/ROW]
[ROW][C]209[/C][C]112[/C][C]111.7396[/C][C]100.8104[/C][C]123.4724[/C][C]0.4827[/C][C]0.8768[/C][C]0.8899[/C][C]0.9463[/C][/ROW]
[ROW][C]210[/C][C]119.2[/C][C]118.49[/C][C]106.6335[/C][C]131.2399[/C][C]0.4565[/C][C]0.8408[/C][C]0.6376[/C][C]0.9941[/C][/ROW]
[ROW][C]211[/C][C]103[/C][C]104.0588[/C][C]92.94[/C][C]116.0769[/C][C]0.4315[/C][C]0.0068[/C][C]0.7999[/C][C]0.6253[/C][/ROW]
[ROW][C]212[/C][C]106.5[/C][C]103.6578[/C][C]92.2197[/C][C]116.0538[/C][C]0.3266[/C][C]0.5414[/C][C]0.5973[/C][C]0.5973[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310351&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310351&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.7116.0687108.6603123.82370.27470.99980.83590.9998
202109.5116.4605108.931124.34690.04180.75370.88650.9998
203110.3112.8232105.1319120.89990.27020.790.89750.9954
204114.5109.6226100.8257118.94320.15250.44340.90470.9432
205107108.313199.3654117.81010.39320.10080.83460.9001
206109.4109.7995100.3415119.86450.4690.70720.65870.9331
207124.6121.0857110.2721132.62070.27520.97650.70590.9994
208104.8111.7454101.226123.00710.11340.01260.59260.9534
209112111.7396100.8104123.47240.48270.87680.88990.9463
210119.2118.49106.6335131.23990.45650.84080.63760.9941
211103104.058892.94116.07690.43150.00680.79990.6253
212106.5103.657892.2197116.05380.32660.54140.59730.5973







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0341-0.02080.02080.02065.610900-0.29540.2954
2020.0345-0.06360.04220.041148.448427.02975.199-0.86810.5818
2030.0365-0.02290.03580.03496.366520.14194.488-0.31470.4927
2040.04340.04260.03750.037123.78921.05374.58840.60830.5216
2050.0447-0.01230.03240.03211.724217.18784.1458-0.16380.45
2060.0468-0.00370.02760.02740.159614.34983.7881-0.04980.3833
2070.04860.02820.02770.027512.350114.06413.75020.43830.3912
2080.0514-0.06630.03250.032148.237918.33584.282-0.86620.4506
2090.05360.00230.02920.02880.067816.3064.03810.03250.4041
2100.05490.0060.02690.02650.504114.72583.83740.08850.3726
2110.0589-0.01030.02530.0251.121113.48913.6727-0.13210.3507
2120.0610.02670.02550.02528.078113.03813.61080.35450.351

\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.0341 & -0.0208 & 0.0208 & 0.0206 & 5.6109 & 0 & 0 & -0.2954 & 0.2954 \tabularnewline
202 & 0.0345 & -0.0636 & 0.0422 & 0.0411 & 48.4484 & 27.0297 & 5.199 & -0.8681 & 0.5818 \tabularnewline
203 & 0.0365 & -0.0229 & 0.0358 & 0.0349 & 6.3665 & 20.1419 & 4.488 & -0.3147 & 0.4927 \tabularnewline
204 & 0.0434 & 0.0426 & 0.0375 & 0.0371 & 23.789 & 21.0537 & 4.5884 & 0.6083 & 0.5216 \tabularnewline
205 & 0.0447 & -0.0123 & 0.0324 & 0.0321 & 1.7242 & 17.1878 & 4.1458 & -0.1638 & 0.45 \tabularnewline
206 & 0.0468 & -0.0037 & 0.0276 & 0.0274 & 0.1596 & 14.3498 & 3.7881 & -0.0498 & 0.3833 \tabularnewline
207 & 0.0486 & 0.0282 & 0.0277 & 0.0275 & 12.3501 & 14.0641 & 3.7502 & 0.4383 & 0.3912 \tabularnewline
208 & 0.0514 & -0.0663 & 0.0325 & 0.0321 & 48.2379 & 18.3358 & 4.282 & -0.8662 & 0.4506 \tabularnewline
209 & 0.0536 & 0.0023 & 0.0292 & 0.0288 & 0.0678 & 16.306 & 4.0381 & 0.0325 & 0.4041 \tabularnewline
210 & 0.0549 & 0.006 & 0.0269 & 0.0265 & 0.5041 & 14.7258 & 3.8374 & 0.0885 & 0.3726 \tabularnewline
211 & 0.0589 & -0.0103 & 0.0253 & 0.025 & 1.1211 & 13.4891 & 3.6727 & -0.1321 & 0.3507 \tabularnewline
212 & 0.061 & 0.0267 & 0.0255 & 0.0252 & 8.0781 & 13.0381 & 3.6108 & 0.3545 & 0.351 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310351&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.0341[/C][C]-0.0208[/C][C]0.0208[/C][C]0.0206[/C][C]5.6109[/C][C]0[/C][C]0[/C][C]-0.2954[/C][C]0.2954[/C][/ROW]
[ROW][C]202[/C][C]0.0345[/C][C]-0.0636[/C][C]0.0422[/C][C]0.0411[/C][C]48.4484[/C][C]27.0297[/C][C]5.199[/C][C]-0.8681[/C][C]0.5818[/C][/ROW]
[ROW][C]203[/C][C]0.0365[/C][C]-0.0229[/C][C]0.0358[/C][C]0.0349[/C][C]6.3665[/C][C]20.1419[/C][C]4.488[/C][C]-0.3147[/C][C]0.4927[/C][/ROW]
[ROW][C]204[/C][C]0.0434[/C][C]0.0426[/C][C]0.0375[/C][C]0.0371[/C][C]23.789[/C][C]21.0537[/C][C]4.5884[/C][C]0.6083[/C][C]0.5216[/C][/ROW]
[ROW][C]205[/C][C]0.0447[/C][C]-0.0123[/C][C]0.0324[/C][C]0.0321[/C][C]1.7242[/C][C]17.1878[/C][C]4.1458[/C][C]-0.1638[/C][C]0.45[/C][/ROW]
[ROW][C]206[/C][C]0.0468[/C][C]-0.0037[/C][C]0.0276[/C][C]0.0274[/C][C]0.1596[/C][C]14.3498[/C][C]3.7881[/C][C]-0.0498[/C][C]0.3833[/C][/ROW]
[ROW][C]207[/C][C]0.0486[/C][C]0.0282[/C][C]0.0277[/C][C]0.0275[/C][C]12.3501[/C][C]14.0641[/C][C]3.7502[/C][C]0.4383[/C][C]0.3912[/C][/ROW]
[ROW][C]208[/C][C]0.0514[/C][C]-0.0663[/C][C]0.0325[/C][C]0.0321[/C][C]48.2379[/C][C]18.3358[/C][C]4.282[/C][C]-0.8662[/C][C]0.4506[/C][/ROW]
[ROW][C]209[/C][C]0.0536[/C][C]0.0023[/C][C]0.0292[/C][C]0.0288[/C][C]0.0678[/C][C]16.306[/C][C]4.0381[/C][C]0.0325[/C][C]0.4041[/C][/ROW]
[ROW][C]210[/C][C]0.0549[/C][C]0.006[/C][C]0.0269[/C][C]0.0265[/C][C]0.5041[/C][C]14.7258[/C][C]3.8374[/C][C]0.0885[/C][C]0.3726[/C][/ROW]
[ROW][C]211[/C][C]0.0589[/C][C]-0.0103[/C][C]0.0253[/C][C]0.025[/C][C]1.1211[/C][C]13.4891[/C][C]3.6727[/C][C]-0.1321[/C][C]0.3507[/C][/ROW]
[ROW][C]212[/C][C]0.061[/C][C]0.0267[/C][C]0.0255[/C][C]0.0252[/C][C]8.0781[/C][C]13.0381[/C][C]3.6108[/C][C]0.3545[/C][C]0.351[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310351&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310351&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.0341-0.02080.02080.02065.610900-0.29540.2954
2020.0345-0.06360.04220.041148.448427.02975.199-0.86810.5818
2030.0365-0.02290.03580.03496.366520.14194.488-0.31470.4927
2040.04340.04260.03750.037123.78921.05374.58840.60830.5216
2050.0447-0.01230.03240.03211.724217.18784.1458-0.16380.45
2060.0468-0.00370.02760.02740.159614.34983.7881-0.04980.3833
2070.04860.02820.02770.027512.350114.06413.75020.43830.3912
2080.0514-0.06630.03250.032148.237918.33584.282-0.86620.4506
2090.05360.00230.02920.02880.067816.3064.03810.03250.4041
2100.05490.0060.02690.02650.504114.72583.83740.08850.3726
2110.0589-0.01030.02530.0251.121113.48913.6727-0.13210.3507
2120.0610.02670.02550.02528.078113.03813.61080.35450.351



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