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 computationTue, 28 Dec 2010 12:19:01 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/28/t129353866873ewtcghcsm7a8w.htm/, Retrieved Sun, 05 May 2024 00:35:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116314, Retrieved Sun, 05 May 2024 00:35:35 +0000
QR Codes:

Original text written by user:Data Paper Statistiek
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact117
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [Workshop 9- ARIMA...] [2010-12-14 18:21:47] [ed447cc2ebcc70947ad11d93fa385845]
- R PD          [ARIMA Forecasting] [ARIMA Forecasting...] [2010-12-28 12:19:01] [25b2a837ac14189684edc0746bbb952e] [Current]
-   PD            [ARIMA Forecasting] [] [2010-12-29 14:38:10] [dc73d270d5d96f29ff77294e1b86f79b]
Feedback Forum

Post a new message
Dataseries X:
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
516
528
533
536
537
524
536
587
597
581
564
558
575
580
575
563
552
537
545
601
604
586
564
549




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116314&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116314&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116314&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[109])
97502-------
98516-------
99528-------
100533-------
101536-------
102537-------
103524-------
104536-------
105587-------
106597-------
107581-------
108564-------
109558-------
110575566.3013552.881579.72150.1020.887310.8873
111580574.5653554.2139594.91660.30030.483310.9447
112575574.119547.5882600.64980.47410.3320.99880.8831
113563569.5569537.1572601.95670.34580.3710.97880.7578
114552568.4802530.383606.57750.19830.6110.94730.7051
115537556.0222512.3436599.70070.19670.57160.92460.4646
116545563.3432514.1755612.51090.23230.85320.86210.5843
117601615.8248561.2497670.39990.29720.99450.84970.9811
118604625.6756565.7708685.58050.23910.79030.82590.9866
119586611.8801546.7219677.03840.21810.59370.82350.9475
120564596.6625526.3274666.99770.18140.61680.81860.8593
121549588.0419512.6069663.47690.15520.73390.78250.7825

\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[109]) \tabularnewline
97 & 502 & - & - & - & - & - & - & - \tabularnewline
98 & 516 & - & - & - & - & - & - & - \tabularnewline
99 & 528 & - & - & - & - & - & - & - \tabularnewline
100 & 533 & - & - & - & - & - & - & - \tabularnewline
101 & 536 & - & - & - & - & - & - & - \tabularnewline
102 & 537 & - & - & - & - & - & - & - \tabularnewline
103 & 524 & - & - & - & - & - & - & - \tabularnewline
104 & 536 & - & - & - & - & - & - & - \tabularnewline
105 & 587 & - & - & - & - & - & - & - \tabularnewline
106 & 597 & - & - & - & - & - & - & - \tabularnewline
107 & 581 & - & - & - & - & - & - & - \tabularnewline
108 & 564 & - & - & - & - & - & - & - \tabularnewline
109 & 558 & - & - & - & - & - & - & - \tabularnewline
110 & 575 & 566.3013 & 552.881 & 579.7215 & 0.102 & 0.8873 & 1 & 0.8873 \tabularnewline
111 & 580 & 574.5653 & 554.2139 & 594.9166 & 0.3003 & 0.4833 & 1 & 0.9447 \tabularnewline
112 & 575 & 574.119 & 547.5882 & 600.6498 & 0.4741 & 0.332 & 0.9988 & 0.8831 \tabularnewline
113 & 563 & 569.5569 & 537.1572 & 601.9567 & 0.3458 & 0.371 & 0.9788 & 0.7578 \tabularnewline
114 & 552 & 568.4802 & 530.383 & 606.5775 & 0.1983 & 0.611 & 0.9473 & 0.7051 \tabularnewline
115 & 537 & 556.0222 & 512.3436 & 599.7007 & 0.1967 & 0.5716 & 0.9246 & 0.4646 \tabularnewline
116 & 545 & 563.3432 & 514.1755 & 612.5109 & 0.2323 & 0.8532 & 0.8621 & 0.5843 \tabularnewline
117 & 601 & 615.8248 & 561.2497 & 670.3999 & 0.2972 & 0.9945 & 0.8497 & 0.9811 \tabularnewline
118 & 604 & 625.6756 & 565.7708 & 685.5805 & 0.2391 & 0.7903 & 0.8259 & 0.9866 \tabularnewline
119 & 586 & 611.8801 & 546.7219 & 677.0384 & 0.2181 & 0.5937 & 0.8235 & 0.9475 \tabularnewline
120 & 564 & 596.6625 & 526.3274 & 666.9977 & 0.1814 & 0.6168 & 0.8186 & 0.8593 \tabularnewline
121 & 549 & 588.0419 & 512.6069 & 663.4769 & 0.1552 & 0.7339 & 0.7825 & 0.7825 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116314&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[109])[/C][/ROW]
[ROW][C]97[/C][C]502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]516[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]533[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]524[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]587[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]581[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]564[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]558[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]575[/C][C]566.3013[/C][C]552.881[/C][C]579.7215[/C][C]0.102[/C][C]0.8873[/C][C]1[/C][C]0.8873[/C][/ROW]
[ROW][C]111[/C][C]580[/C][C]574.5653[/C][C]554.2139[/C][C]594.9166[/C][C]0.3003[/C][C]0.4833[/C][C]1[/C][C]0.9447[/C][/ROW]
[ROW][C]112[/C][C]575[/C][C]574.119[/C][C]547.5882[/C][C]600.6498[/C][C]0.4741[/C][C]0.332[/C][C]0.9988[/C][C]0.8831[/C][/ROW]
[ROW][C]113[/C][C]563[/C][C]569.5569[/C][C]537.1572[/C][C]601.9567[/C][C]0.3458[/C][C]0.371[/C][C]0.9788[/C][C]0.7578[/C][/ROW]
[ROW][C]114[/C][C]552[/C][C]568.4802[/C][C]530.383[/C][C]606.5775[/C][C]0.1983[/C][C]0.611[/C][C]0.9473[/C][C]0.7051[/C][/ROW]
[ROW][C]115[/C][C]537[/C][C]556.0222[/C][C]512.3436[/C][C]599.7007[/C][C]0.1967[/C][C]0.5716[/C][C]0.9246[/C][C]0.4646[/C][/ROW]
[ROW][C]116[/C][C]545[/C][C]563.3432[/C][C]514.1755[/C][C]612.5109[/C][C]0.2323[/C][C]0.8532[/C][C]0.8621[/C][C]0.5843[/C][/ROW]
[ROW][C]117[/C][C]601[/C][C]615.8248[/C][C]561.2497[/C][C]670.3999[/C][C]0.2972[/C][C]0.9945[/C][C]0.8497[/C][C]0.9811[/C][/ROW]
[ROW][C]118[/C][C]604[/C][C]625.6756[/C][C]565.7708[/C][C]685.5805[/C][C]0.2391[/C][C]0.7903[/C][C]0.8259[/C][C]0.9866[/C][/ROW]
[ROW][C]119[/C][C]586[/C][C]611.8801[/C][C]546.7219[/C][C]677.0384[/C][C]0.2181[/C][C]0.5937[/C][C]0.8235[/C][C]0.9475[/C][/ROW]
[ROW][C]120[/C][C]564[/C][C]596.6625[/C][C]526.3274[/C][C]666.9977[/C][C]0.1814[/C][C]0.6168[/C][C]0.8186[/C][C]0.8593[/C][/ROW]
[ROW][C]121[/C][C]549[/C][C]588.0419[/C][C]512.6069[/C][C]663.4769[/C][C]0.1552[/C][C]0.7339[/C][C]0.7825[/C][C]0.7825[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116314&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116314&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[109])
97502-------
98516-------
99528-------
100533-------
101536-------
102537-------
103524-------
104536-------
105587-------
106597-------
107581-------
108564-------
109558-------
110575566.3013552.881579.72150.1020.887310.8873
111580574.5653554.2139594.91660.30030.483310.9447
112575574.119547.5882600.64980.47410.3320.99880.8831
113563569.5569537.1572601.95670.34580.3710.97880.7578
114552568.4802530.383606.57750.19830.6110.94730.7051
115537556.0222512.3436599.70070.19670.57160.92460.4646
116545563.3432514.1755612.51090.23230.85320.86210.5843
117601615.8248561.2497670.39990.29720.99450.84970.9811
118604625.6756565.7708685.58050.23910.79030.82590.9866
119586611.8801546.7219677.03840.21810.59370.82350.9475
120564596.6625526.3274666.99770.18140.61680.81860.8593
121549588.0419512.6069663.47690.15520.73390.78250.7825







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1100.01210.0154075.668200
1110.01810.00950.012429.536252.60227.2527
1120.02360.00150.00880.776135.32685.9436
1130.029-0.01150.009542.993537.24356.1027
1140.0342-0.0290.0134271.598284.11449.1714
1150.0401-0.03420.0168361.8425130.402511.4194
1160.0445-0.03260.0191336.4725159.84112.6428
1170.0452-0.02410.0197219.776167.332912.9357
1180.0488-0.03460.0214469.8333200.944114.1755
1190.0543-0.04230.0235669.782247.827815.7425
1200.0601-0.05470.02631066.8415322.283617.9523
1210.0654-0.06640.02961524.2715422.449320.5536

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
110 & 0.0121 & 0.0154 & 0 & 75.6682 & 0 & 0 \tabularnewline
111 & 0.0181 & 0.0095 & 0.0124 & 29.5362 & 52.6022 & 7.2527 \tabularnewline
112 & 0.0236 & 0.0015 & 0.0088 & 0.7761 & 35.3268 & 5.9436 \tabularnewline
113 & 0.029 & -0.0115 & 0.0095 & 42.9935 & 37.2435 & 6.1027 \tabularnewline
114 & 0.0342 & -0.029 & 0.0134 & 271.5982 & 84.1144 & 9.1714 \tabularnewline
115 & 0.0401 & -0.0342 & 0.0168 & 361.8425 & 130.4025 & 11.4194 \tabularnewline
116 & 0.0445 & -0.0326 & 0.0191 & 336.4725 & 159.841 & 12.6428 \tabularnewline
117 & 0.0452 & -0.0241 & 0.0197 & 219.776 & 167.3329 & 12.9357 \tabularnewline
118 & 0.0488 & -0.0346 & 0.0214 & 469.8333 & 200.9441 & 14.1755 \tabularnewline
119 & 0.0543 & -0.0423 & 0.0235 & 669.782 & 247.8278 & 15.7425 \tabularnewline
120 & 0.0601 & -0.0547 & 0.0263 & 1066.8415 & 322.2836 & 17.9523 \tabularnewline
121 & 0.0654 & -0.0664 & 0.0296 & 1524.2715 & 422.4493 & 20.5536 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116314&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]110[/C][C]0.0121[/C][C]0.0154[/C][C]0[/C][C]75.6682[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]111[/C][C]0.0181[/C][C]0.0095[/C][C]0.0124[/C][C]29.5362[/C][C]52.6022[/C][C]7.2527[/C][/ROW]
[ROW][C]112[/C][C]0.0236[/C][C]0.0015[/C][C]0.0088[/C][C]0.7761[/C][C]35.3268[/C][C]5.9436[/C][/ROW]
[ROW][C]113[/C][C]0.029[/C][C]-0.0115[/C][C]0.0095[/C][C]42.9935[/C][C]37.2435[/C][C]6.1027[/C][/ROW]
[ROW][C]114[/C][C]0.0342[/C][C]-0.029[/C][C]0.0134[/C][C]271.5982[/C][C]84.1144[/C][C]9.1714[/C][/ROW]
[ROW][C]115[/C][C]0.0401[/C][C]-0.0342[/C][C]0.0168[/C][C]361.8425[/C][C]130.4025[/C][C]11.4194[/C][/ROW]
[ROW][C]116[/C][C]0.0445[/C][C]-0.0326[/C][C]0.0191[/C][C]336.4725[/C][C]159.841[/C][C]12.6428[/C][/ROW]
[ROW][C]117[/C][C]0.0452[/C][C]-0.0241[/C][C]0.0197[/C][C]219.776[/C][C]167.3329[/C][C]12.9357[/C][/ROW]
[ROW][C]118[/C][C]0.0488[/C][C]-0.0346[/C][C]0.0214[/C][C]469.8333[/C][C]200.9441[/C][C]14.1755[/C][/ROW]
[ROW][C]119[/C][C]0.0543[/C][C]-0.0423[/C][C]0.0235[/C][C]669.782[/C][C]247.8278[/C][C]15.7425[/C][/ROW]
[ROW][C]120[/C][C]0.0601[/C][C]-0.0547[/C][C]0.0263[/C][C]1066.8415[/C][C]322.2836[/C][C]17.9523[/C][/ROW]
[ROW][C]121[/C][C]0.0654[/C][C]-0.0664[/C][C]0.0296[/C][C]1524.2715[/C][C]422.4493[/C][C]20.5536[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116314&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116314&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
1100.01210.0154075.668200
1110.01810.00950.012429.536252.60227.2527
1120.02360.00150.00880.776135.32685.9436
1130.029-0.01150.009542.993537.24356.1027
1140.0342-0.0290.0134271.598284.11449.1714
1150.0401-0.03420.0168361.8425130.402511.4194
1160.0445-0.03260.0191336.4725159.84112.6428
1170.0452-0.02410.0197219.776167.332912.9357
1180.0488-0.03460.0214469.8333200.944114.1755
1190.0543-0.04230.0235669.782247.827815.7425
1200.0601-0.05470.02631066.8415322.283617.9523
1210.0654-0.06640.02961524.2715422.449320.5536



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; 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,par1))
(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.mape1 <- 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)
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.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.mse[1] = abs(perf.se[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.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[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',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.mape1[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.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')