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, 27 Dec 2010 23:50:02 +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/t12934942538efj9j032bd4u35.htm/, Retrieved Tue, 30 Apr 2024 00:48:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116194, Retrieved Tue, 30 Apr 2024 00:48:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact185
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Q1 The Seatbeltlaw] [2007-11-14 19:27:43] [8cd6641b921d30ebe00b648d1481bba0]
- RMPD  [Multiple Regression] [Seatbelt] [2009-11-12 13:54:52] [b98453cac15ba1066b407e146608df68]
-    D    [Multiple Regression] [WS7] [2009-11-18 17:01:04] [8b1aef4e7013bd33fbc2a5833375c5f5]
-   PD      [Multiple Regression] [WS7(2)] [2009-11-20 19:01:46] [7d268329e554b8694908ba13e6e6f258]
-   P         [Multiple Regression] [WS7(3)] [2009-11-21 10:22:47] [7d268329e554b8694908ba13e6e6f258]
-   PD          [Multiple Regression] [WS7(4)] [2009-11-21 10:55:20] [7d268329e554b8694908ba13e6e6f258]
- RMPD            [Univariate Data Series] [Niet-werkende wer...] [2009-11-25 19:16:52] [9717cb857c153ca3061376906953b329]
-   PD              [Univariate Data Series] [] [2010-12-16 17:58:43] [bcc4ad4a6c0f95d5b548de29638ac6c2]
-   PD                [Univariate Data Series] [] [2010-12-19 14:40:10] [bcc4ad4a6c0f95d5b548de29638ac6c2]
- RMP                   [ARIMA Backward Selection] [] [2010-12-19 16:37:56] [bcc4ad4a6c0f95d5b548de29638ac6c2]
- RMP                       [ARIMA Forecasting] [] [2010-12-27 23:50:02] [4e3652732e77bb1a104cdb5f8d687d01] [Current]
Feedback Forum

Post a new message
Dataseries X:
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274
560576
548854
531673
525919
511038
498662
555362
564591
541657
527070
509846
514258
516922
507561
492622
490243
469357
477580
528379
533590
517945
506174
501866
516141
528222
532638
536322
536535
523597
536214
586570
596594
580523
564478
557560
575093
580112
574761
563250
551531
537034
544686
600991
604378
586111
563668
548604




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116194&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116194&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116194&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[71])
59501866-------
60516141-------
61528222-------
62532638-------
63536322-------
64536535-------
65523597-------
66536214-------
67586570-------
68596594-------
69580523-------
70564478-------
71557560-------
72575093569354.6078554643.4368584065.77880.22230.94210.942
73580112579663.5373556964.0014602363.07320.48460.653410.9718
74574761581079.9888551095.302611064.67560.33980.52520.99920.9379
75563250580275.6572543290.9358617260.37850.18350.6150.99010.8857
76551531580178.3598536362.3279623994.39160.10.77550.97450.8442
77537034566407.4237515890.4264616924.42090.12720.71810.95160.6343
78544686576983.783519884.1608634083.40520.13380.91490.91920.7475
79600991628278.7184564712.5143691844.92240.20010.9950.90080.9854
80604378637688.6994567773.0506707604.34810.17520.84820.87530.9877
81586111622007.2175545861.1657698153.26920.17780.6750.85720.9514
82563668607054.8693524799.106689310.63250.15060.69110.84480.8809
83548604600090.2606511846.4692688334.05210.12640.79070.82760.8276

\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[71]) \tabularnewline
59 & 501866 & - & - & - & - & - & - & - \tabularnewline
60 & 516141 & - & - & - & - & - & - & - \tabularnewline
61 & 528222 & - & - & - & - & - & - & - \tabularnewline
62 & 532638 & - & - & - & - & - & - & - \tabularnewline
63 & 536322 & - & - & - & - & - & - & - \tabularnewline
64 & 536535 & - & - & - & - & - & - & - \tabularnewline
65 & 523597 & - & - & - & - & - & - & - \tabularnewline
66 & 536214 & - & - & - & - & - & - & - \tabularnewline
67 & 586570 & - & - & - & - & - & - & - \tabularnewline
68 & 596594 & - & - & - & - & - & - & - \tabularnewline
69 & 580523 & - & - & - & - & - & - & - \tabularnewline
70 & 564478 & - & - & - & - & - & - & - \tabularnewline
71 & 557560 & - & - & - & - & - & - & - \tabularnewline
72 & 575093 & 569354.6078 & 554643.4368 & 584065.7788 & 0.2223 & 0.942 & 1 & 0.942 \tabularnewline
73 & 580112 & 579663.5373 & 556964.0014 & 602363.0732 & 0.4846 & 0.6534 & 1 & 0.9718 \tabularnewline
74 & 574761 & 581079.9888 & 551095.302 & 611064.6756 & 0.3398 & 0.5252 & 0.9992 & 0.9379 \tabularnewline
75 & 563250 & 580275.6572 & 543290.9358 & 617260.3785 & 0.1835 & 0.615 & 0.9901 & 0.8857 \tabularnewline
76 & 551531 & 580178.3598 & 536362.3279 & 623994.3916 & 0.1 & 0.7755 & 0.9745 & 0.8442 \tabularnewline
77 & 537034 & 566407.4237 & 515890.4264 & 616924.4209 & 0.1272 & 0.7181 & 0.9516 & 0.6343 \tabularnewline
78 & 544686 & 576983.783 & 519884.1608 & 634083.4052 & 0.1338 & 0.9149 & 0.9192 & 0.7475 \tabularnewline
79 & 600991 & 628278.7184 & 564712.5143 & 691844.9224 & 0.2001 & 0.995 & 0.9008 & 0.9854 \tabularnewline
80 & 604378 & 637688.6994 & 567773.0506 & 707604.3481 & 0.1752 & 0.8482 & 0.8753 & 0.9877 \tabularnewline
81 & 586111 & 622007.2175 & 545861.1657 & 698153.2692 & 0.1778 & 0.675 & 0.8572 & 0.9514 \tabularnewline
82 & 563668 & 607054.8693 & 524799.106 & 689310.6325 & 0.1506 & 0.6911 & 0.8448 & 0.8809 \tabularnewline
83 & 548604 & 600090.2606 & 511846.4692 & 688334.0521 & 0.1264 & 0.7907 & 0.8276 & 0.8276 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116194&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[71])[/C][/ROW]
[ROW][C]59[/C][C]501866[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]516141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]528222[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]532638[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]536322[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]536535[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]523597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]536214[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]586570[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]596594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]580523[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]564478[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]557560[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]575093[/C][C]569354.6078[/C][C]554643.4368[/C][C]584065.7788[/C][C]0.2223[/C][C]0.942[/C][C]1[/C][C]0.942[/C][/ROW]
[ROW][C]73[/C][C]580112[/C][C]579663.5373[/C][C]556964.0014[/C][C]602363.0732[/C][C]0.4846[/C][C]0.6534[/C][C]1[/C][C]0.9718[/C][/ROW]
[ROW][C]74[/C][C]574761[/C][C]581079.9888[/C][C]551095.302[/C][C]611064.6756[/C][C]0.3398[/C][C]0.5252[/C][C]0.9992[/C][C]0.9379[/C][/ROW]
[ROW][C]75[/C][C]563250[/C][C]580275.6572[/C][C]543290.9358[/C][C]617260.3785[/C][C]0.1835[/C][C]0.615[/C][C]0.9901[/C][C]0.8857[/C][/ROW]
[ROW][C]76[/C][C]551531[/C][C]580178.3598[/C][C]536362.3279[/C][C]623994.3916[/C][C]0.1[/C][C]0.7755[/C][C]0.9745[/C][C]0.8442[/C][/ROW]
[ROW][C]77[/C][C]537034[/C][C]566407.4237[/C][C]515890.4264[/C][C]616924.4209[/C][C]0.1272[/C][C]0.7181[/C][C]0.9516[/C][C]0.6343[/C][/ROW]
[ROW][C]78[/C][C]544686[/C][C]576983.783[/C][C]519884.1608[/C][C]634083.4052[/C][C]0.1338[/C][C]0.9149[/C][C]0.9192[/C][C]0.7475[/C][/ROW]
[ROW][C]79[/C][C]600991[/C][C]628278.7184[/C][C]564712.5143[/C][C]691844.9224[/C][C]0.2001[/C][C]0.995[/C][C]0.9008[/C][C]0.9854[/C][/ROW]
[ROW][C]80[/C][C]604378[/C][C]637688.6994[/C][C]567773.0506[/C][C]707604.3481[/C][C]0.1752[/C][C]0.8482[/C][C]0.8753[/C][C]0.9877[/C][/ROW]
[ROW][C]81[/C][C]586111[/C][C]622007.2175[/C][C]545861.1657[/C][C]698153.2692[/C][C]0.1778[/C][C]0.675[/C][C]0.8572[/C][C]0.9514[/C][/ROW]
[ROW][C]82[/C][C]563668[/C][C]607054.8693[/C][C]524799.106[/C][C]689310.6325[/C][C]0.1506[/C][C]0.6911[/C][C]0.8448[/C][C]0.8809[/C][/ROW]
[ROW][C]83[/C][C]548604[/C][C]600090.2606[/C][C]511846.4692[/C][C]688334.0521[/C][C]0.1264[/C][C]0.7907[/C][C]0.8276[/C][C]0.8276[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116194&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116194&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[71])
59501866-------
60516141-------
61528222-------
62532638-------
63536322-------
64536535-------
65523597-------
66536214-------
67586570-------
68596594-------
69580523-------
70564478-------
71557560-------
72575093569354.6078554643.4368584065.77880.22230.94210.942
73580112579663.5373556964.0014602363.07320.48460.653410.9718
74574761581079.9888551095.302611064.67560.33980.52520.99920.9379
75563250580275.6572543290.9358617260.37850.18350.6150.99010.8857
76551531580178.3598536362.3279623994.39160.10.77550.97450.8442
77537034566407.4237515890.4264616924.42090.12720.71810.95160.6343
78544686576983.783519884.1608634083.40520.13380.91490.91920.7475
79600991628278.7184564712.5143691844.92240.20010.9950.90080.9854
80604378637688.6994567773.0506707604.34810.17520.84820.87530.9877
81586111622007.2175545861.1657698153.26920.17780.6750.85720.9514
82563668607054.8693524799.106689310.63250.15060.69110.84480.8809
83548604600090.2606511846.4692688334.05210.12640.79070.82760.8276







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
720.01320.0101032929145.34100
730.028e-040.0054201118.786916565132.06394070.0285
740.0263-0.01090.007239929619.540624353294.55624934.9057
750.0325-0.02930.0128289873002.21690733221.47119525.3988
760.0385-0.04940.0201820671221.5843236720821.493815385.7344
770.0455-0.05190.0254862798017.5643341067020.838818467.9999
780.0505-0.0560.02981043146787.2515441364130.326421008.668
790.0516-0.04340.0315744619573.3198479271060.700521892.2603
800.0559-0.05220.03381109602691.3585549307908.551423437.3187
810.0625-0.05770.03621288538428.462623230960.542524964.5941
820.0691-0.07150.03941882420427.2251737702730.240927160.6835
830.075-0.08580.04322650835035.6172897130422.355629952.1355

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
72 & 0.0132 & 0.0101 & 0 & 32929145.341 & 0 & 0 \tabularnewline
73 & 0.02 & 8e-04 & 0.0054 & 201118.7869 & 16565132.0639 & 4070.0285 \tabularnewline
74 & 0.0263 & -0.0109 & 0.0072 & 39929619.5406 & 24353294.5562 & 4934.9057 \tabularnewline
75 & 0.0325 & -0.0293 & 0.0128 & 289873002.216 & 90733221.4711 & 9525.3988 \tabularnewline
76 & 0.0385 & -0.0494 & 0.0201 & 820671221.5843 & 236720821.4938 & 15385.7344 \tabularnewline
77 & 0.0455 & -0.0519 & 0.0254 & 862798017.5643 & 341067020.8388 & 18467.9999 \tabularnewline
78 & 0.0505 & -0.056 & 0.0298 & 1043146787.2515 & 441364130.3264 & 21008.668 \tabularnewline
79 & 0.0516 & -0.0434 & 0.0315 & 744619573.3198 & 479271060.7005 & 21892.2603 \tabularnewline
80 & 0.0559 & -0.0522 & 0.0338 & 1109602691.3585 & 549307908.5514 & 23437.3187 \tabularnewline
81 & 0.0625 & -0.0577 & 0.0362 & 1288538428.462 & 623230960.5425 & 24964.5941 \tabularnewline
82 & 0.0691 & -0.0715 & 0.0394 & 1882420427.2251 & 737702730.2409 & 27160.6835 \tabularnewline
83 & 0.075 & -0.0858 & 0.0432 & 2650835035.6172 & 897130422.3556 & 29952.1355 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116194&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]72[/C][C]0.0132[/C][C]0.0101[/C][C]0[/C][C]32929145.341[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]73[/C][C]0.02[/C][C]8e-04[/C][C]0.0054[/C][C]201118.7869[/C][C]16565132.0639[/C][C]4070.0285[/C][/ROW]
[ROW][C]74[/C][C]0.0263[/C][C]-0.0109[/C][C]0.0072[/C][C]39929619.5406[/C][C]24353294.5562[/C][C]4934.9057[/C][/ROW]
[ROW][C]75[/C][C]0.0325[/C][C]-0.0293[/C][C]0.0128[/C][C]289873002.216[/C][C]90733221.4711[/C][C]9525.3988[/C][/ROW]
[ROW][C]76[/C][C]0.0385[/C][C]-0.0494[/C][C]0.0201[/C][C]820671221.5843[/C][C]236720821.4938[/C][C]15385.7344[/C][/ROW]
[ROW][C]77[/C][C]0.0455[/C][C]-0.0519[/C][C]0.0254[/C][C]862798017.5643[/C][C]341067020.8388[/C][C]18467.9999[/C][/ROW]
[ROW][C]78[/C][C]0.0505[/C][C]-0.056[/C][C]0.0298[/C][C]1043146787.2515[/C][C]441364130.3264[/C][C]21008.668[/C][/ROW]
[ROW][C]79[/C][C]0.0516[/C][C]-0.0434[/C][C]0.0315[/C][C]744619573.3198[/C][C]479271060.7005[/C][C]21892.2603[/C][/ROW]
[ROW][C]80[/C][C]0.0559[/C][C]-0.0522[/C][C]0.0338[/C][C]1109602691.3585[/C][C]549307908.5514[/C][C]23437.3187[/C][/ROW]
[ROW][C]81[/C][C]0.0625[/C][C]-0.0577[/C][C]0.0362[/C][C]1288538428.462[/C][C]623230960.5425[/C][C]24964.5941[/C][/ROW]
[ROW][C]82[/C][C]0.0691[/C][C]-0.0715[/C][C]0.0394[/C][C]1882420427.2251[/C][C]737702730.2409[/C][C]27160.6835[/C][/ROW]
[ROW][C]83[/C][C]0.075[/C][C]-0.0858[/C][C]0.0432[/C][C]2650835035.6172[/C][C]897130422.3556[/C][C]29952.1355[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116194&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116194&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
720.01320.0101032929145.34100
730.028e-040.0054201118.786916565132.06394070.0285
740.0263-0.01090.007239929619.540624353294.55624934.9057
750.0325-0.02930.0128289873002.21690733221.47119525.3988
760.0385-0.04940.0201820671221.5843236720821.493815385.7344
770.0455-0.05190.0254862798017.5643341067020.838818467.9999
780.0505-0.0560.02981043146787.2515441364130.326421008.668
790.0516-0.04340.0315744619573.3198479271060.700521892.2603
800.0559-0.05220.03381109602691.3585549307908.551423437.3187
810.0625-0.05770.03621288538428.462623230960.542524964.5941
820.0691-0.07150.03941882420427.2251737702730.240927160.6835
830.075-0.08580.04322650835035.6172897130422.355629952.1355



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')