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, 07 Dec 2011 16:55:28 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/07/t1323294957v6ylch8r3lfvl3b.htm/, Retrieved Thu, 02 May 2024 16:56:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=152754, Retrieved Thu, 02 May 2024 16:56:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact87
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]
- R PD        [ARIMA Forecasting] [ARIMA forecast] [2011-12-07 21:55:28] [614dd89c388120cee0dd25886939832b] [Current]
Feedback Forum

Post a new message
Dataseries X:
548
563
581
572
519
521
531
540
548
556
551
549
564
586
604
601
545
537
552
563
575
580
575
558
564
581
597
587
536
524
537
536
533
528
516
502
506
518
534
528
478
469
490
493
508
517
514
510
527
542
565
555
499
511
526
532
549
561
557
566
588
620
626
620
573
573
574
580
590
593
597
595
612
628
629
621
569
567
573
584
589
591
595
594
611
613
611
594
543
537
544
555
561
562
555
547
565
578
580
569




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'George Udny Yule' @ yule.wessa.net

\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 & 7 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=152754&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]7 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=152754&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=152754&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 time7 seconds
R Server'George Udny Yule' @ yule.wessa.net







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[88])
76621-------
77569-------
78567-------
79573-------
80584-------
81589-------
82591-------
83595-------
84594-------
85611-------
86613-------
87611-------
88594-------
89543536.849523.4905550.04340.1804000
90537531.2257510.3529551.69620.29020.12983e-040
91544538.5988510.7475565.74750.34830.54590.00650
92555545.0299510.5589578.4430.27930.52410.01110.002
93561550.8802510.1293590.17520.30690.41860.02860.0157
94562553.6879506.872598.60090.35840.37480.05170.0393
95555552.3992499.6163602.76910.45970.35440.04870.0527
96547549.4688490.8706605.09090.46530.42270.05830.0583
97565564.9088501.8592624.61420.49880.72170.06510.1698
98578574.6689507.1699638.40910.45920.61690.11930.2761
99580580.2757508.3354647.99880.49680.52630.18690.3456
100569567.0723489.5355639.62160.47920.36340.23350.2335

\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[88]) \tabularnewline
76 & 621 & - & - & - & - & - & - & - \tabularnewline
77 & 569 & - & - & - & - & - & - & - \tabularnewline
78 & 567 & - & - & - & - & - & - & - \tabularnewline
79 & 573 & - & - & - & - & - & - & - \tabularnewline
80 & 584 & - & - & - & - & - & - & - \tabularnewline
81 & 589 & - & - & - & - & - & - & - \tabularnewline
82 & 591 & - & - & - & - & - & - & - \tabularnewline
83 & 595 & - & - & - & - & - & - & - \tabularnewline
84 & 594 & - & - & - & - & - & - & - \tabularnewline
85 & 611 & - & - & - & - & - & - & - \tabularnewline
86 & 613 & - & - & - & - & - & - & - \tabularnewline
87 & 611 & - & - & - & - & - & - & - \tabularnewline
88 & 594 & - & - & - & - & - & - & - \tabularnewline
89 & 543 & 536.849 & 523.4905 & 550.0434 & 0.1804 & 0 & 0 & 0 \tabularnewline
90 & 537 & 531.2257 & 510.3529 & 551.6962 & 0.2902 & 0.1298 & 3e-04 & 0 \tabularnewline
91 & 544 & 538.5988 & 510.7475 & 565.7475 & 0.3483 & 0.5459 & 0.0065 & 0 \tabularnewline
92 & 555 & 545.0299 & 510.5589 & 578.443 & 0.2793 & 0.5241 & 0.0111 & 0.002 \tabularnewline
93 & 561 & 550.8802 & 510.1293 & 590.1752 & 0.3069 & 0.4186 & 0.0286 & 0.0157 \tabularnewline
94 & 562 & 553.6879 & 506.872 & 598.6009 & 0.3584 & 0.3748 & 0.0517 & 0.0393 \tabularnewline
95 & 555 & 552.3992 & 499.6163 & 602.7691 & 0.4597 & 0.3544 & 0.0487 & 0.0527 \tabularnewline
96 & 547 & 549.4688 & 490.8706 & 605.0909 & 0.4653 & 0.4227 & 0.0583 & 0.0583 \tabularnewline
97 & 565 & 564.9088 & 501.8592 & 624.6142 & 0.4988 & 0.7217 & 0.0651 & 0.1698 \tabularnewline
98 & 578 & 574.6689 & 507.1699 & 638.4091 & 0.4592 & 0.6169 & 0.1193 & 0.2761 \tabularnewline
99 & 580 & 580.2757 & 508.3354 & 647.9988 & 0.4968 & 0.5263 & 0.1869 & 0.3456 \tabularnewline
100 & 569 & 567.0723 & 489.5355 & 639.6216 & 0.4792 & 0.3634 & 0.2335 & 0.2335 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=152754&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[88])[/C][/ROW]
[ROW][C]76[/C][C]621[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]569[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]567[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]573[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]584[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]589[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]595[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]613[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]543[/C][C]536.849[/C][C]523.4905[/C][C]550.0434[/C][C]0.1804[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]90[/C][C]537[/C][C]531.2257[/C][C]510.3529[/C][C]551.6962[/C][C]0.2902[/C][C]0.1298[/C][C]3e-04[/C][C]0[/C][/ROW]
[ROW][C]91[/C][C]544[/C][C]538.5988[/C][C]510.7475[/C][C]565.7475[/C][C]0.3483[/C][C]0.5459[/C][C]0.0065[/C][C]0[/C][/ROW]
[ROW][C]92[/C][C]555[/C][C]545.0299[/C][C]510.5589[/C][C]578.443[/C][C]0.2793[/C][C]0.5241[/C][C]0.0111[/C][C]0.002[/C][/ROW]
[ROW][C]93[/C][C]561[/C][C]550.8802[/C][C]510.1293[/C][C]590.1752[/C][C]0.3069[/C][C]0.4186[/C][C]0.0286[/C][C]0.0157[/C][/ROW]
[ROW][C]94[/C][C]562[/C][C]553.6879[/C][C]506.872[/C][C]598.6009[/C][C]0.3584[/C][C]0.3748[/C][C]0.0517[/C][C]0.0393[/C][/ROW]
[ROW][C]95[/C][C]555[/C][C]552.3992[/C][C]499.6163[/C][C]602.7691[/C][C]0.4597[/C][C]0.3544[/C][C]0.0487[/C][C]0.0527[/C][/ROW]
[ROW][C]96[/C][C]547[/C][C]549.4688[/C][C]490.8706[/C][C]605.0909[/C][C]0.4653[/C][C]0.4227[/C][C]0.0583[/C][C]0.0583[/C][/ROW]
[ROW][C]97[/C][C]565[/C][C]564.9088[/C][C]501.8592[/C][C]624.6142[/C][C]0.4988[/C][C]0.7217[/C][C]0.0651[/C][C]0.1698[/C][/ROW]
[ROW][C]98[/C][C]578[/C][C]574.6689[/C][C]507.1699[/C][C]638.4091[/C][C]0.4592[/C][C]0.6169[/C][C]0.1193[/C][C]0.2761[/C][/ROW]
[ROW][C]99[/C][C]580[/C][C]580.2757[/C][C]508.3354[/C][C]647.9988[/C][C]0.4968[/C][C]0.5263[/C][C]0.1869[/C][C]0.3456[/C][/ROW]
[ROW][C]100[/C][C]569[/C][C]567.0723[/C][C]489.5355[/C][C]639.6216[/C][C]0.4792[/C][C]0.3634[/C][C]0.2335[/C][C]0.2335[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=152754&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=152754&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[88])
76621-------
77569-------
78567-------
79573-------
80584-------
81589-------
82591-------
83595-------
84594-------
85611-------
86613-------
87611-------
88594-------
89543536.849523.4905550.04340.1804000
90537531.2257510.3529551.69620.29020.12983e-040
91544538.5988510.7475565.74750.34830.54590.00650
92555545.0299510.5589578.4430.27930.52410.01110.002
93561550.8802510.1293590.17520.30690.41860.02860.0157
94562553.6879506.872598.60090.35840.37480.05170.0393
95555552.3992499.6163602.76910.45970.35440.04870.0527
96547549.4688490.8706605.09090.46530.42270.05830.0583
97565564.9088501.8592624.61420.49880.72170.06510.1698
98578574.6689507.1699638.40910.45920.61690.11930.2761
99580580.2757508.3354647.99880.49680.52630.18690.3456
100569567.0723489.5355639.62160.47920.36340.23350.2335







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
890.01250.0115037.834200
900.01970.01090.011233.342235.58825.9656
910.02570.010.010829.173333.44995.7836
920.03130.01830.012799.402849.93817.0667
930.03640.01840.0138102.410560.43267.7738
940.04140.0150.01469.091761.87587.8661
950.04650.00470.01276.764254.00277.3487
960.0516-0.00450.01176.094848.01426.9292
970.05392e-040.01040.008342.68026.533
980.05660.00580.009911.096339.52186.2866
990.0595-5e-040.00910.07635.93595.9947
1000.06530.00340.00863.716233.25095.7664

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
89 & 0.0125 & 0.0115 & 0 & 37.8342 & 0 & 0 \tabularnewline
90 & 0.0197 & 0.0109 & 0.0112 & 33.3422 & 35.5882 & 5.9656 \tabularnewline
91 & 0.0257 & 0.01 & 0.0108 & 29.1733 & 33.4499 & 5.7836 \tabularnewline
92 & 0.0313 & 0.0183 & 0.0127 & 99.4028 & 49.9381 & 7.0667 \tabularnewline
93 & 0.0364 & 0.0184 & 0.0138 & 102.4105 & 60.4326 & 7.7738 \tabularnewline
94 & 0.0414 & 0.015 & 0.014 & 69.0917 & 61.8758 & 7.8661 \tabularnewline
95 & 0.0465 & 0.0047 & 0.0127 & 6.7642 & 54.0027 & 7.3487 \tabularnewline
96 & 0.0516 & -0.0045 & 0.0117 & 6.0948 & 48.0142 & 6.9292 \tabularnewline
97 & 0.0539 & 2e-04 & 0.0104 & 0.0083 & 42.6802 & 6.533 \tabularnewline
98 & 0.0566 & 0.0058 & 0.0099 & 11.0963 & 39.5218 & 6.2866 \tabularnewline
99 & 0.0595 & -5e-04 & 0.0091 & 0.076 & 35.9359 & 5.9947 \tabularnewline
100 & 0.0653 & 0.0034 & 0.0086 & 3.7162 & 33.2509 & 5.7664 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=152754&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]89[/C][C]0.0125[/C][C]0.0115[/C][C]0[/C][C]37.8342[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]90[/C][C]0.0197[/C][C]0.0109[/C][C]0.0112[/C][C]33.3422[/C][C]35.5882[/C][C]5.9656[/C][/ROW]
[ROW][C]91[/C][C]0.0257[/C][C]0.01[/C][C]0.0108[/C][C]29.1733[/C][C]33.4499[/C][C]5.7836[/C][/ROW]
[ROW][C]92[/C][C]0.0313[/C][C]0.0183[/C][C]0.0127[/C][C]99.4028[/C][C]49.9381[/C][C]7.0667[/C][/ROW]
[ROW][C]93[/C][C]0.0364[/C][C]0.0184[/C][C]0.0138[/C][C]102.4105[/C][C]60.4326[/C][C]7.7738[/C][/ROW]
[ROW][C]94[/C][C]0.0414[/C][C]0.015[/C][C]0.014[/C][C]69.0917[/C][C]61.8758[/C][C]7.8661[/C][/ROW]
[ROW][C]95[/C][C]0.0465[/C][C]0.0047[/C][C]0.0127[/C][C]6.7642[/C][C]54.0027[/C][C]7.3487[/C][/ROW]
[ROW][C]96[/C][C]0.0516[/C][C]-0.0045[/C][C]0.0117[/C][C]6.0948[/C][C]48.0142[/C][C]6.9292[/C][/ROW]
[ROW][C]97[/C][C]0.0539[/C][C]2e-04[/C][C]0.0104[/C][C]0.0083[/C][C]42.6802[/C][C]6.533[/C][/ROW]
[ROW][C]98[/C][C]0.0566[/C][C]0.0058[/C][C]0.0099[/C][C]11.0963[/C][C]39.5218[/C][C]6.2866[/C][/ROW]
[ROW][C]99[/C][C]0.0595[/C][C]-5e-04[/C][C]0.0091[/C][C]0.076[/C][C]35.9359[/C][C]5.9947[/C][/ROW]
[ROW][C]100[/C][C]0.0653[/C][C]0.0034[/C][C]0.0086[/C][C]3.7162[/C][C]33.2509[/C][C]5.7664[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=152754&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=152754&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
890.01250.0115037.834200
900.01970.01090.011233.342235.58825.9656
910.02570.010.010829.173333.44995.7836
920.03130.01830.012799.402849.93817.0667
930.03640.01840.0138102.410560.43267.7738
940.04140.0150.01469.091761.87587.8661
950.04650.00470.01276.764254.00277.3487
960.0516-0.00450.01176.094848.01426.9292
970.05392e-040.01040.008342.68026.533
980.05660.00580.009911.096339.52186.2866
990.0595-5e-040.00910.07635.93595.9947
1000.06530.00340.00863.716233.25095.7664



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