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 15:27:45 +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/t1513784750pdx1jru914dj42k.htm/, Retrieved Tue, 14 May 2024 12:04:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=310533, Retrieved Tue, 14 May 2024 12:04:13 +0000
QR Codes:

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

Post a new message
Dataseries X:
46.8
52.8
58.3
54.5
64.7
58.3
57.5
56.7
56
66.2
58.2
53.9
53.1
54.4
59.2
57.8
61.5
60.1
60.1
58.4
56.8
63.8
53.9
63.1
55.7
54.9
64.6
60.2
63.9
69.9
58.5
52
66.7
72
68.4
70.8
56.5
62.6
66.5
69.2
63.7
73.6
64.1
53.8
72.2
80.2
69.1
72
66.3
72.5
88.9
88.6
73.7
86
70
71.6
90.5
85.7
84.8
81.1
70.8
65.7
86.2
76.1
79.8
85.2
75.8
69.4
85
75
77.7
68.5
68.4
65
73.2
67.9
76.5
85.5
71.7
57.9
75.5
78.2
75.7
67.1
74.6
66.2
74.9
69.5
76.1
82.3
82.1
60.5
71.2
81.4
74.5
61.4
83.8
85.4
91.6
91.9
86.3
96.8
81
70.8
98.8
94.5
84.5
92.8
81.2
75.7
86.7
87.5
87.8
103.1
96.4
77.1
106.5
95.7
95.3
86.6
89.6
81.9
98.4
92.9
83.9
121.8
103.9
87.5
118.9
109
112.2
100.1
111.3
102.7
122.6
124.8
120.3
118.3
108.7
100.7
124
103.1
115
112.7
101.7
111.5
114.4
112.5
107.2
136.7
107.8
94.6
110.7
126.6
127.9
109.2
87.1
90.8
94.5
103.3
103.2
105.4
103.9
79.8
105.6
113
87.7
110
90.3
108.9
105.1
113
100.4
110.1
114.7
88.6
117.2
127.7
107.8
102.8
100.2
108.4
114.2
94.4
92.2
115.3
102
86.3
112
112.5
109.5
105.9
115.3
126.2
112.2
112.5
106.9
90.6
75.6
78.8
101.8
93.9
100
89.2
97.7
121.1
108.8
92.9
113.6
112.6
98.8
78




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310533&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 time3 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])
18886.3-------
189112-------
190112.5-------
191109.5-------
192105.9-------
193115.3-------
194126.2-------
195112.2-------
196112.5-------
197106.9-------
19890.6-------
19975.6-------
20078.8-------
201101.898.981478.5086154.49680.46040.76190.32290.7619
20293.999.912678.3152163.7260.42670.47690.34950.7417
20310096.639676.329153.3750.45380.53770.32840.7311
20489.294.514174.7097149.52150.42490.42250.34250.7122
20597.793.665573.9408148.97430.44320.56290.22160.7008
206121.198.406375.8701174.58860.27970.50720.23730.693
207108.8100.592876.5111193.07730.4310.33190.40280.6779
20892.998.651975.335184.73250.44790.40860.37630.6744
209113.695.807573.762171.26810.3220.53010.38660.6707
210112.695.789673.4791174.72770.33820.32920.55130.6634
21198.883.740167.3922124.0080.23180.08010.6540.595
2127878.403364.3386109.25190.48980.09750.48990.4899

\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 & 86.3 & - & - & - & - & - & - & - \tabularnewline
189 & 112 & - & - & - & - & - & - & - \tabularnewline
190 & 112.5 & - & - & - & - & - & - & - \tabularnewline
191 & 109.5 & - & - & - & - & - & - & - \tabularnewline
192 & 105.9 & - & - & - & - & - & - & - \tabularnewline
193 & 115.3 & - & - & - & - & - & - & - \tabularnewline
194 & 126.2 & - & - & - & - & - & - & - \tabularnewline
195 & 112.2 & - & - & - & - & - & - & - \tabularnewline
196 & 112.5 & - & - & - & - & - & - & - \tabularnewline
197 & 106.9 & - & - & - & - & - & - & - \tabularnewline
198 & 90.6 & - & - & - & - & - & - & - \tabularnewline
199 & 75.6 & - & - & - & - & - & - & - \tabularnewline
200 & 78.8 & - & - & - & - & - & - & - \tabularnewline
201 & 101.8 & 98.9814 & 78.5086 & 154.4968 & 0.4604 & 0.7619 & 0.3229 & 0.7619 \tabularnewline
202 & 93.9 & 99.9126 & 78.3152 & 163.726 & 0.4267 & 0.4769 & 0.3495 & 0.7417 \tabularnewline
203 & 100 & 96.6396 & 76.329 & 153.375 & 0.4538 & 0.5377 & 0.3284 & 0.7311 \tabularnewline
204 & 89.2 & 94.5141 & 74.7097 & 149.5215 & 0.4249 & 0.4225 & 0.3425 & 0.7122 \tabularnewline
205 & 97.7 & 93.6655 & 73.9408 & 148.9743 & 0.4432 & 0.5629 & 0.2216 & 0.7008 \tabularnewline
206 & 121.1 & 98.4063 & 75.8701 & 174.5886 & 0.2797 & 0.5072 & 0.2373 & 0.693 \tabularnewline
207 & 108.8 & 100.5928 & 76.5111 & 193.0773 & 0.431 & 0.3319 & 0.4028 & 0.6779 \tabularnewline
208 & 92.9 & 98.6519 & 75.335 & 184.7325 & 0.4479 & 0.4086 & 0.3763 & 0.6744 \tabularnewline
209 & 113.6 & 95.8075 & 73.762 & 171.2681 & 0.322 & 0.5301 & 0.3866 & 0.6707 \tabularnewline
210 & 112.6 & 95.7896 & 73.4791 & 174.7277 & 0.3382 & 0.3292 & 0.5513 & 0.6634 \tabularnewline
211 & 98.8 & 83.7401 & 67.3922 & 124.008 & 0.2318 & 0.0801 & 0.654 & 0.595 \tabularnewline
212 & 78 & 78.4033 & 64.3386 & 109.2519 & 0.4898 & 0.0975 & 0.4899 & 0.4899 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310533&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]86.3[/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]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]109.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]105.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]193[/C][C]115.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]194[/C][C]126.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]195[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]196[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]197[/C][C]106.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]198[/C][C]90.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]199[/C][C]75.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]200[/C][C]78.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]201[/C][C]101.8[/C][C]98.9814[/C][C]78.5086[/C][C]154.4968[/C][C]0.4604[/C][C]0.7619[/C][C]0.3229[/C][C]0.7619[/C][/ROW]
[ROW][C]202[/C][C]93.9[/C][C]99.9126[/C][C]78.3152[/C][C]163.726[/C][C]0.4267[/C][C]0.4769[/C][C]0.3495[/C][C]0.7417[/C][/ROW]
[ROW][C]203[/C][C]100[/C][C]96.6396[/C][C]76.329[/C][C]153.375[/C][C]0.4538[/C][C]0.5377[/C][C]0.3284[/C][C]0.7311[/C][/ROW]
[ROW][C]204[/C][C]89.2[/C][C]94.5141[/C][C]74.7097[/C][C]149.5215[/C][C]0.4249[/C][C]0.4225[/C][C]0.3425[/C][C]0.7122[/C][/ROW]
[ROW][C]205[/C][C]97.7[/C][C]93.6655[/C][C]73.9408[/C][C]148.9743[/C][C]0.4432[/C][C]0.5629[/C][C]0.2216[/C][C]0.7008[/C][/ROW]
[ROW][C]206[/C][C]121.1[/C][C]98.4063[/C][C]75.8701[/C][C]174.5886[/C][C]0.2797[/C][C]0.5072[/C][C]0.2373[/C][C]0.693[/C][/ROW]
[ROW][C]207[/C][C]108.8[/C][C]100.5928[/C][C]76.5111[/C][C]193.0773[/C][C]0.431[/C][C]0.3319[/C][C]0.4028[/C][C]0.6779[/C][/ROW]
[ROW][C]208[/C][C]92.9[/C][C]98.6519[/C][C]75.335[/C][C]184.7325[/C][C]0.4479[/C][C]0.4086[/C][C]0.3763[/C][C]0.6744[/C][/ROW]
[ROW][C]209[/C][C]113.6[/C][C]95.8075[/C][C]73.762[/C][C]171.2681[/C][C]0.322[/C][C]0.5301[/C][C]0.3866[/C][C]0.6707[/C][/ROW]
[ROW][C]210[/C][C]112.6[/C][C]95.7896[/C][C]73.4791[/C][C]174.7277[/C][C]0.3382[/C][C]0.3292[/C][C]0.5513[/C][C]0.6634[/C][/ROW]
[ROW][C]211[/C][C]98.8[/C][C]83.7401[/C][C]67.3922[/C][C]124.008[/C][C]0.2318[/C][C]0.0801[/C][C]0.654[/C][C]0.595[/C][/ROW]
[ROW][C]212[/C][C]78[/C][C]78.4033[/C][C]64.3386[/C][C]109.2519[/C][C]0.4898[/C][C]0.0975[/C][C]0.4899[/C][C]0.4899[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310533&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310533&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])
18886.3-------
189112-------
190112.5-------
191109.5-------
192105.9-------
193115.3-------
194126.2-------
195112.2-------
196112.5-------
197106.9-------
19890.6-------
19975.6-------
20078.8-------
201101.898.981478.5086154.49680.46040.76190.32290.7619
20293.999.912678.3152163.7260.42670.47690.34950.7417
20310096.639676.329153.3750.45380.53770.32840.7311
20489.294.514174.7097149.52150.42490.42250.34250.7122
20597.793.665573.9408148.97430.44320.56290.22160.7008
206121.198.406375.8701174.58860.27970.50720.23730.693
207108.8100.592876.5111193.07730.4310.33190.40280.6779
20892.998.651975.335184.73250.44790.40860.37630.6744
209113.695.807573.762171.26810.3220.53010.38660.6707
210112.695.789673.4791174.72770.33820.32920.55130.6634
21198.883.740167.3922124.0080.23180.08010.6540.595
2127878.403364.3386109.25190.48980.09750.48990.4899







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
2010.28620.02770.02770.02817.9446000.21960.2196
2020.3259-0.0640.04590.045136.151322.0484.6955-0.46840.344
2030.29950.03360.04180.041411.292618.46294.29680.26180.3166
2040.2969-0.05960.04620.045528.239220.90694.5724-0.4140.3409
2050.30130.04130.04520.044916.276919.98094.470.31430.3356
2060.3950.18740.06890.0718515.0058102.485110.12351.76790.5743
2070.46910.07540.06990.072867.358997.46719.87250.63940.5836
2080.4452-0.06190.06890.071233.084489.41929.4562-0.44810.5667
2090.40190.15660.07860.0822316.5738114.658610.70791.38610.6577
2100.42040.14930.08570.0901282.5902131.451811.46521.30960.7229
2110.24530.15240.09180.0969226.8016140.119911.83721.17320.7639
2120.2007-0.00520.08450.08920.1626128.456811.3339-0.03140.7028

\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.2862 & 0.0277 & 0.0277 & 0.0281 & 7.9446 & 0 & 0 & 0.2196 & 0.2196 \tabularnewline
202 & 0.3259 & -0.064 & 0.0459 & 0.0451 & 36.1513 & 22.048 & 4.6955 & -0.4684 & 0.344 \tabularnewline
203 & 0.2995 & 0.0336 & 0.0418 & 0.0414 & 11.2926 & 18.4629 & 4.2968 & 0.2618 & 0.3166 \tabularnewline
204 & 0.2969 & -0.0596 & 0.0462 & 0.0455 & 28.2392 & 20.9069 & 4.5724 & -0.414 & 0.3409 \tabularnewline
205 & 0.3013 & 0.0413 & 0.0452 & 0.0449 & 16.2769 & 19.9809 & 4.47 & 0.3143 & 0.3356 \tabularnewline
206 & 0.395 & 0.1874 & 0.0689 & 0.0718 & 515.0058 & 102.4851 & 10.1235 & 1.7679 & 0.5743 \tabularnewline
207 & 0.4691 & 0.0754 & 0.0699 & 0.0728 & 67.3589 & 97.4671 & 9.8725 & 0.6394 & 0.5836 \tabularnewline
208 & 0.4452 & -0.0619 & 0.0689 & 0.0712 & 33.0844 & 89.4192 & 9.4562 & -0.4481 & 0.5667 \tabularnewline
209 & 0.4019 & 0.1566 & 0.0786 & 0.0822 & 316.5738 & 114.6586 & 10.7079 & 1.3861 & 0.6577 \tabularnewline
210 & 0.4204 & 0.1493 & 0.0857 & 0.0901 & 282.5902 & 131.4518 & 11.4652 & 1.3096 & 0.7229 \tabularnewline
211 & 0.2453 & 0.1524 & 0.0918 & 0.0969 & 226.8016 & 140.1199 & 11.8372 & 1.1732 & 0.7639 \tabularnewline
212 & 0.2007 & -0.0052 & 0.0845 & 0.0892 & 0.1626 & 128.4568 & 11.3339 & -0.0314 & 0.7028 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=310533&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.2862[/C][C]0.0277[/C][C]0.0277[/C][C]0.0281[/C][C]7.9446[/C][C]0[/C][C]0[/C][C]0.2196[/C][C]0.2196[/C][/ROW]
[ROW][C]202[/C][C]0.3259[/C][C]-0.064[/C][C]0.0459[/C][C]0.0451[/C][C]36.1513[/C][C]22.048[/C][C]4.6955[/C][C]-0.4684[/C][C]0.344[/C][/ROW]
[ROW][C]203[/C][C]0.2995[/C][C]0.0336[/C][C]0.0418[/C][C]0.0414[/C][C]11.2926[/C][C]18.4629[/C][C]4.2968[/C][C]0.2618[/C][C]0.3166[/C][/ROW]
[ROW][C]204[/C][C]0.2969[/C][C]-0.0596[/C][C]0.0462[/C][C]0.0455[/C][C]28.2392[/C][C]20.9069[/C][C]4.5724[/C][C]-0.414[/C][C]0.3409[/C][/ROW]
[ROW][C]205[/C][C]0.3013[/C][C]0.0413[/C][C]0.0452[/C][C]0.0449[/C][C]16.2769[/C][C]19.9809[/C][C]4.47[/C][C]0.3143[/C][C]0.3356[/C][/ROW]
[ROW][C]206[/C][C]0.395[/C][C]0.1874[/C][C]0.0689[/C][C]0.0718[/C][C]515.0058[/C][C]102.4851[/C][C]10.1235[/C][C]1.7679[/C][C]0.5743[/C][/ROW]
[ROW][C]207[/C][C]0.4691[/C][C]0.0754[/C][C]0.0699[/C][C]0.0728[/C][C]67.3589[/C][C]97.4671[/C][C]9.8725[/C][C]0.6394[/C][C]0.5836[/C][/ROW]
[ROW][C]208[/C][C]0.4452[/C][C]-0.0619[/C][C]0.0689[/C][C]0.0712[/C][C]33.0844[/C][C]89.4192[/C][C]9.4562[/C][C]-0.4481[/C][C]0.5667[/C][/ROW]
[ROW][C]209[/C][C]0.4019[/C][C]0.1566[/C][C]0.0786[/C][C]0.0822[/C][C]316.5738[/C][C]114.6586[/C][C]10.7079[/C][C]1.3861[/C][C]0.6577[/C][/ROW]
[ROW][C]210[/C][C]0.4204[/C][C]0.1493[/C][C]0.0857[/C][C]0.0901[/C][C]282.5902[/C][C]131.4518[/C][C]11.4652[/C][C]1.3096[/C][C]0.7229[/C][/ROW]
[ROW][C]211[/C][C]0.2453[/C][C]0.1524[/C][C]0.0918[/C][C]0.0969[/C][C]226.8016[/C][C]140.1199[/C][C]11.8372[/C][C]1.1732[/C][C]0.7639[/C][/ROW]
[ROW][C]212[/C][C]0.2007[/C][C]-0.0052[/C][C]0.0845[/C][C]0.0892[/C][C]0.1626[/C][C]128.4568[/C][C]11.3339[/C][C]-0.0314[/C][C]0.7028[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=310533&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=310533&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.28620.02770.02770.02817.9446000.21960.2196
2020.3259-0.0640.04590.045136.151322.0484.6955-0.46840.344
2030.29950.03360.04180.041411.292618.46294.29680.26180.3166
2040.2969-0.05960.04620.045528.239220.90694.5724-0.4140.3409
2050.30130.04130.04520.044916.276919.98094.470.31430.3356
2060.3950.18740.06890.0718515.0058102.485110.12351.76790.5743
2070.46910.07540.06990.072867.358997.46719.87250.63940.5836
2080.4452-0.06190.06890.071233.084489.41929.4562-0.44810.5667
2090.40190.15660.07860.0822316.5738114.658610.70791.38610.6577
2100.42040.14930.08570.0901282.5902131.451811.46521.30960.7229
2110.24530.15240.09180.0969226.8016140.119911.83721.17320.7639
2120.2007-0.00520.08450.08920.1626128.456811.3339-0.03140.7028



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