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, 22 Dec 2010 12:18:09 +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/22/t1293020165gdtpf91vlc3ifg6.htm/, Retrieved Mon, 06 May 2024 07:27:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114176, Retrieved Mon, 06 May 2024 07:27:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact103
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] [7d64bf19f34ddcdf2626356c9d5bd60d]
-   P                 [ARIMA Forecasting] [] [2010-12-22 12:18:09] [5842cf9dd57f9603e676e11284d3404a] [Current]
- 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'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=114176&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=114176&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114176&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[48])
36502-------
37516-------
38528-------
39533-------
40536-------
41537-------
42524-------
43536-------
44587-------
45597-------
46581-------
47564-------
48558-------
49575571.1217554.6222587.62120.32250.940510.9405
50580581.0686557.4949604.64230.46460.693110.9724
51575585.1995554.5373615.86170.25720.63020.99960.959
52563587.5392547.7671627.31130.11330.73170.99450.9273
53552587.682540.1509635.21310.07060.84560.98170.8895
54537574.2584519.1228629.39390.09270.78560.9630.7184
55545585.8816523.0921648.67110.1010.93650.94030.8079
56601636.5115566.6435706.37960.15960.99490.91760.9862
57604646.2968569.5907723.00290.13990.87650.89610.988
58586630.1023546.7972713.40740.14970.73040.8760.9551
59564612.9365523.3752702.49790.14210.72220.85790.8854
60549606.8276511.2482702.40690.11780.81010.84170.8417

\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.1217 & 554.6222 & 587.6212 & 0.3225 & 0.9405 & 1 & 0.9405 \tabularnewline
50 & 580 & 581.0686 & 557.4949 & 604.6423 & 0.4646 & 0.6931 & 1 & 0.9724 \tabularnewline
51 & 575 & 585.1995 & 554.5373 & 615.8617 & 0.2572 & 0.6302 & 0.9996 & 0.959 \tabularnewline
52 & 563 & 587.5392 & 547.7671 & 627.3113 & 0.1133 & 0.7317 & 0.9945 & 0.9273 \tabularnewline
53 & 552 & 587.682 & 540.1509 & 635.2131 & 0.0706 & 0.8456 & 0.9817 & 0.8895 \tabularnewline
54 & 537 & 574.2584 & 519.1228 & 629.3939 & 0.0927 & 0.7856 & 0.963 & 0.7184 \tabularnewline
55 & 545 & 585.8816 & 523.0921 & 648.6711 & 0.101 & 0.9365 & 0.9403 & 0.8079 \tabularnewline
56 & 601 & 636.5115 & 566.6435 & 706.3796 & 0.1596 & 0.9949 & 0.9176 & 0.9862 \tabularnewline
57 & 604 & 646.2968 & 569.5907 & 723.0029 & 0.1399 & 0.8765 & 0.8961 & 0.988 \tabularnewline
58 & 586 & 630.1023 & 546.7972 & 713.4074 & 0.1497 & 0.7304 & 0.876 & 0.9551 \tabularnewline
59 & 564 & 612.9365 & 523.3752 & 702.4979 & 0.1421 & 0.7222 & 0.8579 & 0.8854 \tabularnewline
60 & 549 & 606.8276 & 511.2482 & 702.4069 & 0.1178 & 0.8101 & 0.8417 & 0.8417 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114176&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.1217[/C][C]554.6222[/C][C]587.6212[/C][C]0.3225[/C][C]0.9405[/C][C]1[/C][C]0.9405[/C][/ROW]
[ROW][C]50[/C][C]580[/C][C]581.0686[/C][C]557.4949[/C][C]604.6423[/C][C]0.4646[/C][C]0.6931[/C][C]1[/C][C]0.9724[/C][/ROW]
[ROW][C]51[/C][C]575[/C][C]585.1995[/C][C]554.5373[/C][C]615.8617[/C][C]0.2572[/C][C]0.6302[/C][C]0.9996[/C][C]0.959[/C][/ROW]
[ROW][C]52[/C][C]563[/C][C]587.5392[/C][C]547.7671[/C][C]627.3113[/C][C]0.1133[/C][C]0.7317[/C][C]0.9945[/C][C]0.9273[/C][/ROW]
[ROW][C]53[/C][C]552[/C][C]587.682[/C][C]540.1509[/C][C]635.2131[/C][C]0.0706[/C][C]0.8456[/C][C]0.9817[/C][C]0.8895[/C][/ROW]
[ROW][C]54[/C][C]537[/C][C]574.2584[/C][C]519.1228[/C][C]629.3939[/C][C]0.0927[/C][C]0.7856[/C][C]0.963[/C][C]0.7184[/C][/ROW]
[ROW][C]55[/C][C]545[/C][C]585.8816[/C][C]523.0921[/C][C]648.6711[/C][C]0.101[/C][C]0.9365[/C][C]0.9403[/C][C]0.8079[/C][/ROW]
[ROW][C]56[/C][C]601[/C][C]636.5115[/C][C]566.6435[/C][C]706.3796[/C][C]0.1596[/C][C]0.9949[/C][C]0.9176[/C][C]0.9862[/C][/ROW]
[ROW][C]57[/C][C]604[/C][C]646.2968[/C][C]569.5907[/C][C]723.0029[/C][C]0.1399[/C][C]0.8765[/C][C]0.8961[/C][C]0.988[/C][/ROW]
[ROW][C]58[/C][C]586[/C][C]630.1023[/C][C]546.7972[/C][C]713.4074[/C][C]0.1497[/C][C]0.7304[/C][C]0.876[/C][C]0.9551[/C][/ROW]
[ROW][C]59[/C][C]564[/C][C]612.9365[/C][C]523.3752[/C][C]702.4979[/C][C]0.1421[/C][C]0.7222[/C][C]0.8579[/C][C]0.8854[/C][/ROW]
[ROW][C]60[/C][C]549[/C][C]606.8276[/C][C]511.2482[/C][C]702.4069[/C][C]0.1178[/C][C]0.8101[/C][C]0.8417[/C][C]0.8417[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114176&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114176&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.1217554.6222587.62120.32250.940510.9405
50580581.0686557.4949604.64230.46460.693110.9724
51575585.1995554.5373615.86170.25720.63020.99960.959
52563587.5392547.7671627.31130.11330.73170.99450.9273
53552587.682540.1509635.21310.07060.84560.98170.8895
54537574.2584519.1228629.39390.09270.78560.9630.7184
55545585.8816523.0921648.67110.1010.93650.94030.8079
56601636.5115566.6435706.37960.15960.99490.91760.9862
57604646.2968569.5907723.00290.13990.87650.89610.988
58586630.1023546.7972713.40740.14970.73040.8760.9551
59564612.9365523.3752702.49790.14210.72220.85790.8854
60549606.8276511.2482702.40690.11780.81010.84170.8417







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01470.0068015.041600
500.0207-0.00180.00431.14198.09182.8446
510.0267-0.01740.0087104.029140.07096.3302
520.0345-0.04180.017602.1711180.595913.4386
530.0413-0.06070.02571273.2068399.118119.9779
540.049-0.06490.03221388.1861563.962823.7479
550.0547-0.06980.03761671.3077722.154926.8729
560.056-0.05580.03991261.068789.51928.0984
570.0606-0.06540.04271789.0191900.574630.0096
580.0675-0.070.04541945.01451005.018631.702
590.0746-0.07980.04862394.78411131.360933.6357
600.0804-0.09530.05253344.02641315.749736.2733

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0147 & 0.0068 & 0 & 15.0416 & 0 & 0 \tabularnewline
50 & 0.0207 & -0.0018 & 0.0043 & 1.1419 & 8.0918 & 2.8446 \tabularnewline
51 & 0.0267 & -0.0174 & 0.0087 & 104.0291 & 40.0709 & 6.3302 \tabularnewline
52 & 0.0345 & -0.0418 & 0.017 & 602.1711 & 180.5959 & 13.4386 \tabularnewline
53 & 0.0413 & -0.0607 & 0.0257 & 1273.2068 & 399.1181 & 19.9779 \tabularnewline
54 & 0.049 & -0.0649 & 0.0322 & 1388.1861 & 563.9628 & 23.7479 \tabularnewline
55 & 0.0547 & -0.0698 & 0.0376 & 1671.3077 & 722.1549 & 26.8729 \tabularnewline
56 & 0.056 & -0.0558 & 0.0399 & 1261.068 & 789.519 & 28.0984 \tabularnewline
57 & 0.0606 & -0.0654 & 0.0427 & 1789.0191 & 900.5746 & 30.0096 \tabularnewline
58 & 0.0675 & -0.07 & 0.0454 & 1945.0145 & 1005.0186 & 31.702 \tabularnewline
59 & 0.0746 & -0.0798 & 0.0486 & 2394.7841 & 1131.3609 & 33.6357 \tabularnewline
60 & 0.0804 & -0.0953 & 0.0525 & 3344.0264 & 1315.7497 & 36.2733 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114176&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.0147[/C][C]0.0068[/C][C]0[/C][C]15.0416[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0207[/C][C]-0.0018[/C][C]0.0043[/C][C]1.1419[/C][C]8.0918[/C][C]2.8446[/C][/ROW]
[ROW][C]51[/C][C]0.0267[/C][C]-0.0174[/C][C]0.0087[/C][C]104.0291[/C][C]40.0709[/C][C]6.3302[/C][/ROW]
[ROW][C]52[/C][C]0.0345[/C][C]-0.0418[/C][C]0.017[/C][C]602.1711[/C][C]180.5959[/C][C]13.4386[/C][/ROW]
[ROW][C]53[/C][C]0.0413[/C][C]-0.0607[/C][C]0.0257[/C][C]1273.2068[/C][C]399.1181[/C][C]19.9779[/C][/ROW]
[ROW][C]54[/C][C]0.049[/C][C]-0.0649[/C][C]0.0322[/C][C]1388.1861[/C][C]563.9628[/C][C]23.7479[/C][/ROW]
[ROW][C]55[/C][C]0.0547[/C][C]-0.0698[/C][C]0.0376[/C][C]1671.3077[/C][C]722.1549[/C][C]26.8729[/C][/ROW]
[ROW][C]56[/C][C]0.056[/C][C]-0.0558[/C][C]0.0399[/C][C]1261.068[/C][C]789.519[/C][C]28.0984[/C][/ROW]
[ROW][C]57[/C][C]0.0606[/C][C]-0.0654[/C][C]0.0427[/C][C]1789.0191[/C][C]900.5746[/C][C]30.0096[/C][/ROW]
[ROW][C]58[/C][C]0.0675[/C][C]-0.07[/C][C]0.0454[/C][C]1945.0145[/C][C]1005.0186[/C][C]31.702[/C][/ROW]
[ROW][C]59[/C][C]0.0746[/C][C]-0.0798[/C][C]0.0486[/C][C]2394.7841[/C][C]1131.3609[/C][C]33.6357[/C][/ROW]
[ROW][C]60[/C][C]0.0804[/C][C]-0.0953[/C][C]0.0525[/C][C]3344.0264[/C][C]1315.7497[/C][C]36.2733[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114176&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114176&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.01470.0068015.041600
500.0207-0.00180.00431.14198.09182.8446
510.0267-0.01740.0087104.029140.07096.3302
520.0345-0.04180.017602.1711180.595913.4386
530.0413-0.06070.02571273.2068399.118119.9779
540.049-0.06490.03221388.1861563.962823.7479
550.0547-0.06980.03761671.3077722.154926.8729
560.056-0.05580.03991261.068789.51928.0984
570.0606-0.06540.04271789.0191900.574630.0096
580.0675-0.070.04541945.01451005.018631.702
590.0746-0.07980.04862394.78411131.360933.6357
600.0804-0.09530.05253344.02641315.749736.2733



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