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, 22 Dec 2008 08:46:47 -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/22/t1229960960lxadpzx7vywws82.htm/, Retrieved Mon, 13 May 2024 05:40:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36107, Retrieved Mon, 13 May 2024 05:40:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact145
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2008-12-19 15:01:14] [a4ee3bef49b119f4bd2e925060c84f5e]
-         [ARIMA Forecasting] [Forecast bij p=0 ...] [2008-12-22 15:46:47] [270782e2502ae87124d0ebdcd1862d6a] [Current]
Feedback Forum

Post a new message
Dataseries X:
451
450
444
429
421
400
389
384
432
446
431
423
416
416
413
399
386
374
365
365
418
428
424
421
417
423
423
419
406
398
390
391
444
460
455
456
452
459
461
451
443
439
430
436
488
506
502
501
501
515
521
520
512
509
505
511
570
592
594
586
586
592
594
586
572
563
555
554
601
622
617
606
595
599
600
592
575
567
555
555
608
631
629
624
610
616
621
604
584
574
555
545
599
620
608
590
579
580
579
572
560
551
537
541
588
607
599
578
563
566
561
554
540
526
512
505
554
584
569
540
522
526
527
516
503
489
479
475
524
552
532
511
492
492
493
481
462
457
442
439
488
521
501
485
464
460
467
460
448
443
436
431
484
510
513
503
471
471
476
475
470
461
455
456
517
525
523
519
509
512
519
517
510
509
501
507
569
580
578
565
547
555
562
561
555
544
537
543
594
611
613
611
594
595
591
589
584
573
567
569
621
629
628
612
595
597
593
590
580
574
573
573
620
626
620
588
566
557
561
549
532
526
511
499
555
565
542
527
510
514
517
508
493
490
469
478
528
534
518
506
502




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36107&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36107&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36107&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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[229])
217566-------
218557-------
219561-------
220549-------
221532-------
222526-------
223511-------
224499-------
225555-------
226565-------
227542-------
228527-------
229510-------
230514506.0805494.9312517.22980.08190.245400.2454
231517508.4387492.6712524.20620.14360.244700.4231
232508498.4543479.1431517.76550.16630.029900.1206
233493484.017461.7183506.31560.21490.017500.0112
234490476.5947451.664501.52530.1460.09861e-040.0043
235469464.3524437.0423491.66260.36940.03284e-045e-04
236478457.2827427.7843486.7810.08430.21810.00282e-04
237528511.3028479.7678542.83780.14970.98080.00330.5323
238534524.181490.733557.62890.28250.41150.00840.797
239518508.0851472.8279543.34240.29080.07480.02970.4576
240506493.5491456.571530.52720.25460.09750.03810.1916
241502477.8996439.2772516.5220.11070.07690.05170.0517

\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[229]) \tabularnewline
217 & 566 & - & - & - & - & - & - & - \tabularnewline
218 & 557 & - & - & - & - & - & - & - \tabularnewline
219 & 561 & - & - & - & - & - & - & - \tabularnewline
220 & 549 & - & - & - & - & - & - & - \tabularnewline
221 & 532 & - & - & - & - & - & - & - \tabularnewline
222 & 526 & - & - & - & - & - & - & - \tabularnewline
223 & 511 & - & - & - & - & - & - & - \tabularnewline
224 & 499 & - & - & - & - & - & - & - \tabularnewline
225 & 555 & - & - & - & - & - & - & - \tabularnewline
226 & 565 & - & - & - & - & - & - & - \tabularnewline
227 & 542 & - & - & - & - & - & - & - \tabularnewline
228 & 527 & - & - & - & - & - & - & - \tabularnewline
229 & 510 & - & - & - & - & - & - & - \tabularnewline
230 & 514 & 506.0805 & 494.9312 & 517.2298 & 0.0819 & 0.2454 & 0 & 0.2454 \tabularnewline
231 & 517 & 508.4387 & 492.6712 & 524.2062 & 0.1436 & 0.2447 & 0 & 0.4231 \tabularnewline
232 & 508 & 498.4543 & 479.1431 & 517.7655 & 0.1663 & 0.0299 & 0 & 0.1206 \tabularnewline
233 & 493 & 484.017 & 461.7183 & 506.3156 & 0.2149 & 0.0175 & 0 & 0.0112 \tabularnewline
234 & 490 & 476.5947 & 451.664 & 501.5253 & 0.146 & 0.0986 & 1e-04 & 0.0043 \tabularnewline
235 & 469 & 464.3524 & 437.0423 & 491.6626 & 0.3694 & 0.0328 & 4e-04 & 5e-04 \tabularnewline
236 & 478 & 457.2827 & 427.7843 & 486.781 & 0.0843 & 0.2181 & 0.0028 & 2e-04 \tabularnewline
237 & 528 & 511.3028 & 479.7678 & 542.8378 & 0.1497 & 0.9808 & 0.0033 & 0.5323 \tabularnewline
238 & 534 & 524.181 & 490.733 & 557.6289 & 0.2825 & 0.4115 & 0.0084 & 0.797 \tabularnewline
239 & 518 & 508.0851 & 472.8279 & 543.3424 & 0.2908 & 0.0748 & 0.0297 & 0.4576 \tabularnewline
240 & 506 & 493.5491 & 456.571 & 530.5272 & 0.2546 & 0.0975 & 0.0381 & 0.1916 \tabularnewline
241 & 502 & 477.8996 & 439.2772 & 516.522 & 0.1107 & 0.0769 & 0.0517 & 0.0517 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36107&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[229])[/C][/ROW]
[ROW][C]217[/C][C]566[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]218[/C][C]557[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]219[/C][C]561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]220[/C][C]549[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]221[/C][C]532[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]222[/C][C]526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]223[/C][C]511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]224[/C][C]499[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]225[/C][C]555[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]226[/C][C]565[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]227[/C][C]542[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]228[/C][C]527[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]229[/C][C]510[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]230[/C][C]514[/C][C]506.0805[/C][C]494.9312[/C][C]517.2298[/C][C]0.0819[/C][C]0.2454[/C][C]0[/C][C]0.2454[/C][/ROW]
[ROW][C]231[/C][C]517[/C][C]508.4387[/C][C]492.6712[/C][C]524.2062[/C][C]0.1436[/C][C]0.2447[/C][C]0[/C][C]0.4231[/C][/ROW]
[ROW][C]232[/C][C]508[/C][C]498.4543[/C][C]479.1431[/C][C]517.7655[/C][C]0.1663[/C][C]0.0299[/C][C]0[/C][C]0.1206[/C][/ROW]
[ROW][C]233[/C][C]493[/C][C]484.017[/C][C]461.7183[/C][C]506.3156[/C][C]0.2149[/C][C]0.0175[/C][C]0[/C][C]0.0112[/C][/ROW]
[ROW][C]234[/C][C]490[/C][C]476.5947[/C][C]451.664[/C][C]501.5253[/C][C]0.146[/C][C]0.0986[/C][C]1e-04[/C][C]0.0043[/C][/ROW]
[ROW][C]235[/C][C]469[/C][C]464.3524[/C][C]437.0423[/C][C]491.6626[/C][C]0.3694[/C][C]0.0328[/C][C]4e-04[/C][C]5e-04[/C][/ROW]
[ROW][C]236[/C][C]478[/C][C]457.2827[/C][C]427.7843[/C][C]486.781[/C][C]0.0843[/C][C]0.2181[/C][C]0.0028[/C][C]2e-04[/C][/ROW]
[ROW][C]237[/C][C]528[/C][C]511.3028[/C][C]479.7678[/C][C]542.8378[/C][C]0.1497[/C][C]0.9808[/C][C]0.0033[/C][C]0.5323[/C][/ROW]
[ROW][C]238[/C][C]534[/C][C]524.181[/C][C]490.733[/C][C]557.6289[/C][C]0.2825[/C][C]0.4115[/C][C]0.0084[/C][C]0.797[/C][/ROW]
[ROW][C]239[/C][C]518[/C][C]508.0851[/C][C]472.8279[/C][C]543.3424[/C][C]0.2908[/C][C]0.0748[/C][C]0.0297[/C][C]0.4576[/C][/ROW]
[ROW][C]240[/C][C]506[/C][C]493.5491[/C][C]456.571[/C][C]530.5272[/C][C]0.2546[/C][C]0.0975[/C][C]0.0381[/C][C]0.1916[/C][/ROW]
[ROW][C]241[/C][C]502[/C][C]477.8996[/C][C]439.2772[/C][C]516.522[/C][C]0.1107[/C][C]0.0769[/C][C]0.0517[/C][C]0.0517[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36107&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36107&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[229])
217566-------
218557-------
219561-------
220549-------
221532-------
222526-------
223511-------
224499-------
225555-------
226565-------
227542-------
228527-------
229510-------
230514506.0805494.9312517.22980.08190.245400.2454
231517508.4387492.6712524.20620.14360.244700.4231
232508498.4543479.1431517.76550.16630.029900.1206
233493484.017461.7183506.31560.21490.017500.0112
234490476.5947451.664501.52530.1460.09861e-040.0043
235469464.3524437.0423491.66260.36940.03284e-045e-04
236478457.2827427.7843486.7810.08430.21810.00282e-04
237528511.3028479.7678542.83780.14970.98080.00330.5323
238534524.181490.733557.62890.28250.41150.00840.797
239518508.0851472.8279543.34240.29080.07480.02970.4576
240506493.5491456.571530.52720.25460.09750.03810.1916
241502477.8996439.2772516.5220.11070.07690.05170.0517







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
2300.01120.01560.001362.71835.22652.2862
2310.01580.01680.001473.29586.1082.4714
2320.01980.01920.001691.12077.59342.7556
2330.02350.01860.001580.6956.72462.5932
2340.02670.02810.0023179.703314.97533.8698
2350.030.018e-0421.59981.81.3416
2360.03290.04530.0038429.207735.76735.9806
2370.03150.03270.0027278.796423.2334.8201
2380.03260.01870.001696.41328.03442.8345
2390.03540.01950.001698.30488.19212.8622
2400.03820.02520.0021155.025212.91883.5943
2410.04120.05040.0042580.828348.40246.9572

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
230 & 0.0112 & 0.0156 & 0.0013 & 62.7183 & 5.2265 & 2.2862 \tabularnewline
231 & 0.0158 & 0.0168 & 0.0014 & 73.2958 & 6.108 & 2.4714 \tabularnewline
232 & 0.0198 & 0.0192 & 0.0016 & 91.1207 & 7.5934 & 2.7556 \tabularnewline
233 & 0.0235 & 0.0186 & 0.0015 & 80.695 & 6.7246 & 2.5932 \tabularnewline
234 & 0.0267 & 0.0281 & 0.0023 & 179.7033 & 14.9753 & 3.8698 \tabularnewline
235 & 0.03 & 0.01 & 8e-04 & 21.5998 & 1.8 & 1.3416 \tabularnewline
236 & 0.0329 & 0.0453 & 0.0038 & 429.2077 & 35.7673 & 5.9806 \tabularnewline
237 & 0.0315 & 0.0327 & 0.0027 & 278.7964 & 23.233 & 4.8201 \tabularnewline
238 & 0.0326 & 0.0187 & 0.0016 & 96.4132 & 8.0344 & 2.8345 \tabularnewline
239 & 0.0354 & 0.0195 & 0.0016 & 98.3048 & 8.1921 & 2.8622 \tabularnewline
240 & 0.0382 & 0.0252 & 0.0021 & 155.0252 & 12.9188 & 3.5943 \tabularnewline
241 & 0.0412 & 0.0504 & 0.0042 & 580.8283 & 48.4024 & 6.9572 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36107&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]230[/C][C]0.0112[/C][C]0.0156[/C][C]0.0013[/C][C]62.7183[/C][C]5.2265[/C][C]2.2862[/C][/ROW]
[ROW][C]231[/C][C]0.0158[/C][C]0.0168[/C][C]0.0014[/C][C]73.2958[/C][C]6.108[/C][C]2.4714[/C][/ROW]
[ROW][C]232[/C][C]0.0198[/C][C]0.0192[/C][C]0.0016[/C][C]91.1207[/C][C]7.5934[/C][C]2.7556[/C][/ROW]
[ROW][C]233[/C][C]0.0235[/C][C]0.0186[/C][C]0.0015[/C][C]80.695[/C][C]6.7246[/C][C]2.5932[/C][/ROW]
[ROW][C]234[/C][C]0.0267[/C][C]0.0281[/C][C]0.0023[/C][C]179.7033[/C][C]14.9753[/C][C]3.8698[/C][/ROW]
[ROW][C]235[/C][C]0.03[/C][C]0.01[/C][C]8e-04[/C][C]21.5998[/C][C]1.8[/C][C]1.3416[/C][/ROW]
[ROW][C]236[/C][C]0.0329[/C][C]0.0453[/C][C]0.0038[/C][C]429.2077[/C][C]35.7673[/C][C]5.9806[/C][/ROW]
[ROW][C]237[/C][C]0.0315[/C][C]0.0327[/C][C]0.0027[/C][C]278.7964[/C][C]23.233[/C][C]4.8201[/C][/ROW]
[ROW][C]238[/C][C]0.0326[/C][C]0.0187[/C][C]0.0016[/C][C]96.4132[/C][C]8.0344[/C][C]2.8345[/C][/ROW]
[ROW][C]239[/C][C]0.0354[/C][C]0.0195[/C][C]0.0016[/C][C]98.3048[/C][C]8.1921[/C][C]2.8622[/C][/ROW]
[ROW][C]240[/C][C]0.0382[/C][C]0.0252[/C][C]0.0021[/C][C]155.0252[/C][C]12.9188[/C][C]3.5943[/C][/ROW]
[ROW][C]241[/C][C]0.0412[/C][C]0.0504[/C][C]0.0042[/C][C]580.8283[/C][C]48.4024[/C][C]6.9572[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36107&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36107&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
2300.01120.01560.001362.71835.22652.2862
2310.01580.01680.001473.29586.1082.4714
2320.01980.01920.001691.12077.59342.7556
2330.02350.01860.001580.6956.72462.5932
2340.02670.02810.0023179.703314.97533.8698
2350.030.018e-0421.59981.81.3416
2360.03290.04530.0038429.207735.76735.9806
2370.03150.03270.0027278.796423.2334.8201
2380.03260.01870.001696.41328.03442.8345
2390.03540.01950.001698.30488.19212.8622
2400.03820.02520.0021155.025212.91883.5943
2410.04120.05040.0042580.828348.40246.9572



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')