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 computationMon, 15 Dec 2008 16:29:01 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/16/t1229383817570wgl3k7naepvl.htm/, Retrieved Wed, 15 May 2024 23:49:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33865, Retrieved Wed, 15 May 2024 23:49:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact219
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Spectral Analysis] [SA] [2008-12-03 17:24:26] [bc937651ef42bf891200cf0e0edc7238]
F   P   [Spectral Analysis] [SA eigen reeks 1 ...] [2008-12-07 19:01:53] [bc937651ef42bf891200cf0e0edc7238]
F RMP     [(Partial) Autocorrelation Function] [ACF stationaire r...] [2008-12-07 19:04:47] [bc937651ef42bf891200cf0e0edc7238]
F RMP       [ARIMA Backward Selection] [ARIMA eigen reeks] [2008-12-07 19:30:35] [bc937651ef42bf891200cf0e0edc7238]
- RMP           [ARIMA Forecasting] [ARIMA FORECAST] [2008-12-15 23:29:01] [21d7d81e7693ad6dde5aadefb1046611] [Current]
Feedback Forum

Post a new message
Dataseries X:
206010
198112
194519
185705
180173
176142
203401
221902
197378
185001
176356
180449
180144
173666
165688
161570
156145
153730
182698
200765
176512
166618
158644
159585
163095
159044
155511
153745
150569
150605
179612
194690
189917
184128
175335
179566
181140
177876
175041
169292
166070
166972
206348
215706
202108
195411
193111
195198
198770
194163
190420
189733
186029
191531
232571
243477
227247
217859
208679
213188
216234
213586
209465
204045
200237
203666
241476
260307
243324
244460
233575
237217
235243
230354
227184
221678
217142
219452
256446
265845
248624
241114
229245
231805
219277
219313
212610
214771
211142
211457
240048
240636
230580
208795
197922
194596
194581
185686
178106
172608
167302
168053
202300
202388
182516
173476
166444
171297
169701
164182
161914
159612
151001
158114
186530
187069
174330
169362




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33865&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33865&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33865&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 Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[106])
94208795-------
95197922-------
96194596-------
97194581-------
98185686-------
99178106-------
100172608-------
101167302-------
102168053-------
103202300-------
104202388-------
105182516-------
106173476-------
107166444162637.3938153222.0554172052.73220.21410.01200.012
108171297162615.2519149629.8297175600.67420.0950.281700.0506
109169701159611.2617143844.4046175378.11880.10490.073200.0424
110164182154182.1929136055.8215172308.56420.13980.04673e-040.0185
111161914147881.2619127668.9664168093.55750.08680.0570.00170.0065
112159612144490.269122388.0417166592.49620.090.06120.00630.0051
113151001139911.006116068.1873163753.82470.1810.05270.01220.0029
114158114141054.5874115589.8754166519.29940.09460.2220.01890.0063
115186530174697.6191147708.3043201686.93390.19510.88580.02250.5353
116187069178179.4365149747.1544206611.71870.270.28240.04760.6271
117174330161627.0474131821.5743191432.52050.20180.04720.08480.2179
118169362150316.1314119198.0052181434.25760.11510.06520.07230.0723

\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[106]) \tabularnewline
94 & 208795 & - & - & - & - & - & - & - \tabularnewline
95 & 197922 & - & - & - & - & - & - & - \tabularnewline
96 & 194596 & - & - & - & - & - & - & - \tabularnewline
97 & 194581 & - & - & - & - & - & - & - \tabularnewline
98 & 185686 & - & - & - & - & - & - & - \tabularnewline
99 & 178106 & - & - & - & - & - & - & - \tabularnewline
100 & 172608 & - & - & - & - & - & - & - \tabularnewline
101 & 167302 & - & - & - & - & - & - & - \tabularnewline
102 & 168053 & - & - & - & - & - & - & - \tabularnewline
103 & 202300 & - & - & - & - & - & - & - \tabularnewline
104 & 202388 & - & - & - & - & - & - & - \tabularnewline
105 & 182516 & - & - & - & - & - & - & - \tabularnewline
106 & 173476 & - & - & - & - & - & - & - \tabularnewline
107 & 166444 & 162637.3938 & 153222.0554 & 172052.7322 & 0.2141 & 0.012 & 0 & 0.012 \tabularnewline
108 & 171297 & 162615.2519 & 149629.8297 & 175600.6742 & 0.095 & 0.2817 & 0 & 0.0506 \tabularnewline
109 & 169701 & 159611.2617 & 143844.4046 & 175378.1188 & 0.1049 & 0.0732 & 0 & 0.0424 \tabularnewline
110 & 164182 & 154182.1929 & 136055.8215 & 172308.5642 & 0.1398 & 0.0467 & 3e-04 & 0.0185 \tabularnewline
111 & 161914 & 147881.2619 & 127668.9664 & 168093.5575 & 0.0868 & 0.057 & 0.0017 & 0.0065 \tabularnewline
112 & 159612 & 144490.269 & 122388.0417 & 166592.4962 & 0.09 & 0.0612 & 0.0063 & 0.0051 \tabularnewline
113 & 151001 & 139911.006 & 116068.1873 & 163753.8247 & 0.181 & 0.0527 & 0.0122 & 0.0029 \tabularnewline
114 & 158114 & 141054.5874 & 115589.8754 & 166519.2994 & 0.0946 & 0.222 & 0.0189 & 0.0063 \tabularnewline
115 & 186530 & 174697.6191 & 147708.3043 & 201686.9339 & 0.1951 & 0.8858 & 0.0225 & 0.5353 \tabularnewline
116 & 187069 & 178179.4365 & 149747.1544 & 206611.7187 & 0.27 & 0.2824 & 0.0476 & 0.6271 \tabularnewline
117 & 174330 & 161627.0474 & 131821.5743 & 191432.5205 & 0.2018 & 0.0472 & 0.0848 & 0.2179 \tabularnewline
118 & 169362 & 150316.1314 & 119198.0052 & 181434.2576 & 0.1151 & 0.0652 & 0.0723 & 0.0723 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33865&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[106])[/C][/ROW]
[ROW][C]94[/C][C]208795[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]197922[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]194596[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]194581[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]185686[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]178106[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]172608[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]167302[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]168053[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]202300[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]202388[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]182516[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]173476[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]166444[/C][C]162637.3938[/C][C]153222.0554[/C][C]172052.7322[/C][C]0.2141[/C][C]0.012[/C][C]0[/C][C]0.012[/C][/ROW]
[ROW][C]108[/C][C]171297[/C][C]162615.2519[/C][C]149629.8297[/C][C]175600.6742[/C][C]0.095[/C][C]0.2817[/C][C]0[/C][C]0.0506[/C][/ROW]
[ROW][C]109[/C][C]169701[/C][C]159611.2617[/C][C]143844.4046[/C][C]175378.1188[/C][C]0.1049[/C][C]0.0732[/C][C]0[/C][C]0.0424[/C][/ROW]
[ROW][C]110[/C][C]164182[/C][C]154182.1929[/C][C]136055.8215[/C][C]172308.5642[/C][C]0.1398[/C][C]0.0467[/C][C]3e-04[/C][C]0.0185[/C][/ROW]
[ROW][C]111[/C][C]161914[/C][C]147881.2619[/C][C]127668.9664[/C][C]168093.5575[/C][C]0.0868[/C][C]0.057[/C][C]0.0017[/C][C]0.0065[/C][/ROW]
[ROW][C]112[/C][C]159612[/C][C]144490.269[/C][C]122388.0417[/C][C]166592.4962[/C][C]0.09[/C][C]0.0612[/C][C]0.0063[/C][C]0.0051[/C][/ROW]
[ROW][C]113[/C][C]151001[/C][C]139911.006[/C][C]116068.1873[/C][C]163753.8247[/C][C]0.181[/C][C]0.0527[/C][C]0.0122[/C][C]0.0029[/C][/ROW]
[ROW][C]114[/C][C]158114[/C][C]141054.5874[/C][C]115589.8754[/C][C]166519.2994[/C][C]0.0946[/C][C]0.222[/C][C]0.0189[/C][C]0.0063[/C][/ROW]
[ROW][C]115[/C][C]186530[/C][C]174697.6191[/C][C]147708.3043[/C][C]201686.9339[/C][C]0.1951[/C][C]0.8858[/C][C]0.0225[/C][C]0.5353[/C][/ROW]
[ROW][C]116[/C][C]187069[/C][C]178179.4365[/C][C]149747.1544[/C][C]206611.7187[/C][C]0.27[/C][C]0.2824[/C][C]0.0476[/C][C]0.6271[/C][/ROW]
[ROW][C]117[/C][C]174330[/C][C]161627.0474[/C][C]131821.5743[/C][C]191432.5205[/C][C]0.2018[/C][C]0.0472[/C][C]0.0848[/C][C]0.2179[/C][/ROW]
[ROW][C]118[/C][C]169362[/C][C]150316.1314[/C][C]119198.0052[/C][C]181434.2576[/C][C]0.1151[/C][C]0.0652[/C][C]0.0723[/C][C]0.0723[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33865&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33865&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[106])
94208795-------
95197922-------
96194596-------
97194581-------
98185686-------
99178106-------
100172608-------
101167302-------
102168053-------
103202300-------
104202388-------
105182516-------
106173476-------
107166444162637.3938153222.0554172052.73220.21410.01200.012
108171297162615.2519149629.8297175600.67420.0950.281700.0506
109169701159611.2617143844.4046175378.11880.10490.073200.0424
110164182154182.1929136055.8215172308.56420.13980.04673e-040.0185
111161914147881.2619127668.9664168093.55750.08680.0570.00170.0065
112159612144490.269122388.0417166592.49620.090.06120.00630.0051
113151001139911.006116068.1873163753.82470.1810.05270.01220.0029
114158114141054.5874115589.8754166519.29940.09460.2220.01890.0063
115186530174697.6191147708.3043201686.93390.19510.88580.02250.5353
116187069178179.4365149747.1544206611.71870.270.28240.04760.6271
117174330161627.0474131821.5743191432.52050.20180.04720.08480.2179
118169362150316.1314119198.0052181434.25760.11510.06520.07230.0723







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1070.02950.02340.00214490250.59241207520.88271098.8726
1080.04070.05340.004475372749.42446281062.4522506.2048
1090.05040.06320.0053101802818.65098483568.22092912.6566
1100.060.06490.005499996142.80978333011.90082886.6957
1110.06970.09490.0079196917737.300516409811.44174050.9025
1120.0780.10470.0087228666749.574519055562.46454365.2677
1130.08690.07930.0066122987966.310510248997.19253201.4055
1140.09210.12090.0101291023558.843124251963.23694924.6282
1150.07880.06770.0056140005238.305711667103.19213415.7142
1160.08140.04990.004279024338.83416585361.56952566.1959
1170.09410.07860.0065161365004.970913447083.74763667.0266
1180.10560.12670.0106362745111.044730228759.25375498.0687

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
107 & 0.0295 & 0.0234 & 0.002 & 14490250.5924 & 1207520.8827 & 1098.8726 \tabularnewline
108 & 0.0407 & 0.0534 & 0.0044 & 75372749.4244 & 6281062.452 & 2506.2048 \tabularnewline
109 & 0.0504 & 0.0632 & 0.0053 & 101802818.6509 & 8483568.2209 & 2912.6566 \tabularnewline
110 & 0.06 & 0.0649 & 0.0054 & 99996142.8097 & 8333011.9008 & 2886.6957 \tabularnewline
111 & 0.0697 & 0.0949 & 0.0079 & 196917737.3005 & 16409811.4417 & 4050.9025 \tabularnewline
112 & 0.078 & 0.1047 & 0.0087 & 228666749.5745 & 19055562.4645 & 4365.2677 \tabularnewline
113 & 0.0869 & 0.0793 & 0.0066 & 122987966.3105 & 10248997.1925 & 3201.4055 \tabularnewline
114 & 0.0921 & 0.1209 & 0.0101 & 291023558.8431 & 24251963.2369 & 4924.6282 \tabularnewline
115 & 0.0788 & 0.0677 & 0.0056 & 140005238.3057 & 11667103.1921 & 3415.7142 \tabularnewline
116 & 0.0814 & 0.0499 & 0.0042 & 79024338.8341 & 6585361.5695 & 2566.1959 \tabularnewline
117 & 0.0941 & 0.0786 & 0.0065 & 161365004.9709 & 13447083.7476 & 3667.0266 \tabularnewline
118 & 0.1056 & 0.1267 & 0.0106 & 362745111.0447 & 30228759.2537 & 5498.0687 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33865&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]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]107[/C][C]0.0295[/C][C]0.0234[/C][C]0.002[/C][C]14490250.5924[/C][C]1207520.8827[/C][C]1098.8726[/C][/ROW]
[ROW][C]108[/C][C]0.0407[/C][C]0.0534[/C][C]0.0044[/C][C]75372749.4244[/C][C]6281062.452[/C][C]2506.2048[/C][/ROW]
[ROW][C]109[/C][C]0.0504[/C][C]0.0632[/C][C]0.0053[/C][C]101802818.6509[/C][C]8483568.2209[/C][C]2912.6566[/C][/ROW]
[ROW][C]110[/C][C]0.06[/C][C]0.0649[/C][C]0.0054[/C][C]99996142.8097[/C][C]8333011.9008[/C][C]2886.6957[/C][/ROW]
[ROW][C]111[/C][C]0.0697[/C][C]0.0949[/C][C]0.0079[/C][C]196917737.3005[/C][C]16409811.4417[/C][C]4050.9025[/C][/ROW]
[ROW][C]112[/C][C]0.078[/C][C]0.1047[/C][C]0.0087[/C][C]228666749.5745[/C][C]19055562.4645[/C][C]4365.2677[/C][/ROW]
[ROW][C]113[/C][C]0.0869[/C][C]0.0793[/C][C]0.0066[/C][C]122987966.3105[/C][C]10248997.1925[/C][C]3201.4055[/C][/ROW]
[ROW][C]114[/C][C]0.0921[/C][C]0.1209[/C][C]0.0101[/C][C]291023558.8431[/C][C]24251963.2369[/C][C]4924.6282[/C][/ROW]
[ROW][C]115[/C][C]0.0788[/C][C]0.0677[/C][C]0.0056[/C][C]140005238.3057[/C][C]11667103.1921[/C][C]3415.7142[/C][/ROW]
[ROW][C]116[/C][C]0.0814[/C][C]0.0499[/C][C]0.0042[/C][C]79024338.8341[/C][C]6585361.5695[/C][C]2566.1959[/C][/ROW]
[ROW][C]117[/C][C]0.0941[/C][C]0.0786[/C][C]0.0065[/C][C]161365004.9709[/C][C]13447083.7476[/C][C]3667.0266[/C][/ROW]
[ROW][C]118[/C][C]0.1056[/C][C]0.1267[/C][C]0.0106[/C][C]362745111.0447[/C][C]30228759.2537[/C][C]5498.0687[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33865&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33865&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.PEMAPESq.EMSERMSE
1070.02950.02340.00214490250.59241207520.88271098.8726
1080.04070.05340.004475372749.42446281062.4522506.2048
1090.05040.06320.0053101802818.65098483568.22092912.6566
1100.060.06490.005499996142.80978333011.90082886.6957
1110.06970.09490.0079196917737.300516409811.44174050.9025
1120.0780.10470.0087228666749.574519055562.46454365.2677
1130.08690.07930.0066122987966.310510248997.19253201.4055
1140.09210.12090.0101291023558.843124251963.23694924.6282
1150.07880.06770.0056140005238.305711667103.19213415.7142
1160.08140.04990.004279024338.83416585361.56952566.1959
1170.09410.07860.0065161365004.970913447083.74763667.0266
1180.10560.12670.0106362745111.044730228759.25375498.0687



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; 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
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.mape <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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',7,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,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')