Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 15 Dec 2008 14:21:05 -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/15/t1229376121qx7seoy8gg4uohl.htm/, Retrieved Wed, 15 May 2024 00:46:55 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33828, Retrieved Wed, 15 May 2024 00:46:55 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact155
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F       [ARIMA Forecasting] [] [2008-12-15 21:21:05] [af8fa2ce3787e7eb62013778260b011d] [Current]
Feedback Forum
2008-12-17 14:21:17 [Dave Bellekens] [reply
De student heeft enkel de tijdreeks in de software gestopt en de resultaten laten berekenen, zonder enig woordje uitleg.
Het is niet mogelijk om op deze manier goede feedback te geven, aangezien ik niet kan zien wat hij wel of niet snapt.
2008-12-22 13:39:30 [Thomas Plasschaert] [reply
De opdracht is niet uitgewerkt, het is dan ook volkomen onnodig om hier nog tijd in de steken.
2008-12-22 19:44:51 [Gilliam Schoorel] [reply
Ik sluit mij aan bij de mening van de andere studenten.
2008-12-23 11:23:10 [Sam De Block] [reply
STAP 1: Alles werd correct behandeld. Er werd wel geen uitleg gegeven bij alle tabellen en grafieken. Voor de uitleg verwijs ik u naar de colleges.

STAP 2: Niet opgelost.

STAP 3: Niet opgelost.

STAP 4: Niet opgelost.

STAP 5: Niet opgelost.

Als je al niet de moeite doet om wat verdere uitleg te geven, dan doen wij ook geen moeite om die voor jou op te schrijven. Ik sluit mij dan ook aan bij mijn collegas van hierboven.

Post a new message
Dataseries X:
112
118
132
129
121
135
148
148
136
119
104
118
115
126
141
135
125
149
170
170
158
133
114
140
145
150
178
163
172
178
199
199
184
162
146
166
171
180
193
181
183
218
230
242
209
191
172
194
196
196
236
235
229
243
264
272
237
211
180
201
204
188
235
227
234
264
302
293
259
229
203
229
242
233
267
269
270
315
364
347
312
274
237
278
284
277
317
313
318
374
413
405
355
306
271
306
315
301
356
348
355
422
465
467
404
347
305
336
340
318
362
348
363
435
491
505
404
359
310
337
360
342
406
396
420
472
548
559
463
407
362
405
417
391
419
461
472
535
622
606
508
461
390
432




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=33828&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=33828&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33828&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[132])
120337-------
121360-------
122342-------
123406-------
124396-------
125420-------
126472-------
127548-------
128559-------
129463-------
130407-------
131362-------
132405-------
133417419.6876394.434446.05180.42080.862610.8626
134391399.3032369.6535430.57880.30140.13370.99980.3605
135419463.7338425.8644503.89970.01450.99980.99760.9979
136461452.0033410.5991496.24530.34510.92810.99350.9813
137472472.697426.0432522.81450.48910.67630.98030.9959
138535539.6353484.4411599.08770.43930.98710.98711
139622612.7906548.3786682.32040.39760.98580.96611
140606622.8455553.9035697.58060.32930.50880.9531
141508521.5189457.6416591.390.35230.00890.94970.9995
142461461.6333400.3727529.17170.49270.08920.94360.9499
143390409.9404351.3043475.1060.27430.06230.92530.5591
144432452.5285387.1677525.24690.290.9540.89990.8999

\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[132]) \tabularnewline
120 & 337 & - & - & - & - & - & - & - \tabularnewline
121 & 360 & - & - & - & - & - & - & - \tabularnewline
122 & 342 & - & - & - & - & - & - & - \tabularnewline
123 & 406 & - & - & - & - & - & - & - \tabularnewline
124 & 396 & - & - & - & - & - & - & - \tabularnewline
125 & 420 & - & - & - & - & - & - & - \tabularnewline
126 & 472 & - & - & - & - & - & - & - \tabularnewline
127 & 548 & - & - & - & - & - & - & - \tabularnewline
128 & 559 & - & - & - & - & - & - & - \tabularnewline
129 & 463 & - & - & - & - & - & - & - \tabularnewline
130 & 407 & - & - & - & - & - & - & - \tabularnewline
131 & 362 & - & - & - & - & - & - & - \tabularnewline
132 & 405 & - & - & - & - & - & - & - \tabularnewline
133 & 417 & 419.6876 & 394.434 & 446.0518 & 0.4208 & 0.8626 & 1 & 0.8626 \tabularnewline
134 & 391 & 399.3032 & 369.6535 & 430.5788 & 0.3014 & 0.1337 & 0.9998 & 0.3605 \tabularnewline
135 & 419 & 463.7338 & 425.8644 & 503.8997 & 0.0145 & 0.9998 & 0.9976 & 0.9979 \tabularnewline
136 & 461 & 452.0033 & 410.5991 & 496.2453 & 0.3451 & 0.9281 & 0.9935 & 0.9813 \tabularnewline
137 & 472 & 472.697 & 426.0432 & 522.8145 & 0.4891 & 0.6763 & 0.9803 & 0.9959 \tabularnewline
138 & 535 & 539.6353 & 484.4411 & 599.0877 & 0.4393 & 0.9871 & 0.9871 & 1 \tabularnewline
139 & 622 & 612.7906 & 548.3786 & 682.3204 & 0.3976 & 0.9858 & 0.9661 & 1 \tabularnewline
140 & 606 & 622.8455 & 553.9035 & 697.5806 & 0.3293 & 0.5088 & 0.953 & 1 \tabularnewline
141 & 508 & 521.5189 & 457.6416 & 591.39 & 0.3523 & 0.0089 & 0.9497 & 0.9995 \tabularnewline
142 & 461 & 461.6333 & 400.3727 & 529.1717 & 0.4927 & 0.0892 & 0.9436 & 0.9499 \tabularnewline
143 & 390 & 409.9404 & 351.3043 & 475.106 & 0.2743 & 0.0623 & 0.9253 & 0.5591 \tabularnewline
144 & 432 & 452.5285 & 387.1677 & 525.2469 & 0.29 & 0.954 & 0.8999 & 0.8999 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33828&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[132])[/C][/ROW]
[ROW][C]120[/C][C]337[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]342[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]123[/C][C]406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]124[/C][C]396[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]125[/C][C]420[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]126[/C][C]472[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]127[/C][C]548[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]128[/C][C]559[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]129[/C][C]463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]130[/C][C]407[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]131[/C][C]362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]132[/C][C]405[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]133[/C][C]417[/C][C]419.6876[/C][C]394.434[/C][C]446.0518[/C][C]0.4208[/C][C]0.8626[/C][C]1[/C][C]0.8626[/C][/ROW]
[ROW][C]134[/C][C]391[/C][C]399.3032[/C][C]369.6535[/C][C]430.5788[/C][C]0.3014[/C][C]0.1337[/C][C]0.9998[/C][C]0.3605[/C][/ROW]
[ROW][C]135[/C][C]419[/C][C]463.7338[/C][C]425.8644[/C][C]503.8997[/C][C]0.0145[/C][C]0.9998[/C][C]0.9976[/C][C]0.9979[/C][/ROW]
[ROW][C]136[/C][C]461[/C][C]452.0033[/C][C]410.5991[/C][C]496.2453[/C][C]0.3451[/C][C]0.9281[/C][C]0.9935[/C][C]0.9813[/C][/ROW]
[ROW][C]137[/C][C]472[/C][C]472.697[/C][C]426.0432[/C][C]522.8145[/C][C]0.4891[/C][C]0.6763[/C][C]0.9803[/C][C]0.9959[/C][/ROW]
[ROW][C]138[/C][C]535[/C][C]539.6353[/C][C]484.4411[/C][C]599.0877[/C][C]0.4393[/C][C]0.9871[/C][C]0.9871[/C][C]1[/C][/ROW]
[ROW][C]139[/C][C]622[/C][C]612.7906[/C][C]548.3786[/C][C]682.3204[/C][C]0.3976[/C][C]0.9858[/C][C]0.9661[/C][C]1[/C][/ROW]
[ROW][C]140[/C][C]606[/C][C]622.8455[/C][C]553.9035[/C][C]697.5806[/C][C]0.3293[/C][C]0.5088[/C][C]0.953[/C][C]1[/C][/ROW]
[ROW][C]141[/C][C]508[/C][C]521.5189[/C][C]457.6416[/C][C]591.39[/C][C]0.3523[/C][C]0.0089[/C][C]0.9497[/C][C]0.9995[/C][/ROW]
[ROW][C]142[/C][C]461[/C][C]461.6333[/C][C]400.3727[/C][C]529.1717[/C][C]0.4927[/C][C]0.0892[/C][C]0.9436[/C][C]0.9499[/C][/ROW]
[ROW][C]143[/C][C]390[/C][C]409.9404[/C][C]351.3043[/C][C]475.106[/C][C]0.2743[/C][C]0.0623[/C][C]0.9253[/C][C]0.5591[/C][/ROW]
[ROW][C]144[/C][C]432[/C][C]452.5285[/C][C]387.1677[/C][C]525.2469[/C][C]0.29[/C][C]0.954[/C][C]0.8999[/C][C]0.8999[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33828&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33828&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[132])
120337-------
121360-------
122342-------
123406-------
124396-------
125420-------
126472-------
127548-------
128559-------
129463-------
130407-------
131362-------
132405-------
133417419.6876394.434446.05180.42080.862610.8626
134391399.3032369.6535430.57880.30140.13370.99980.3605
135419463.7338425.8644503.89970.01450.99980.99760.9979
136461452.0033410.5991496.24530.34510.92810.99350.9813
137472472.697426.0432522.81450.48910.67630.98030.9959
138535539.6353484.4411599.08770.43930.98710.98711
139622612.7906548.3786682.32040.39760.98580.96611
140606622.8455553.9035697.58060.32930.50880.9531
141508521.5189457.6416591.390.35230.00890.94970.9995
142461461.6333400.3727529.17170.49270.08920.94360.9499
143390409.9404351.3043475.1060.27430.06230.92530.5591
144432452.5285387.1677525.24690.290.9540.89990.8999







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1330.0321-0.00645e-047.2230.60190.7758
1340.04-0.02080.001768.94275.74522.3969
1350.0442-0.09650.0082001.1124166.759412.9135
1360.04990.01990.001780.93976.7452.5971
1370.0541-0.00151e-040.48590.04050.2012
1380.0562-0.00867e-0421.48621.79051.3381
1390.05790.0150.001384.81347.06782.6585
1400.0612-0.0270.0023283.770223.64754.8629
1410.0684-0.02590.0022182.76115.23013.9026
1420.0746-0.00141e-040.40110.03340.1828
1430.0811-0.04860.0041397.617733.13485.7563
1440.082-0.04540.0038421.417635.11815.9261

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
133 & 0.0321 & -0.0064 & 5e-04 & 7.223 & 0.6019 & 0.7758 \tabularnewline
134 & 0.04 & -0.0208 & 0.0017 & 68.9427 & 5.7452 & 2.3969 \tabularnewline
135 & 0.0442 & -0.0965 & 0.008 & 2001.1124 & 166.7594 & 12.9135 \tabularnewline
136 & 0.0499 & 0.0199 & 0.0017 & 80.9397 & 6.745 & 2.5971 \tabularnewline
137 & 0.0541 & -0.0015 & 1e-04 & 0.4859 & 0.0405 & 0.2012 \tabularnewline
138 & 0.0562 & -0.0086 & 7e-04 & 21.4862 & 1.7905 & 1.3381 \tabularnewline
139 & 0.0579 & 0.015 & 0.0013 & 84.8134 & 7.0678 & 2.6585 \tabularnewline
140 & 0.0612 & -0.027 & 0.0023 & 283.7702 & 23.6475 & 4.8629 \tabularnewline
141 & 0.0684 & -0.0259 & 0.0022 & 182.761 & 15.2301 & 3.9026 \tabularnewline
142 & 0.0746 & -0.0014 & 1e-04 & 0.4011 & 0.0334 & 0.1828 \tabularnewline
143 & 0.0811 & -0.0486 & 0.0041 & 397.6177 & 33.1348 & 5.7563 \tabularnewline
144 & 0.082 & -0.0454 & 0.0038 & 421.4176 & 35.1181 & 5.9261 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33828&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]133[/C][C]0.0321[/C][C]-0.0064[/C][C]5e-04[/C][C]7.223[/C][C]0.6019[/C][C]0.7758[/C][/ROW]
[ROW][C]134[/C][C]0.04[/C][C]-0.0208[/C][C]0.0017[/C][C]68.9427[/C][C]5.7452[/C][C]2.3969[/C][/ROW]
[ROW][C]135[/C][C]0.0442[/C][C]-0.0965[/C][C]0.008[/C][C]2001.1124[/C][C]166.7594[/C][C]12.9135[/C][/ROW]
[ROW][C]136[/C][C]0.0499[/C][C]0.0199[/C][C]0.0017[/C][C]80.9397[/C][C]6.745[/C][C]2.5971[/C][/ROW]
[ROW][C]137[/C][C]0.0541[/C][C]-0.0015[/C][C]1e-04[/C][C]0.4859[/C][C]0.0405[/C][C]0.2012[/C][/ROW]
[ROW][C]138[/C][C]0.0562[/C][C]-0.0086[/C][C]7e-04[/C][C]21.4862[/C][C]1.7905[/C][C]1.3381[/C][/ROW]
[ROW][C]139[/C][C]0.0579[/C][C]0.015[/C][C]0.0013[/C][C]84.8134[/C][C]7.0678[/C][C]2.6585[/C][/ROW]
[ROW][C]140[/C][C]0.0612[/C][C]-0.027[/C][C]0.0023[/C][C]283.7702[/C][C]23.6475[/C][C]4.8629[/C][/ROW]
[ROW][C]141[/C][C]0.0684[/C][C]-0.0259[/C][C]0.0022[/C][C]182.761[/C][C]15.2301[/C][C]3.9026[/C][/ROW]
[ROW][C]142[/C][C]0.0746[/C][C]-0.0014[/C][C]1e-04[/C][C]0.4011[/C][C]0.0334[/C][C]0.1828[/C][/ROW]
[ROW][C]143[/C][C]0.0811[/C][C]-0.0486[/C][C]0.0041[/C][C]397.6177[/C][C]33.1348[/C][C]5.7563[/C][/ROW]
[ROW][C]144[/C][C]0.082[/C][C]-0.0454[/C][C]0.0038[/C][C]421.4176[/C][C]35.1181[/C][C]5.9261[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33828&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33828&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
1330.0321-0.00645e-047.2230.60190.7758
1340.04-0.02080.001768.94275.74522.3969
1350.0442-0.09650.0082001.1124166.759412.9135
1360.04990.01990.001780.93976.7452.5971
1370.0541-0.00151e-040.48590.04050.2012
1380.0562-0.00867e-0421.48621.79051.3381
1390.05790.0150.001384.81347.06782.6585
1400.0612-0.0270.0023283.770223.64754.8629
1410.0684-0.02590.0022182.76115.23013.9026
1420.0746-0.00141e-040.40110.03340.1828
1430.0811-0.04860.0041397.617733.13485.7563
1440.082-0.04540.0038421.417635.11815.9261



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