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 computationSun, 12 Dec 2010 14:16:56 +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/12/t1292163360jh01wqpim3s5tit.htm/, Retrieved Tue, 07 May 2024 15:31:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=108462, Retrieved Tue, 07 May 2024 15:31:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact162
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Backward Selection] [Births] [2010-11-29 17:47:06] [b98453cac15ba1066b407e146608df68]
- RMPD              [ARIMA Forecasting] [arima forecast paper] [2010-12-12 14:16:56] [5842cf9dd57f9603e676e11284d3404a] [Current]
- RMP                 [Exponential Smoothing] [additive hw] [2010-12-15 18:29:19] [7d64bf19f34ddcdf2626356c9d5bd60d]
-   PD                  [Exponential Smoothing] [Exp sm Multi] [2010-12-15 19:00:17] [7d64bf19f34ddcdf2626356c9d5bd60d]
-   PD                  [Exponential Smoothing] [additive methode] [2010-12-15 19:06:40] [7d64bf19f34ddcdf2626356c9d5bd60d]
-   P                 [ARIMA Forecasting] [] [2010-12-22 12:18:09] [7d64bf19f34ddcdf2626356c9d5bd60d]
- RMPD                  [] [] [-0001-11-30 00:00:00] [7d64bf19f34ddcdf2626356c9d5bd60d]
Feedback Forum

Post a new message
Dataseries X:
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'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=108462&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=108462&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108462&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[48])
36502-------
37516-------
38528-------
39533-------
40536-------
41537-------
42524-------
43536-------
44587-------
45597-------
46581-------
47564-------
48558-------
49575571.7333553.7011589.76550.36130.932210.9322
50580583.6977556.4428610.95260.39520.734210.9677
51575588.693554.4335622.95240.21670.69050.99930.9605
52563591.6923551.6128631.77190.08030.79280.99680.9503
53552592.6922547.534637.85050.03870.90130.99220.9339
54537579.6922529.9711629.41340.04620.86250.98590.8038
55545591.6922537.793645.59140.04480.97660.97860.8897
56601642.6922584.9163700.46810.07860.99950.97060.998
57604652.6922591.2839714.10060.06010.95050.96230.9987
58586636.6922571.8546701.52990.06270.83850.95390.9913
59564619.6922551.5978687.78670.05450.83390.94550.9621
60549613.6922542.4898684.89470.03750.91430.93740.9374

\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[48]) \tabularnewline
36 & 502 & - & - & - & - & - & - & - \tabularnewline
37 & 516 & - & - & - & - & - & - & - \tabularnewline
38 & 528 & - & - & - & - & - & - & - \tabularnewline
39 & 533 & - & - & - & - & - & - & - \tabularnewline
40 & 536 & - & - & - & - & - & - & - \tabularnewline
41 & 537 & - & - & - & - & - & - & - \tabularnewline
42 & 524 & - & - & - & - & - & - & - \tabularnewline
43 & 536 & - & - & - & - & - & - & - \tabularnewline
44 & 587 & - & - & - & - & - & - & - \tabularnewline
45 & 597 & - & - & - & - & - & - & - \tabularnewline
46 & 581 & - & - & - & - & - & - & - \tabularnewline
47 & 564 & - & - & - & - & - & - & - \tabularnewline
48 & 558 & - & - & - & - & - & - & - \tabularnewline
49 & 575 & 571.7333 & 553.7011 & 589.7655 & 0.3613 & 0.9322 & 1 & 0.9322 \tabularnewline
50 & 580 & 583.6977 & 556.4428 & 610.9526 & 0.3952 & 0.7342 & 1 & 0.9677 \tabularnewline
51 & 575 & 588.693 & 554.4335 & 622.9524 & 0.2167 & 0.6905 & 0.9993 & 0.9605 \tabularnewline
52 & 563 & 591.6923 & 551.6128 & 631.7719 & 0.0803 & 0.7928 & 0.9968 & 0.9503 \tabularnewline
53 & 552 & 592.6922 & 547.534 & 637.8505 & 0.0387 & 0.9013 & 0.9922 & 0.9339 \tabularnewline
54 & 537 & 579.6922 & 529.9711 & 629.4134 & 0.0462 & 0.8625 & 0.9859 & 0.8038 \tabularnewline
55 & 545 & 591.6922 & 537.793 & 645.5914 & 0.0448 & 0.9766 & 0.9786 & 0.8897 \tabularnewline
56 & 601 & 642.6922 & 584.9163 & 700.4681 & 0.0786 & 0.9995 & 0.9706 & 0.998 \tabularnewline
57 & 604 & 652.6922 & 591.2839 & 714.1006 & 0.0601 & 0.9505 & 0.9623 & 0.9987 \tabularnewline
58 & 586 & 636.6922 & 571.8546 & 701.5299 & 0.0627 & 0.8385 & 0.9539 & 0.9913 \tabularnewline
59 & 564 & 619.6922 & 551.5978 & 687.7867 & 0.0545 & 0.8339 & 0.9455 & 0.9621 \tabularnewline
60 & 549 & 613.6922 & 542.4898 & 684.8947 & 0.0375 & 0.9143 & 0.9374 & 0.9374 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108462&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[48])[/C][/ROW]
[ROW][C]36[/C][C]502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]516[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]528[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]533[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]524[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]587[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]597[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]581[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]564[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]558[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]575[/C][C]571.7333[/C][C]553.7011[/C][C]589.7655[/C][C]0.3613[/C][C]0.9322[/C][C]1[/C][C]0.9322[/C][/ROW]
[ROW][C]50[/C][C]580[/C][C]583.6977[/C][C]556.4428[/C][C]610.9526[/C][C]0.3952[/C][C]0.7342[/C][C]1[/C][C]0.9677[/C][/ROW]
[ROW][C]51[/C][C]575[/C][C]588.693[/C][C]554.4335[/C][C]622.9524[/C][C]0.2167[/C][C]0.6905[/C][C]0.9993[/C][C]0.9605[/C][/ROW]
[ROW][C]52[/C][C]563[/C][C]591.6923[/C][C]551.6128[/C][C]631.7719[/C][C]0.0803[/C][C]0.7928[/C][C]0.9968[/C][C]0.9503[/C][/ROW]
[ROW][C]53[/C][C]552[/C][C]592.6922[/C][C]547.534[/C][C]637.8505[/C][C]0.0387[/C][C]0.9013[/C][C]0.9922[/C][C]0.9339[/C][/ROW]
[ROW][C]54[/C][C]537[/C][C]579.6922[/C][C]529.9711[/C][C]629.4134[/C][C]0.0462[/C][C]0.8625[/C][C]0.9859[/C][C]0.8038[/C][/ROW]
[ROW][C]55[/C][C]545[/C][C]591.6922[/C][C]537.793[/C][C]645.5914[/C][C]0.0448[/C][C]0.9766[/C][C]0.9786[/C][C]0.8897[/C][/ROW]
[ROW][C]56[/C][C]601[/C][C]642.6922[/C][C]584.9163[/C][C]700.4681[/C][C]0.0786[/C][C]0.9995[/C][C]0.9706[/C][C]0.998[/C][/ROW]
[ROW][C]57[/C][C]604[/C][C]652.6922[/C][C]591.2839[/C][C]714.1006[/C][C]0.0601[/C][C]0.9505[/C][C]0.9623[/C][C]0.9987[/C][/ROW]
[ROW][C]58[/C][C]586[/C][C]636.6922[/C][C]571.8546[/C][C]701.5299[/C][C]0.0627[/C][C]0.8385[/C][C]0.9539[/C][C]0.9913[/C][/ROW]
[ROW][C]59[/C][C]564[/C][C]619.6922[/C][C]551.5978[/C][C]687.7867[/C][C]0.0545[/C][C]0.8339[/C][C]0.9455[/C][C]0.9621[/C][/ROW]
[ROW][C]60[/C][C]549[/C][C]613.6922[/C][C]542.4898[/C][C]684.8947[/C][C]0.0375[/C][C]0.9143[/C][C]0.9374[/C][C]0.9374[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108462&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108462&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[48])
36502-------
37516-------
38528-------
39533-------
40536-------
41537-------
42524-------
43536-------
44587-------
45597-------
46581-------
47564-------
48558-------
49575571.7333553.7011589.76550.36130.932210.9322
50580583.6977556.4428610.95260.39520.734210.9677
51575588.693554.4335622.95240.21670.69050.99930.9605
52563591.6923551.6128631.77190.08030.79280.99680.9503
53552592.6922547.534637.85050.03870.90130.99220.9339
54537579.6922529.9711629.41340.04620.86250.98590.8038
55545591.6922537.793645.59140.04480.97660.97860.8897
56601642.6922584.9163700.46810.07860.99950.97060.998
57604652.6922591.2839714.10060.06010.95050.96230.9987
58586636.6922571.8546701.52990.06270.83850.95390.9913
59564619.6922551.5978687.78670.05450.83390.94550.9621
60549613.6922542.4898684.89470.03750.91430.93740.9374







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01610.0057010.671500
500.0238-0.00630.00613.673112.17233.4889
510.0297-0.02330.0118187.497370.6148.4032
520.0346-0.04850.021823.25258.77316.0864
530.0389-0.06870.03051655.8592538.190223.1989
540.0438-0.07360.03771822.6272752.263127.4274
550.0465-0.07890.04362180.165956.24930.9233
560.0459-0.06490.04621738.24261053.998232.4653
570.048-0.07460.04942370.93391200.324434.6457
580.052-0.07960.05242569.70291337.262336.5686
590.0561-0.08990.05583101.62521497.658938.6996
600.0592-0.10540.05994185.08551721.611141.4923

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0161 & 0.0057 & 0 & 10.6715 & 0 & 0 \tabularnewline
50 & 0.0238 & -0.0063 & 0.006 & 13.6731 & 12.1723 & 3.4889 \tabularnewline
51 & 0.0297 & -0.0233 & 0.0118 & 187.4973 & 70.614 & 8.4032 \tabularnewline
52 & 0.0346 & -0.0485 & 0.021 & 823.25 & 258.773 & 16.0864 \tabularnewline
53 & 0.0389 & -0.0687 & 0.0305 & 1655.8592 & 538.1902 & 23.1989 \tabularnewline
54 & 0.0438 & -0.0736 & 0.0377 & 1822.6272 & 752.2631 & 27.4274 \tabularnewline
55 & 0.0465 & -0.0789 & 0.0436 & 2180.165 & 956.249 & 30.9233 \tabularnewline
56 & 0.0459 & -0.0649 & 0.0462 & 1738.2426 & 1053.9982 & 32.4653 \tabularnewline
57 & 0.048 & -0.0746 & 0.0494 & 2370.9339 & 1200.3244 & 34.6457 \tabularnewline
58 & 0.052 & -0.0796 & 0.0524 & 2569.7029 & 1337.2623 & 36.5686 \tabularnewline
59 & 0.0561 & -0.0899 & 0.0558 & 3101.6252 & 1497.6589 & 38.6996 \tabularnewline
60 & 0.0592 & -0.1054 & 0.0599 & 4185.0855 & 1721.6111 & 41.4923 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=108462&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]49[/C][C]0.0161[/C][C]0.0057[/C][C]0[/C][C]10.6715[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0238[/C][C]-0.0063[/C][C]0.006[/C][C]13.6731[/C][C]12.1723[/C][C]3.4889[/C][/ROW]
[ROW][C]51[/C][C]0.0297[/C][C]-0.0233[/C][C]0.0118[/C][C]187.4973[/C][C]70.614[/C][C]8.4032[/C][/ROW]
[ROW][C]52[/C][C]0.0346[/C][C]-0.0485[/C][C]0.021[/C][C]823.25[/C][C]258.773[/C][C]16.0864[/C][/ROW]
[ROW][C]53[/C][C]0.0389[/C][C]-0.0687[/C][C]0.0305[/C][C]1655.8592[/C][C]538.1902[/C][C]23.1989[/C][/ROW]
[ROW][C]54[/C][C]0.0438[/C][C]-0.0736[/C][C]0.0377[/C][C]1822.6272[/C][C]752.2631[/C][C]27.4274[/C][/ROW]
[ROW][C]55[/C][C]0.0465[/C][C]-0.0789[/C][C]0.0436[/C][C]2180.165[/C][C]956.249[/C][C]30.9233[/C][/ROW]
[ROW][C]56[/C][C]0.0459[/C][C]-0.0649[/C][C]0.0462[/C][C]1738.2426[/C][C]1053.9982[/C][C]32.4653[/C][/ROW]
[ROW][C]57[/C][C]0.048[/C][C]-0.0746[/C][C]0.0494[/C][C]2370.9339[/C][C]1200.3244[/C][C]34.6457[/C][/ROW]
[ROW][C]58[/C][C]0.052[/C][C]-0.0796[/C][C]0.0524[/C][C]2569.7029[/C][C]1337.2623[/C][C]36.5686[/C][/ROW]
[ROW][C]59[/C][C]0.0561[/C][C]-0.0899[/C][C]0.0558[/C][C]3101.6252[/C][C]1497.6589[/C][C]38.6996[/C][/ROW]
[ROW][C]60[/C][C]0.0592[/C][C]-0.1054[/C][C]0.0599[/C][C]4185.0855[/C][C]1721.6111[/C][C]41.4923[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=108462&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=108462&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
490.01610.0057010.671500
500.0238-0.00630.00613.673112.17233.4889
510.0297-0.02330.0118187.497370.6148.4032
520.0346-0.04850.021823.25258.77316.0864
530.0389-0.06870.03051655.8592538.190223.1989
540.0438-0.07360.03771822.6272752.263127.4274
550.0465-0.07890.04362180.165956.24930.9233
560.0459-0.06490.04621738.24261053.998232.4653
570.048-0.07460.04942370.93391200.324434.6457
580.052-0.07960.05242569.70291337.262336.5686
590.0561-0.08990.05583101.62521497.658938.6996
600.0592-0.10540.05994185.08551721.611141.4923



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