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, 22 Jan 2020 12:07:08 +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/2020/Jan/22/t15796912751goutsihmbn1hru.htm/, Retrieved Wed, 24 Apr 2024 19:56:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=319016, Retrieved Wed, 24 Apr 2024 19:56:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact101
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [vraag 9] [2020-01-22 11:07:08] [e4f4b713a94b94757dd2a393bdfa1c74] [Current]
Feedback Forum

Post a new message
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 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=319016&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=319016&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319016&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.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.5116.3751105.8779126.87220.29570.99660.7930.9966
202109.5111.574499.6936123.45520.36610.37540.51150.9448
203110106.976895.096118.85760.3090.33860.46560.7989
204114.2102.992491.1116114.87330.03220.12380.47320.5715
205106.9103.117291.2364114.99810.26630.03370.47480.5796
206109.2106.298694.4177118.17940.31610.46050.42790.766
207124.2116.1412104.2604128.0220.09180.87390.40490.9906
208104.7109.263497.3825121.14420.22580.00690.43860.8878
209111.9103.928992.0481115.80970.09430.44940.47560.6311
210119114.5445102.6636126.42530.23120.66870.41150.9815
211102.998.761486.8805110.64220.24744e-040.49090.3023
212106.399.770687.8897111.65140.14070.30280.36270.3627

\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 & 116.3751 & 105.8779 & 126.8722 & 0.2957 & 0.9966 & 0.793 & 0.9966 \tabularnewline
202 & 109.5 & 111.5744 & 99.6936 & 123.4552 & 0.3661 & 0.3754 & 0.5115 & 0.9448 \tabularnewline
203 & 110 & 106.9768 & 95.096 & 118.8576 & 0.309 & 0.3386 & 0.4656 & 0.7989 \tabularnewline
204 & 114.2 & 102.9924 & 91.1116 & 114.8733 & 0.0322 & 0.1238 & 0.4732 & 0.5715 \tabularnewline
205 & 106.9 & 103.1172 & 91.2364 & 114.9981 & 0.2663 & 0.0337 & 0.4748 & 0.5796 \tabularnewline
206 & 109.2 & 106.2986 & 94.4177 & 118.1794 & 0.3161 & 0.4605 & 0.4279 & 0.766 \tabularnewline
207 & 124.2 & 116.1412 & 104.2604 & 128.022 & 0.0918 & 0.8739 & 0.4049 & 0.9906 \tabularnewline
208 & 104.7 & 109.2634 & 97.3825 & 121.1442 & 0.2258 & 0.0069 & 0.4386 & 0.8878 \tabularnewline
209 & 111.9 & 103.9289 & 92.0481 & 115.8097 & 0.0943 & 0.4494 & 0.4756 & 0.6311 \tabularnewline
210 & 119 & 114.5445 & 102.6636 & 126.4253 & 0.2312 & 0.6687 & 0.4115 & 0.9815 \tabularnewline
211 & 102.9 & 98.7614 & 86.8805 & 110.6422 & 0.2474 & 4e-04 & 0.4909 & 0.3023 \tabularnewline
212 & 106.3 & 99.7706 & 87.8897 & 111.6514 & 0.1407 & 0.3028 & 0.3627 & 0.3627 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319016&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]116.3751[/C][C]105.8779[/C][C]126.8722[/C][C]0.2957[/C][C]0.9966[/C][C]0.793[/C][C]0.9966[/C][/ROW]
[ROW][C]202[/C][C]109.5[/C][C]111.5744[/C][C]99.6936[/C][C]123.4552[/C][C]0.3661[/C][C]0.3754[/C][C]0.5115[/C][C]0.9448[/C][/ROW]
[ROW][C]203[/C][C]110[/C][C]106.9768[/C][C]95.096[/C][C]118.8576[/C][C]0.309[/C][C]0.3386[/C][C]0.4656[/C][C]0.7989[/C][/ROW]
[ROW][C]204[/C][C]114.2[/C][C]102.9924[/C][C]91.1116[/C][C]114.8733[/C][C]0.0322[/C][C]0.1238[/C][C]0.4732[/C][C]0.5715[/C][/ROW]
[ROW][C]205[/C][C]106.9[/C][C]103.1172[/C][C]91.2364[/C][C]114.9981[/C][C]0.2663[/C][C]0.0337[/C][C]0.4748[/C][C]0.5796[/C][/ROW]
[ROW][C]206[/C][C]109.2[/C][C]106.2986[/C][C]94.4177[/C][C]118.1794[/C][C]0.3161[/C][C]0.4605[/C][C]0.4279[/C][C]0.766[/C][/ROW]
[ROW][C]207[/C][C]124.2[/C][C]116.1412[/C][C]104.2604[/C][C]128.022[/C][C]0.0918[/C][C]0.8739[/C][C]0.4049[/C][C]0.9906[/C][/ROW]
[ROW][C]208[/C][C]104.7[/C][C]109.2634[/C][C]97.3825[/C][C]121.1442[/C][C]0.2258[/C][C]0.0069[/C][C]0.4386[/C][C]0.8878[/C][/ROW]
[ROW][C]209[/C][C]111.9[/C][C]103.9289[/C][C]92.0481[/C][C]115.8097[/C][C]0.0943[/C][C]0.4494[/C][C]0.4756[/C][C]0.6311[/C][/ROW]
[ROW][C]210[/C][C]119[/C][C]114.5445[/C][C]102.6636[/C][C]126.4253[/C][C]0.2312[/C][C]0.6687[/C][C]0.4115[/C][C]0.9815[/C][/ROW]
[ROW][C]211[/C][C]102.9[/C][C]98.7614[/C][C]86.8805[/C][C]110.6422[/C][C]0.2474[/C][C]4e-04[/C][C]0.4909[/C][C]0.3023[/C][/ROW]
[ROW][C]212[/C][C]106.3[/C][C]99.7706[/C][C]87.8897[/C][C]111.6514[/C][C]0.1407[/C][C]0.3028[/C][C]0.3627[/C][C]0.3627[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=319016&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319016&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.5116.3751105.8779126.87220.29570.99660.7930.9966
202109.5111.574499.6936123.45520.36610.37540.51150.9448
203110106.976895.096118.85760.3090.33860.46560.7989
204114.2102.992491.1116114.87330.03220.12380.47320.5715
205106.9103.117291.2364114.99810.26630.03370.47480.5796
206109.2106.298694.4177118.17940.31610.46050.42790.766
207124.2116.1412104.2604128.0220.09180.87390.40490.9906
208104.7109.263497.3825121.14420.22580.00690.43860.8878
209111.9103.928992.0481115.80970.09430.44940.47560.6311
210119114.5445102.6636126.42530.23120.66870.41150.9815
211102.998.761486.8805110.64220.24744e-040.49090.3023
212106.399.770687.8897111.65140.14070.30280.36270.3627







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.046-0.02530.02530.0258.266100-0.36520.3652
2020.0543-0.01890.02210.02194.30316.28462.5069-0.26350.3143
2030.05670.02750.02390.02399.13977.23632.690.3840.3376
2040.05890.09810.04250.0437125.609336.82966.06871.42360.6091
2050.05880.03540.04110.042214.309432.32555.68560.48050.5834
2060.0570.02660.03860.03968.418328.3415.32360.36850.5476
2070.05220.06490.04240.043664.944133.575.7941.02360.6156
2080.0555-0.04360.04250.043420.824431.97685.6548-0.57960.6111
2090.05830.07120.04570.046863.538535.48375.95681.01250.6557
2100.05290.03740.04490.04619.851833.92055.82410.56590.6467
2110.06140.04020.04450.045517.128232.39395.69160.52570.6357
2120.06080.06140.04590.04742.633433.24725.7660.82940.6518

\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.046 & -0.0253 & 0.0253 & 0.025 & 8.2661 & 0 & 0 & -0.3652 & 0.3652 \tabularnewline
202 & 0.0543 & -0.0189 & 0.0221 & 0.0219 & 4.3031 & 6.2846 & 2.5069 & -0.2635 & 0.3143 \tabularnewline
203 & 0.0567 & 0.0275 & 0.0239 & 0.0239 & 9.1397 & 7.2363 & 2.69 & 0.384 & 0.3376 \tabularnewline
204 & 0.0589 & 0.0981 & 0.0425 & 0.0437 & 125.6093 & 36.8296 & 6.0687 & 1.4236 & 0.6091 \tabularnewline
205 & 0.0588 & 0.0354 & 0.0411 & 0.0422 & 14.3094 & 32.3255 & 5.6856 & 0.4805 & 0.5834 \tabularnewline
206 & 0.057 & 0.0266 & 0.0386 & 0.0396 & 8.4183 & 28.341 & 5.3236 & 0.3685 & 0.5476 \tabularnewline
207 & 0.0522 & 0.0649 & 0.0424 & 0.0436 & 64.9441 & 33.57 & 5.794 & 1.0236 & 0.6156 \tabularnewline
208 & 0.0555 & -0.0436 & 0.0425 & 0.0434 & 20.8244 & 31.9768 & 5.6548 & -0.5796 & 0.6111 \tabularnewline
209 & 0.0583 & 0.0712 & 0.0457 & 0.0468 & 63.5385 & 35.4837 & 5.9568 & 1.0125 & 0.6557 \tabularnewline
210 & 0.0529 & 0.0374 & 0.0449 & 0.046 & 19.8518 & 33.9205 & 5.8241 & 0.5659 & 0.6467 \tabularnewline
211 & 0.0614 & 0.0402 & 0.0445 & 0.0455 & 17.1282 & 32.3939 & 5.6916 & 0.5257 & 0.6357 \tabularnewline
212 & 0.0608 & 0.0614 & 0.0459 & 0.047 & 42.6334 & 33.2472 & 5.766 & 0.8294 & 0.6518 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319016&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.046[/C][C]-0.0253[/C][C]0.0253[/C][C]0.025[/C][C]8.2661[/C][C]0[/C][C]0[/C][C]-0.3652[/C][C]0.3652[/C][/ROW]
[ROW][C]202[/C][C]0.0543[/C][C]-0.0189[/C][C]0.0221[/C][C]0.0219[/C][C]4.3031[/C][C]6.2846[/C][C]2.5069[/C][C]-0.2635[/C][C]0.3143[/C][/ROW]
[ROW][C]203[/C][C]0.0567[/C][C]0.0275[/C][C]0.0239[/C][C]0.0239[/C][C]9.1397[/C][C]7.2363[/C][C]2.69[/C][C]0.384[/C][C]0.3376[/C][/ROW]
[ROW][C]204[/C][C]0.0589[/C][C]0.0981[/C][C]0.0425[/C][C]0.0437[/C][C]125.6093[/C][C]36.8296[/C][C]6.0687[/C][C]1.4236[/C][C]0.6091[/C][/ROW]
[ROW][C]205[/C][C]0.0588[/C][C]0.0354[/C][C]0.0411[/C][C]0.0422[/C][C]14.3094[/C][C]32.3255[/C][C]5.6856[/C][C]0.4805[/C][C]0.5834[/C][/ROW]
[ROW][C]206[/C][C]0.057[/C][C]0.0266[/C][C]0.0386[/C][C]0.0396[/C][C]8.4183[/C][C]28.341[/C][C]5.3236[/C][C]0.3685[/C][C]0.5476[/C][/ROW]
[ROW][C]207[/C][C]0.0522[/C][C]0.0649[/C][C]0.0424[/C][C]0.0436[/C][C]64.9441[/C][C]33.57[/C][C]5.794[/C][C]1.0236[/C][C]0.6156[/C][/ROW]
[ROW][C]208[/C][C]0.0555[/C][C]-0.0436[/C][C]0.0425[/C][C]0.0434[/C][C]20.8244[/C][C]31.9768[/C][C]5.6548[/C][C]-0.5796[/C][C]0.6111[/C][/ROW]
[ROW][C]209[/C][C]0.0583[/C][C]0.0712[/C][C]0.0457[/C][C]0.0468[/C][C]63.5385[/C][C]35.4837[/C][C]5.9568[/C][C]1.0125[/C][C]0.6557[/C][/ROW]
[ROW][C]210[/C][C]0.0529[/C][C]0.0374[/C][C]0.0449[/C][C]0.046[/C][C]19.8518[/C][C]33.9205[/C][C]5.8241[/C][C]0.5659[/C][C]0.6467[/C][/ROW]
[ROW][C]211[/C][C]0.0614[/C][C]0.0402[/C][C]0.0445[/C][C]0.0455[/C][C]17.1282[/C][C]32.3939[/C][C]5.6916[/C][C]0.5257[/C][C]0.6357[/C][/ROW]
[ROW][C]212[/C][C]0.0608[/C][C]0.0614[/C][C]0.0459[/C][C]0.047[/C][C]42.6334[/C][C]33.2472[/C][C]5.766[/C][C]0.8294[/C][C]0.6518[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=319016&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319016&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.046-0.02530.02530.0258.266100-0.36520.3652
2020.0543-0.01890.02210.02194.30316.28462.5069-0.26350.3143
2030.05670.02750.02390.02399.13977.23632.690.3840.3376
2040.05890.09810.04250.0437125.609336.82966.06871.42360.6091
2050.05880.03540.04110.042214.309432.32555.68560.48050.5834
2060.0570.02660.03860.03968.418328.3415.32360.36850.5476
2070.05220.06490.04240.043664.944133.575.7941.02360.6156
2080.0555-0.04360.04250.043420.824431.97685.6548-0.57960.6111
2090.05830.07120.04570.046863.538535.48375.95681.01250.6557
2100.05290.03740.04490.04619.851833.92055.82410.56590.6467
2110.06140.04020.04450.045517.128232.39395.69160.52570.6357
2120.06080.06140.04590.04742.633433.24725.7660.82940.6518



Parameters (Session):
par1 = 1 ; par2 = 2 ; par3 = 0.99 ; par4 = two.sided ; par5 = unpaired ; par6 = 0 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 2 ; 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')