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, 06 Dec 2017 09:47:37 +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/06/t15125500730tza1cqewng2jfy.htm/, Retrieved Tue, 14 May 2024 03:19:03 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Tue, 14 May 2024 03:19:03 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
62.4
67.4
76.1
67.4
74.5
72.6
60.5
66.1
76.5
76.8
77
71
74.8
73.7
80.5
71.8
76.9
79.9
65.9
69.5
75.1
79.6
75.2
68
72.8
71.5
78.5
76.8
75.3
76.7
69.7
67.8
77.5
82.5
75.3
70.9
76
73.7
79.7
77.8
73.3
78.3
71.9
67
82
83.7
74.8
80
74.3
76.8
89
81.9
76.8
88.9
75.8
75.5
89.1
88
85.9
89.3
82.9
81.2
90.5
86.4
81.8
91.3
73.4
76.6
91
87
89.7
90.7
86.5
86.6
98.8
84.4
91.4
95.7
78.5
81.7
94.3
98.5
95.4
91.7
92.8
90.5
102.2
91.8
95
102
88.9
89.6
97.9
108.6
100.8
95.1
101
100.9
102.5
105.4
98.4
105.3
96.5
88.1
107.9
107
92.5
95.7
85.2
85.5
94.7
86.2
88.8
93.4
83.4
82.9
96.7
96.2
92.8
92.8
90
95.4
108.3
96.3
95
109
92
92.3
107
105.5
105.4
103.9
99.2
102.2
121.5
102.3
110
105.9
91.9
100
111.7
104.9
103.3
101.8
100.8
104.2
116.5
97.9
100.7
107
96.3
96
104.5
107.4
102.4
94.9
98.8
96.8
108.2
103.8
102.3
107.2
102
92.6
105.2
113
105.6
101.6
101.7
102.7
109
105.5
103.3
108.6
98.2
90
112.4
111.9
102.1
102.4
101.7
98.7
114
105.1
98.3
110
96.5
92.2
112
111.4
107.5
103.4
103.5
107.4
117.6
110.2
104.3
115.9
98.9
101.9
113.5
109.5
110
114.2
106.9
109.2
124.2
104.7
111.9
119
102.9
106.3




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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 time1 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.2-------
189112-------
190111.4-------
191107.5-------
192103.4-------
193103.5-------
194107.4-------
195117.6-------
196110.2-------
197104.3-------
198115.9-------
19998.9-------
200101.9-------
201113.5115.26107.2056123.72860.34190.9990.77470.999
202109.5116.8307108.2459125.8810.05620.76460.88020.9994
203110111.44102.7235120.66150.37980.660.79880.9787
204114.2109.0748100.102118.59590.14570.42450.87860.9302
205106.9108.092398.8132117.96470.40640.11260.8190.8905
206109.2108.820399.1438119.13930.47130.64230.60630.9057
207124.2120.4005109.639131.88050.25830.97210.68370.9992
208104.7111.2466100.7401122.49710.1270.0120.57230.9483
209111.9111.038100.2247122.64260.44210.85780.87240.9386
210119117.8077106.2059130.26870.42560.82360.61790.9938
211102.9103.655592.7764115.39770.44980.00520.78630.6153
212106.3103.11191.9953115.13430.30160.51370.57820.5782

\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.2 & - & - & - & - & - & - & - \tabularnewline
189 & 112 & - & - & - & - & - & - & - \tabularnewline
190 & 111.4 & - & - & - & - & - & - & - \tabularnewline
191 & 107.5 & - & - & - & - & - & - & - \tabularnewline
192 & 103.4 & - & - & - & - & - & - & - \tabularnewline
193 & 103.5 & - & - & - & - & - & - & - \tabularnewline
194 & 107.4 & - & - & - & - & - & - & - \tabularnewline
195 & 117.6 & - & - & - & - & - & - & - \tabularnewline
196 & 110.2 & - & - & - & - & - & - & - \tabularnewline
197 & 104.3 & - & - & - & - & - & - & - \tabularnewline
198 & 115.9 & - & - & - & - & - & - & - \tabularnewline
199 & 98.9 & - & - & - & - & - & - & - \tabularnewline
200 & 101.9 & - & - & - & - & - & - & - \tabularnewline
201 & 113.5 & 115.26 & 107.2056 & 123.7286 & 0.3419 & 0.999 & 0.7747 & 0.999 \tabularnewline
202 & 109.5 & 116.8307 & 108.2459 & 125.881 & 0.0562 & 0.7646 & 0.8802 & 0.9994 \tabularnewline
203 & 110 & 111.44 & 102.7235 & 120.6615 & 0.3798 & 0.66 & 0.7988 & 0.9787 \tabularnewline
204 & 114.2 & 109.0748 & 100.102 & 118.5959 & 0.1457 & 0.4245 & 0.8786 & 0.9302 \tabularnewline
205 & 106.9 & 108.0923 & 98.8132 & 117.9647 & 0.4064 & 0.1126 & 0.819 & 0.8905 \tabularnewline
206 & 109.2 & 108.8203 & 99.1438 & 119.1393 & 0.4713 & 0.6423 & 0.6063 & 0.9057 \tabularnewline
207 & 124.2 & 120.4005 & 109.639 & 131.8805 & 0.2583 & 0.9721 & 0.6837 & 0.9992 \tabularnewline
208 & 104.7 & 111.2466 & 100.7401 & 122.4971 & 0.127 & 0.012 & 0.5723 & 0.9483 \tabularnewline
209 & 111.9 & 111.038 & 100.2247 & 122.6426 & 0.4421 & 0.8578 & 0.8724 & 0.9386 \tabularnewline
210 & 119 & 117.8077 & 106.2059 & 130.2687 & 0.4256 & 0.8236 & 0.6179 & 0.9938 \tabularnewline
211 & 102.9 & 103.6555 & 92.7764 & 115.3977 & 0.4498 & 0.0052 & 0.7863 & 0.6153 \tabularnewline
212 & 106.3 & 103.111 & 91.9953 & 115.1343 & 0.3016 & 0.5137 & 0.5782 & 0.5782 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]111.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]107.5[/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.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]107.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]117.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]110.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]104.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]115.9[/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]101.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]113.5[/C][C]115.26[/C][C]107.2056[/C][C]123.7286[/C][C]0.3419[/C][C]0.999[/C][C]0.7747[/C][C]0.999[/C][/ROW]
[ROW][C]202[/C][C]109.5[/C][C]116.8307[/C][C]108.2459[/C][C]125.881[/C][C]0.0562[/C][C]0.7646[/C][C]0.8802[/C][C]0.9994[/C][/ROW]
[ROW][C]203[/C][C]110[/C][C]111.44[/C][C]102.7235[/C][C]120.6615[/C][C]0.3798[/C][C]0.66[/C][C]0.7988[/C][C]0.9787[/C][/ROW]
[ROW][C]204[/C][C]114.2[/C][C]109.0748[/C][C]100.102[/C][C]118.5959[/C][C]0.1457[/C][C]0.4245[/C][C]0.8786[/C][C]0.9302[/C][/ROW]
[ROW][C]205[/C][C]106.9[/C][C]108.0923[/C][C]98.8132[/C][C]117.9647[/C][C]0.4064[/C][C]0.1126[/C][C]0.819[/C][C]0.8905[/C][/ROW]
[ROW][C]206[/C][C]109.2[/C][C]108.8203[/C][C]99.1438[/C][C]119.1393[/C][C]0.4713[/C][C]0.6423[/C][C]0.6063[/C][C]0.9057[/C][/ROW]
[ROW][C]207[/C][C]124.2[/C][C]120.4005[/C][C]109.639[/C][C]131.8805[/C][C]0.2583[/C][C]0.9721[/C][C]0.6837[/C][C]0.9992[/C][/ROW]
[ROW][C]208[/C][C]104.7[/C][C]111.2466[/C][C]100.7401[/C][C]122.4971[/C][C]0.127[/C][C]0.012[/C][C]0.5723[/C][C]0.9483[/C][/ROW]
[ROW][C]209[/C][C]111.9[/C][C]111.038[/C][C]100.2247[/C][C]122.6426[/C][C]0.4421[/C][C]0.8578[/C][C]0.8724[/C][C]0.9386[/C][/ROW]
[ROW][C]210[/C][C]119[/C][C]117.8077[/C][C]106.2059[/C][C]130.2687[/C][C]0.4256[/C][C]0.8236[/C][C]0.6179[/C][C]0.9938[/C][/ROW]
[ROW][C]211[/C][C]102.9[/C][C]103.6555[/C][C]92.7764[/C][C]115.3977[/C][C]0.4498[/C][C]0.0052[/C][C]0.7863[/C][C]0.6153[/C][/ROW]
[ROW][C]212[/C][C]106.3[/C][C]103.111[/C][C]91.9953[/C][C]115.1343[/C][C]0.3016[/C][C]0.5137[/C][C]0.5782[/C][C]0.5782[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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.2-------
189112-------
190111.4-------
191107.5-------
192103.4-------
193103.5-------
194107.4-------
195117.6-------
196110.2-------
197104.3-------
198115.9-------
19998.9-------
200101.9-------
201113.5115.26107.2056123.72860.34190.9990.77470.999
202109.5116.8307108.2459125.8810.05620.76460.88020.9994
203110111.44102.7235120.66150.37980.660.79880.9787
204114.2109.0748100.102118.59590.14570.42450.87860.9302
205106.9108.092398.8132117.96470.40640.11260.8190.8905
206109.2108.820399.1438119.13930.47130.64230.60630.9057
207124.2120.4005109.639131.88050.25830.97210.68370.9992
208104.7111.2466100.7401122.49710.1270.0120.57230.9483
209111.9111.038100.2247122.64260.44210.85780.87240.9386
210119117.8077106.2059130.26870.42560.82360.61790.9938
211102.9103.655592.7764115.39770.44980.00520.78630.6153
212106.3103.11191.9953115.13430.30160.51370.57820.5782







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0375-0.01550.01550.01543.097500-0.22360.2236
2020.0395-0.06690.04120.040153.738728.41815.3309-0.93110.5774
2030.0422-0.01310.03180.03112.073719.63664.4313-0.18290.4459
2040.04450.04490.03510.034826.267721.29444.61460.6510.4972
2050.0466-0.01120.03030.031.421517.31984.1617-0.15140.428
2060.04840.00350.02580.02560.144214.45723.80230.04820.3647
2070.04860.03060.02650.026414.436214.45423.80190.48260.3816
2080.0516-0.06250.0310.030742.857818.00474.2432-0.83160.4378
2090.05330.00770.02840.02810.743116.08674.01080.10950.4013
2100.0540.010.02660.02631.421714.62023.82360.15150.3763
2110.0578-0.00730.02480.02460.570813.3433.6528-0.0960.3509
2120.05950.030.02530.025110.169813.07863.61640.40510.3554

\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.0375 & -0.0155 & 0.0155 & 0.0154 & 3.0975 & 0 & 0 & -0.2236 & 0.2236 \tabularnewline
202 & 0.0395 & -0.0669 & 0.0412 & 0.0401 & 53.7387 & 28.4181 & 5.3309 & -0.9311 & 0.5774 \tabularnewline
203 & 0.0422 & -0.0131 & 0.0318 & 0.0311 & 2.0737 & 19.6366 & 4.4313 & -0.1829 & 0.4459 \tabularnewline
204 & 0.0445 & 0.0449 & 0.0351 & 0.0348 & 26.2677 & 21.2944 & 4.6146 & 0.651 & 0.4972 \tabularnewline
205 & 0.0466 & -0.0112 & 0.0303 & 0.03 & 1.4215 & 17.3198 & 4.1617 & -0.1514 & 0.428 \tabularnewline
206 & 0.0484 & 0.0035 & 0.0258 & 0.0256 & 0.1442 & 14.4572 & 3.8023 & 0.0482 & 0.3647 \tabularnewline
207 & 0.0486 & 0.0306 & 0.0265 & 0.0264 & 14.4362 & 14.4542 & 3.8019 & 0.4826 & 0.3816 \tabularnewline
208 & 0.0516 & -0.0625 & 0.031 & 0.0307 & 42.8578 & 18.0047 & 4.2432 & -0.8316 & 0.4378 \tabularnewline
209 & 0.0533 & 0.0077 & 0.0284 & 0.0281 & 0.7431 & 16.0867 & 4.0108 & 0.1095 & 0.4013 \tabularnewline
210 & 0.054 & 0.01 & 0.0266 & 0.0263 & 1.4217 & 14.6202 & 3.8236 & 0.1515 & 0.3763 \tabularnewline
211 & 0.0578 & -0.0073 & 0.0248 & 0.0246 & 0.5708 & 13.343 & 3.6528 & -0.096 & 0.3509 \tabularnewline
212 & 0.0595 & 0.03 & 0.0253 & 0.0251 & 10.1698 & 13.0786 & 3.6164 & 0.4051 & 0.3554 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&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.0375[/C][C]-0.0155[/C][C]0.0155[/C][C]0.0154[/C][C]3.0975[/C][C]0[/C][C]0[/C][C]-0.2236[/C][C]0.2236[/C][/ROW]
[ROW][C]202[/C][C]0.0395[/C][C]-0.0669[/C][C]0.0412[/C][C]0.0401[/C][C]53.7387[/C][C]28.4181[/C][C]5.3309[/C][C]-0.9311[/C][C]0.5774[/C][/ROW]
[ROW][C]203[/C][C]0.0422[/C][C]-0.0131[/C][C]0.0318[/C][C]0.0311[/C][C]2.0737[/C][C]19.6366[/C][C]4.4313[/C][C]-0.1829[/C][C]0.4459[/C][/ROW]
[ROW][C]204[/C][C]0.0445[/C][C]0.0449[/C][C]0.0351[/C][C]0.0348[/C][C]26.2677[/C][C]21.2944[/C][C]4.6146[/C][C]0.651[/C][C]0.4972[/C][/ROW]
[ROW][C]205[/C][C]0.0466[/C][C]-0.0112[/C][C]0.0303[/C][C]0.03[/C][C]1.4215[/C][C]17.3198[/C][C]4.1617[/C][C]-0.1514[/C][C]0.428[/C][/ROW]
[ROW][C]206[/C][C]0.0484[/C][C]0.0035[/C][C]0.0258[/C][C]0.0256[/C][C]0.1442[/C][C]14.4572[/C][C]3.8023[/C][C]0.0482[/C][C]0.3647[/C][/ROW]
[ROW][C]207[/C][C]0.0486[/C][C]0.0306[/C][C]0.0265[/C][C]0.0264[/C][C]14.4362[/C][C]14.4542[/C][C]3.8019[/C][C]0.4826[/C][C]0.3816[/C][/ROW]
[ROW][C]208[/C][C]0.0516[/C][C]-0.0625[/C][C]0.031[/C][C]0.0307[/C][C]42.8578[/C][C]18.0047[/C][C]4.2432[/C][C]-0.8316[/C][C]0.4378[/C][/ROW]
[ROW][C]209[/C][C]0.0533[/C][C]0.0077[/C][C]0.0284[/C][C]0.0281[/C][C]0.7431[/C][C]16.0867[/C][C]4.0108[/C][C]0.1095[/C][C]0.4013[/C][/ROW]
[ROW][C]210[/C][C]0.054[/C][C]0.01[/C][C]0.0266[/C][C]0.0263[/C][C]1.4217[/C][C]14.6202[/C][C]3.8236[/C][C]0.1515[/C][C]0.3763[/C][/ROW]
[ROW][C]211[/C][C]0.0578[/C][C]-0.0073[/C][C]0.0248[/C][C]0.0246[/C][C]0.5708[/C][C]13.343[/C][C]3.6528[/C][C]-0.096[/C][C]0.3509[/C][/ROW]
[ROW][C]212[/C][C]0.0595[/C][C]0.03[/C][C]0.0253[/C][C]0.0251[/C][C]10.1698[/C][C]13.0786[/C][C]3.6164[/C][C]0.4051[/C][C]0.3554[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&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.0375-0.01550.01550.01543.097500-0.22360.2236
2020.0395-0.06690.04120.040153.738728.41815.3309-0.93110.5774
2030.0422-0.01310.03180.03112.073719.63664.4313-0.18290.4459
2040.04450.04490.03510.034826.267721.29444.61460.6510.4972
2050.0466-0.01120.03030.031.421517.31984.1617-0.15140.428
2060.04840.00350.02580.02560.144214.45723.80230.04820.3647
2070.04860.03060.02650.026414.436214.45423.80190.48260.3816
2080.0516-0.06250.0310.030742.857818.00474.2432-0.83160.4378
2090.05330.00770.02840.02810.743116.08674.01080.10950.4013
2100.0540.010.02660.02631.421714.62023.82360.15150.3763
2110.0578-0.00730.02480.02460.570813.3433.6528-0.0960.3509
2120.05950.030.02530.025110.169813.07863.61640.40510.3554



Parameters (Session):
par1 = 1 2 3 4 5 1 2 3 4 5 12121112DefaultFALSEFALSEFALSEFALSEFALSEFALSE1212 ; par2 = 111111110.30.30.3 ; par3 = 11011111111 ; par4 = 1212011111111 ; par5 = 121212121212121212 ; par6 = White Noise00001100 ; par7 = 0.9500011111 ; par8 = 00100000 ; par9 = 00000011 ; par10 = FALSEFALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.3 ; 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')