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 10:05:57 +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/t1513760783lzuxa9jow78gjqd.htm/, Retrieved Tue, 14 May 2024 12:03:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310457, Retrieved Tue, 14 May 2024 12:03:10 +0000
QR Codes:

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

Post a new message
Dataseries X:
122.2
136.1
145.5
116.7
137.1
125.5
112.4
106.3
145.7
151.5
144.6
116.4
137.7
138.8
149.5
125
133.4
134.4
124.8
110.6
142.4
149.6
134.6
103.3
136.5
137.1
140.7
131.4
126.2
125.3
126.6
107.7
144.5
154.2
131.4
105.7
136.2
133.3
130
129.3
113.1
117.7
116.3
97.3
140.6
141.2
120.8
106.2
121.5
122.6
137.2
118.9
107.2
127.4
111.8
100
138.3
128
121.2
105.9
112.5
123.1
129
115.5
105.7
122.3
106.4
101.1
131.6
119.5
127
106.9
115.9
122.7
137.2
108.5
115.2
129.4
112.3
104.3
140
139.9
134.9
105.1
127
135.5
143.9
115.8
117.5
129.3
117.9
108.1
131.7
143.7
126.2
96.9
125.8
129.6
124.9
136.8
107.5
114.3
110.3
85.5
116.8
115.1
95.2
83.4
95.4
96.3
100.5
90.9
80.6
94.8
93.9
75.9
101.6
103.3
91.8
83.5
92
101.2
109.1
99.8
90.8
110.6
97.8
81.9
114.4
108.8
103.1
90.4
94.4
100.5
115.1
93.9
102.5
97.1
91.2
82.3
107.1
99.2
94.8
81.1
92.5
97.7
98.5
81.2
86.2
92
86.3
74.8
90
101.1
87.8
66.3
88.6
90
92
85.1
85.9
88.5
92.3
68
93.6
97.7
85.1
69.9
96.1
97
95.9
91.3
83.5
91.4
96.8
71
106.9
102.7
84.9
75.8
93.6
100.7
100.5
95.9
85.7
104.1
93.5
81.5
102.1
98.2
88.4
77.8
90.1
101
98.6
91.5
86.4
98.9
85.2
77.3
93
86.8
91.3
74.9
93.9
95
103.1
81.4
93.1
97.2
86.4
75.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=310457&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=310457&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310457&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])
18881.5-------
189102.1-------
19098.2-------
19188.4-------
19277.8-------
19390.1-------
194101-------
19598.6-------
19691.5000000000001-------
19786.4-------
19898.9-------
19985.2-------
20077.3-------
2019399.876690.2402110.77460.108110.34461
20286.896.157986.8336106.70990.04110.72130.35220.9998
20391.388.793379.879698.92760.31390.65010.53030.9869
20474.975.142866.731984.85840.48056e-040.2960.3317
20593.988.652878.1595100.88270.20020.98620.40830.9656
2069595.953583.8608110.20020.44780.61120.24380.9949
207103.196.559783.6506111.93450.20220.57880.39740.993
20881.488.077476.1587102.30590.17880.01930.31870.9312
20993.184.320472.561898.44120.11150.65740.38640.8351
21097.293.424979.6607110.14380.3290.51520.26050.9706
21186.486.004973.1759101.62980.48020.08010.54020.8626
21275.574.172963.073787.70020.42380.03820.32520.3252

\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 & 81.5 & - & - & - & - & - & - & - \tabularnewline
189 & 102.1 & - & - & - & - & - & - & - \tabularnewline
190 & 98.2 & - & - & - & - & - & - & - \tabularnewline
191 & 88.4 & - & - & - & - & - & - & - \tabularnewline
192 & 77.8 & - & - & - & - & - & - & - \tabularnewline
193 & 90.1 & - & - & - & - & - & - & - \tabularnewline
194 & 101 & - & - & - & - & - & - & - \tabularnewline
195 & 98.6 & - & - & - & - & - & - & - \tabularnewline
196 & 91.5000000000001 & - & - & - & - & - & - & - \tabularnewline
197 & 86.4 & - & - & - & - & - & - & - \tabularnewline
198 & 98.9 & - & - & - & - & - & - & - \tabularnewline
199 & 85.2 & - & - & - & - & - & - & - \tabularnewline
200 & 77.3 & - & - & - & - & - & - & - \tabularnewline
201 & 93 & 99.8766 & 90.2402 & 110.7746 & 0.1081 & 1 & 0.3446 & 1 \tabularnewline
202 & 86.8 & 96.1579 & 86.8336 & 106.7099 & 0.0411 & 0.7213 & 0.3522 & 0.9998 \tabularnewline
203 & 91.3 & 88.7933 & 79.8796 & 98.9276 & 0.3139 & 0.6501 & 0.5303 & 0.9869 \tabularnewline
204 & 74.9 & 75.1428 & 66.7319 & 84.8584 & 0.4805 & 6e-04 & 0.296 & 0.3317 \tabularnewline
205 & 93.9 & 88.6528 & 78.1595 & 100.8827 & 0.2002 & 0.9862 & 0.4083 & 0.9656 \tabularnewline
206 & 95 & 95.9535 & 83.8608 & 110.2002 & 0.4478 & 0.6112 & 0.2438 & 0.9949 \tabularnewline
207 & 103.1 & 96.5597 & 83.6506 & 111.9345 & 0.2022 & 0.5788 & 0.3974 & 0.993 \tabularnewline
208 & 81.4 & 88.0774 & 76.1587 & 102.3059 & 0.1788 & 0.0193 & 0.3187 & 0.9312 \tabularnewline
209 & 93.1 & 84.3204 & 72.5618 & 98.4412 & 0.1115 & 0.6574 & 0.3864 & 0.8351 \tabularnewline
210 & 97.2 & 93.4249 & 79.6607 & 110.1438 & 0.329 & 0.5152 & 0.2605 & 0.9706 \tabularnewline
211 & 86.4 & 86.0049 & 73.1759 & 101.6298 & 0.4802 & 0.0801 & 0.5402 & 0.8626 \tabularnewline
212 & 75.5 & 74.1729 & 63.0737 & 87.7002 & 0.4238 & 0.0382 & 0.3252 & 0.3252 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310457&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]81.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]102.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]98.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]88.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]77.8[/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]101[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]98.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]91.5000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]86.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]98.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]85.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]77.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]93[/C][C]99.8766[/C][C]90.2402[/C][C]110.7746[/C][C]0.1081[/C][C]1[/C][C]0.3446[/C][C]1[/C][/ROW]
[ROW][C]202[/C][C]86.8[/C][C]96.1579[/C][C]86.8336[/C][C]106.7099[/C][C]0.0411[/C][C]0.7213[/C][C]0.3522[/C][C]0.9998[/C][/ROW]
[ROW][C]203[/C][C]91.3[/C][C]88.7933[/C][C]79.8796[/C][C]98.9276[/C][C]0.3139[/C][C]0.6501[/C][C]0.5303[/C][C]0.9869[/C][/ROW]
[ROW][C]204[/C][C]74.9[/C][C]75.1428[/C][C]66.7319[/C][C]84.8584[/C][C]0.4805[/C][C]6e-04[/C][C]0.296[/C][C]0.3317[/C][/ROW]
[ROW][C]205[/C][C]93.9[/C][C]88.6528[/C][C]78.1595[/C][C]100.8827[/C][C]0.2002[/C][C]0.9862[/C][C]0.4083[/C][C]0.9656[/C][/ROW]
[ROW][C]206[/C][C]95[/C][C]95.9535[/C][C]83.8608[/C][C]110.2002[/C][C]0.4478[/C][C]0.6112[/C][C]0.2438[/C][C]0.9949[/C][/ROW]
[ROW][C]207[/C][C]103.1[/C][C]96.5597[/C][C]83.6506[/C][C]111.9345[/C][C]0.2022[/C][C]0.5788[/C][C]0.3974[/C][C]0.993[/C][/ROW]
[ROW][C]208[/C][C]81.4[/C][C]88.0774[/C][C]76.1587[/C][C]102.3059[/C][C]0.1788[/C][C]0.0193[/C][C]0.3187[/C][C]0.9312[/C][/ROW]
[ROW][C]209[/C][C]93.1[/C][C]84.3204[/C][C]72.5618[/C][C]98.4412[/C][C]0.1115[/C][C]0.6574[/C][C]0.3864[/C][C]0.8351[/C][/ROW]
[ROW][C]210[/C][C]97.2[/C][C]93.4249[/C][C]79.6607[/C][C]110.1438[/C][C]0.329[/C][C]0.5152[/C][C]0.2605[/C][C]0.9706[/C][/ROW]
[ROW][C]211[/C][C]86.4[/C][C]86.0049[/C][C]73.1759[/C][C]101.6298[/C][C]0.4802[/C][C]0.0801[/C][C]0.5402[/C][C]0.8626[/C][/ROW]
[ROW][C]212[/C][C]75.5[/C][C]74.1729[/C][C]63.0737[/C][C]87.7002[/C][C]0.4238[/C][C]0.0382[/C][C]0.3252[/C][C]0.3252[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310457&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310457&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])
18881.5-------
189102.1-------
19098.2-------
19188.4-------
19277.8-------
19390.1-------
194101-------
19598.6-------
19691.5000000000001-------
19786.4-------
19898.9-------
19985.2-------
20077.3-------
2019399.876690.2402110.77460.108110.34461
20286.896.157986.8336106.70990.04110.72130.35220.9998
20391.388.793379.879698.92760.31390.65010.53030.9869
20474.975.142866.731984.85840.48056e-040.2960.3317
20593.988.652878.1595100.88270.20020.98620.40830.9656
2069595.953583.8608110.20020.44780.61120.24380.9949
207103.196.559783.6506111.93450.20220.57880.39740.993
20881.488.077476.1587102.30590.17880.01930.31870.9312
20993.184.320472.561898.44120.11150.65740.38640.8351
21097.293.424979.6607110.14380.3290.51520.26050.9706
21186.486.004973.1759101.62980.48020.08010.54020.8626
21275.574.172963.073787.70020.42380.03820.32520.3252







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.0557-0.07390.07390.071347.287900-0.66060.6606
2020.056-0.10780.09090.086887.570667.42938.2115-0.8990.7798
2030.05820.02750.06970.06716.283647.04746.85910.24080.6002
2040.066-0.00320.05310.05120.05935.30035.9414-0.02330.4559
2050.07040.05590.05370.052427.533433.74695.80920.50410.4656
2060.0758-0.010.04640.04540.909128.27395.3173-0.09160.4032
2070.08120.06340.04880.048242.776130.34575.50870.62830.4354
2080.0824-0.0820.0530.052144.587432.12595.668-0.64150.4612
2090.08540.09430.05760.057377.081837.1216.09270.84350.5036
2100.09130.03880.05570.055514.251534.8345.9020.36270.4895
2110.09270.00460.05110.05090.156131.68155.62860.0380.4485
2120.0930.01760.04830.04811.761329.18825.40260.12750.4217

\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.0557 & -0.0739 & 0.0739 & 0.0713 & 47.2879 & 0 & 0 & -0.6606 & 0.6606 \tabularnewline
202 & 0.056 & -0.1078 & 0.0909 & 0.0868 & 87.5706 & 67.4293 & 8.2115 & -0.899 & 0.7798 \tabularnewline
203 & 0.0582 & 0.0275 & 0.0697 & 0.0671 & 6.2836 & 47.0474 & 6.8591 & 0.2408 & 0.6002 \tabularnewline
204 & 0.066 & -0.0032 & 0.0531 & 0.0512 & 0.059 & 35.3003 & 5.9414 & -0.0233 & 0.4559 \tabularnewline
205 & 0.0704 & 0.0559 & 0.0537 & 0.0524 & 27.5334 & 33.7469 & 5.8092 & 0.5041 & 0.4656 \tabularnewline
206 & 0.0758 & -0.01 & 0.0464 & 0.0454 & 0.9091 & 28.2739 & 5.3173 & -0.0916 & 0.4032 \tabularnewline
207 & 0.0812 & 0.0634 & 0.0488 & 0.0482 & 42.7761 & 30.3457 & 5.5087 & 0.6283 & 0.4354 \tabularnewline
208 & 0.0824 & -0.082 & 0.053 & 0.0521 & 44.5874 & 32.1259 & 5.668 & -0.6415 & 0.4612 \tabularnewline
209 & 0.0854 & 0.0943 & 0.0576 & 0.0573 & 77.0818 & 37.121 & 6.0927 & 0.8435 & 0.5036 \tabularnewline
210 & 0.0913 & 0.0388 & 0.0557 & 0.0555 & 14.2515 & 34.834 & 5.902 & 0.3627 & 0.4895 \tabularnewline
211 & 0.0927 & 0.0046 & 0.0511 & 0.0509 & 0.1561 & 31.6815 & 5.6286 & 0.038 & 0.4485 \tabularnewline
212 & 0.093 & 0.0176 & 0.0483 & 0.0481 & 1.7613 & 29.1882 & 5.4026 & 0.1275 & 0.4217 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310457&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.0557[/C][C]-0.0739[/C][C]0.0739[/C][C]0.0713[/C][C]47.2879[/C][C]0[/C][C]0[/C][C]-0.6606[/C][C]0.6606[/C][/ROW]
[ROW][C]202[/C][C]0.056[/C][C]-0.1078[/C][C]0.0909[/C][C]0.0868[/C][C]87.5706[/C][C]67.4293[/C][C]8.2115[/C][C]-0.899[/C][C]0.7798[/C][/ROW]
[ROW][C]203[/C][C]0.0582[/C][C]0.0275[/C][C]0.0697[/C][C]0.0671[/C][C]6.2836[/C][C]47.0474[/C][C]6.8591[/C][C]0.2408[/C][C]0.6002[/C][/ROW]
[ROW][C]204[/C][C]0.066[/C][C]-0.0032[/C][C]0.0531[/C][C]0.0512[/C][C]0.059[/C][C]35.3003[/C][C]5.9414[/C][C]-0.0233[/C][C]0.4559[/C][/ROW]
[ROW][C]205[/C][C]0.0704[/C][C]0.0559[/C][C]0.0537[/C][C]0.0524[/C][C]27.5334[/C][C]33.7469[/C][C]5.8092[/C][C]0.5041[/C][C]0.4656[/C][/ROW]
[ROW][C]206[/C][C]0.0758[/C][C]-0.01[/C][C]0.0464[/C][C]0.0454[/C][C]0.9091[/C][C]28.2739[/C][C]5.3173[/C][C]-0.0916[/C][C]0.4032[/C][/ROW]
[ROW][C]207[/C][C]0.0812[/C][C]0.0634[/C][C]0.0488[/C][C]0.0482[/C][C]42.7761[/C][C]30.3457[/C][C]5.5087[/C][C]0.6283[/C][C]0.4354[/C][/ROW]
[ROW][C]208[/C][C]0.0824[/C][C]-0.082[/C][C]0.053[/C][C]0.0521[/C][C]44.5874[/C][C]32.1259[/C][C]5.668[/C][C]-0.6415[/C][C]0.4612[/C][/ROW]
[ROW][C]209[/C][C]0.0854[/C][C]0.0943[/C][C]0.0576[/C][C]0.0573[/C][C]77.0818[/C][C]37.121[/C][C]6.0927[/C][C]0.8435[/C][C]0.5036[/C][/ROW]
[ROW][C]210[/C][C]0.0913[/C][C]0.0388[/C][C]0.0557[/C][C]0.0555[/C][C]14.2515[/C][C]34.834[/C][C]5.902[/C][C]0.3627[/C][C]0.4895[/C][/ROW]
[ROW][C]211[/C][C]0.0927[/C][C]0.0046[/C][C]0.0511[/C][C]0.0509[/C][C]0.1561[/C][C]31.6815[/C][C]5.6286[/C][C]0.038[/C][C]0.4485[/C][/ROW]
[ROW][C]212[/C][C]0.093[/C][C]0.0176[/C][C]0.0483[/C][C]0.0481[/C][C]1.7613[/C][C]29.1882[/C][C]5.4026[/C][C]0.1275[/C][C]0.4217[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310457&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310457&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.0557-0.07390.07390.071347.287900-0.66060.6606
2020.056-0.10780.09090.086887.570667.42938.2115-0.8990.7798
2030.05820.02750.06970.06716.283647.04746.85910.24080.6002
2040.066-0.00320.05310.05120.05935.30035.9414-0.02330.4559
2050.07040.05590.05370.052427.533433.74695.80920.50410.4656
2060.0758-0.010.04640.04540.909128.27395.3173-0.09160.4032
2070.08120.06340.04880.048242.776130.34575.50870.62830.4354
2080.0824-0.0820.0530.052144.587432.12595.668-0.64150.4612
2090.08540.09430.05760.057377.081837.1216.09270.84350.5036
2100.09130.03880.05570.055514.251534.8345.9020.36270.4895
2110.09270.00460.05110.05090.156131.68155.62860.0380.4485
2120.0930.01760.04830.04811.761329.18825.40260.12750.4217



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