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 computationThu, 17 Dec 2009 03:19:20 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/17/t12610451981o0b273qm7tyn93.htm/, Retrieved Tue, 30 Apr 2024 06:48:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68695, Retrieved Tue, 30 Apr 2024 06:48:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsforecast2paper
Estimated Impact152
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  M D    [ARIMA Forecasting] [] [2009-12-14 19:07:20] [cf890101a20378422561610e0d41fd9c]
-   P         [ARIMA Forecasting] [] [2009-12-17 10:19:20] [42ed2e0ab6f351a3dce7cf3f388e378d] [Current]
- R PD          [ARIMA Forecasting] [] [2010-12-21 14:02:55] [4f85667043e8913570b3eb8f368f82b2]
- R PD          [ARIMA Forecasting] [] [2010-12-21 14:02:55] [4f85667043e8913570b3eb8f368f82b2]
- R  D          [ARIMA Forecasting] [] [2010-12-22 10:55:23] [4f85667043e8913570b3eb8f368f82b2]
Feedback Forum

Post a new message
Dataseries X:
627
696
825
677
656
785
412
352
839
729
696
641
695
638
762
635
721
854
418
367
824
687
601
676
740
691
683
594
729
731
386
331
707
715
657
653
642
643
718
654
632
731
392
344
792
852
649
629
685
617
715
715
629
916
531
357
917
828
708
858
775
785
1006
789
734
906
532
387
991
841




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68695&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]3 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=68695&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68695&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 time3 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[58])
46852-------
47649-------
48629-------
49685-------
50617-------
51715-------
52715-------
53629-------
54916-------
55531-------
56357-------
57917-------
58828-------
59708608.584529.3519707.03350.023900.21050
60858662.6741571.1772778.05565e-040.22070.71630.0025
61775733.526627.5153868.85830.2740.03570.75890.0856
62785651.7116561.2061766.0160.01110.01730.72410.0013
631006697.3644597.5494824.449700.08830.39280.022
64789650.4903560.2276764.46380.008600.13360.0011
65734685.4477588.0503809.20960.2210.05050.81430.012
66906837.7238707.62991007.29150.2150.88470.18280.5447
67532464.906409.4343532.46480.025800.02760
68387343.6607307.9487385.96530.022300.26830
69991805.1568682.2849964.47560.011110.08440.3893
70841752.3982640.9669895.63030.11275e-040.15040.1504

\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[58]) \tabularnewline
46 & 852 & - & - & - & - & - & - & - \tabularnewline
47 & 649 & - & - & - & - & - & - & - \tabularnewline
48 & 629 & - & - & - & - & - & - & - \tabularnewline
49 & 685 & - & - & - & - & - & - & - \tabularnewline
50 & 617 & - & - & - & - & - & - & - \tabularnewline
51 & 715 & - & - & - & - & - & - & - \tabularnewline
52 & 715 & - & - & - & - & - & - & - \tabularnewline
53 & 629 & - & - & - & - & - & - & - \tabularnewline
54 & 916 & - & - & - & - & - & - & - \tabularnewline
55 & 531 & - & - & - & - & - & - & - \tabularnewline
56 & 357 & - & - & - & - & - & - & - \tabularnewline
57 & 917 & - & - & - & - & - & - & - \tabularnewline
58 & 828 & - & - & - & - & - & - & - \tabularnewline
59 & 708 & 608.584 & 529.3519 & 707.0335 & 0.0239 & 0 & 0.2105 & 0 \tabularnewline
60 & 858 & 662.6741 & 571.1772 & 778.0556 & 5e-04 & 0.2207 & 0.7163 & 0.0025 \tabularnewline
61 & 775 & 733.526 & 627.5153 & 868.8583 & 0.274 & 0.0357 & 0.7589 & 0.0856 \tabularnewline
62 & 785 & 651.7116 & 561.2061 & 766.016 & 0.0111 & 0.0173 & 0.7241 & 0.0013 \tabularnewline
63 & 1006 & 697.3644 & 597.5494 & 824.4497 & 0 & 0.0883 & 0.3928 & 0.022 \tabularnewline
64 & 789 & 650.4903 & 560.2276 & 764.4638 & 0.0086 & 0 & 0.1336 & 0.0011 \tabularnewline
65 & 734 & 685.4477 & 588.0503 & 809.2096 & 0.221 & 0.0505 & 0.8143 & 0.012 \tabularnewline
66 & 906 & 837.7238 & 707.6299 & 1007.2915 & 0.215 & 0.8847 & 0.1828 & 0.5447 \tabularnewline
67 & 532 & 464.906 & 409.4343 & 532.4648 & 0.0258 & 0 & 0.0276 & 0 \tabularnewline
68 & 387 & 343.6607 & 307.9487 & 385.9653 & 0.0223 & 0 & 0.2683 & 0 \tabularnewline
69 & 991 & 805.1568 & 682.2849 & 964.4756 & 0.0111 & 1 & 0.0844 & 0.3893 \tabularnewline
70 & 841 & 752.3982 & 640.9669 & 895.6303 & 0.1127 & 5e-04 & 0.1504 & 0.1504 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68695&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[58])[/C][/ROW]
[ROW][C]46[/C][C]852[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]649[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]685[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]617[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]715[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]715[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]531[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]917[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]828[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]708[/C][C]608.584[/C][C]529.3519[/C][C]707.0335[/C][C]0.0239[/C][C]0[/C][C]0.2105[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]858[/C][C]662.6741[/C][C]571.1772[/C][C]778.0556[/C][C]5e-04[/C][C]0.2207[/C][C]0.7163[/C][C]0.0025[/C][/ROW]
[ROW][C]61[/C][C]775[/C][C]733.526[/C][C]627.5153[/C][C]868.8583[/C][C]0.274[/C][C]0.0357[/C][C]0.7589[/C][C]0.0856[/C][/ROW]
[ROW][C]62[/C][C]785[/C][C]651.7116[/C][C]561.2061[/C][C]766.016[/C][C]0.0111[/C][C]0.0173[/C][C]0.7241[/C][C]0.0013[/C][/ROW]
[ROW][C]63[/C][C]1006[/C][C]697.3644[/C][C]597.5494[/C][C]824.4497[/C][C]0[/C][C]0.0883[/C][C]0.3928[/C][C]0.022[/C][/ROW]
[ROW][C]64[/C][C]789[/C][C]650.4903[/C][C]560.2276[/C][C]764.4638[/C][C]0.0086[/C][C]0[/C][C]0.1336[/C][C]0.0011[/C][/ROW]
[ROW][C]65[/C][C]734[/C][C]685.4477[/C][C]588.0503[/C][C]809.2096[/C][C]0.221[/C][C]0.0505[/C][C]0.8143[/C][C]0.012[/C][/ROW]
[ROW][C]66[/C][C]906[/C][C]837.7238[/C][C]707.6299[/C][C]1007.2915[/C][C]0.215[/C][C]0.8847[/C][C]0.1828[/C][C]0.5447[/C][/ROW]
[ROW][C]67[/C][C]532[/C][C]464.906[/C][C]409.4343[/C][C]532.4648[/C][C]0.0258[/C][C]0[/C][C]0.0276[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]387[/C][C]343.6607[/C][C]307.9487[/C][C]385.9653[/C][C]0.0223[/C][C]0[/C][C]0.2683[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]991[/C][C]805.1568[/C][C]682.2849[/C][C]964.4756[/C][C]0.0111[/C][C]1[/C][C]0.0844[/C][C]0.3893[/C][/ROW]
[ROW][C]70[/C][C]841[/C][C]752.3982[/C][C]640.9669[/C][C]895.6303[/C][C]0.1127[/C][C]5e-04[/C][C]0.1504[/C][C]0.1504[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68695&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68695&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[58])
46852-------
47649-------
48629-------
49685-------
50617-------
51715-------
52715-------
53629-------
54916-------
55531-------
56357-------
57917-------
58828-------
59708608.584529.3519707.03350.023900.21050
60858662.6741571.1772778.05565e-040.22070.71630.0025
61775733.526627.5153868.85830.2740.03570.75890.0856
62785651.7116561.2061766.0160.01110.01730.72410.0013
631006697.3644597.5494824.449700.08830.39280.022
64789650.4903560.2276764.46380.008600.13360.0011
65734685.4477588.0503809.20960.2210.05050.81430.012
66906837.7238707.62991007.29150.2150.88470.18280.5447
67532464.906409.4343532.46480.025800.02760
68387343.6607307.9487385.96530.022300.26830
69991805.1568682.2849964.47560.011110.08440.3893
70841752.3982640.9669895.63030.11275e-040.15040.1504







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.08250.16340.01369883.5462823.628928.6989
600.08880.29480.024638152.19663179.349756.3857
610.09410.05650.00471720.0947143.341211.9725
620.08950.20450.01717765.79521480.482938.477
630.0930.44260.036995255.91787937.993189.0954
640.08940.21290.017719184.92321598.743639.9843
650.09210.07080.00592357.33196.444214.0159
660.10330.08150.00684661.6425388.470219.7096
670.07410.14430.0124501.6091375.134119.3684
680.06280.12610.01051878.2924156.524412.511
690.1010.23080.019234537.67862878.139953.6483
700.09710.11780.00987850.275654.189625.5771

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.0825 & 0.1634 & 0.0136 & 9883.5462 & 823.6289 & 28.6989 \tabularnewline
60 & 0.0888 & 0.2948 & 0.0246 & 38152.1966 & 3179.3497 & 56.3857 \tabularnewline
61 & 0.0941 & 0.0565 & 0.0047 & 1720.0947 & 143.3412 & 11.9725 \tabularnewline
62 & 0.0895 & 0.2045 & 0.017 & 17765.7952 & 1480.4829 & 38.477 \tabularnewline
63 & 0.093 & 0.4426 & 0.0369 & 95255.9178 & 7937.9931 & 89.0954 \tabularnewline
64 & 0.0894 & 0.2129 & 0.0177 & 19184.9232 & 1598.7436 & 39.9843 \tabularnewline
65 & 0.0921 & 0.0708 & 0.0059 & 2357.33 & 196.4442 & 14.0159 \tabularnewline
66 & 0.1033 & 0.0815 & 0.0068 & 4661.6425 & 388.4702 & 19.7096 \tabularnewline
67 & 0.0741 & 0.1443 & 0.012 & 4501.6091 & 375.1341 & 19.3684 \tabularnewline
68 & 0.0628 & 0.1261 & 0.0105 & 1878.2924 & 156.5244 & 12.511 \tabularnewline
69 & 0.101 & 0.2308 & 0.0192 & 34537.6786 & 2878.1399 & 53.6483 \tabularnewline
70 & 0.0971 & 0.1178 & 0.0098 & 7850.275 & 654.1896 & 25.5771 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68695&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]59[/C][C]0.0825[/C][C]0.1634[/C][C]0.0136[/C][C]9883.5462[/C][C]823.6289[/C][C]28.6989[/C][/ROW]
[ROW][C]60[/C][C]0.0888[/C][C]0.2948[/C][C]0.0246[/C][C]38152.1966[/C][C]3179.3497[/C][C]56.3857[/C][/ROW]
[ROW][C]61[/C][C]0.0941[/C][C]0.0565[/C][C]0.0047[/C][C]1720.0947[/C][C]143.3412[/C][C]11.9725[/C][/ROW]
[ROW][C]62[/C][C]0.0895[/C][C]0.2045[/C][C]0.017[/C][C]17765.7952[/C][C]1480.4829[/C][C]38.477[/C][/ROW]
[ROW][C]63[/C][C]0.093[/C][C]0.4426[/C][C]0.0369[/C][C]95255.9178[/C][C]7937.9931[/C][C]89.0954[/C][/ROW]
[ROW][C]64[/C][C]0.0894[/C][C]0.2129[/C][C]0.0177[/C][C]19184.9232[/C][C]1598.7436[/C][C]39.9843[/C][/ROW]
[ROW][C]65[/C][C]0.0921[/C][C]0.0708[/C][C]0.0059[/C][C]2357.33[/C][C]196.4442[/C][C]14.0159[/C][/ROW]
[ROW][C]66[/C][C]0.1033[/C][C]0.0815[/C][C]0.0068[/C][C]4661.6425[/C][C]388.4702[/C][C]19.7096[/C][/ROW]
[ROW][C]67[/C][C]0.0741[/C][C]0.1443[/C][C]0.012[/C][C]4501.6091[/C][C]375.1341[/C][C]19.3684[/C][/ROW]
[ROW][C]68[/C][C]0.0628[/C][C]0.1261[/C][C]0.0105[/C][C]1878.2924[/C][C]156.5244[/C][C]12.511[/C][/ROW]
[ROW][C]69[/C][C]0.101[/C][C]0.2308[/C][C]0.0192[/C][C]34537.6786[/C][C]2878.1399[/C][C]53.6483[/C][/ROW]
[ROW][C]70[/C][C]0.0971[/C][C]0.1178[/C][C]0.0098[/C][C]7850.275[/C][C]654.1896[/C][C]25.5771[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68695&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68695&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
590.08250.16340.01369883.5462823.628928.6989
600.08880.29480.024638152.19663179.349756.3857
610.09410.05650.00471720.0947143.341211.9725
620.08950.20450.01717765.79521480.482938.477
630.0930.44260.036995255.91787937.993189.0954
640.08940.21290.017719184.92321598.743639.9843
650.09210.07080.00592357.33196.444214.0159
660.10330.08150.00684661.6425388.470219.7096
670.07410.14430.0124501.6091375.134119.3684
680.06280.12610.01051878.2924156.524412.511
690.1010.23080.019234537.67862878.139953.6483
700.09710.11780.00987850.275654.189625.5771



Parameters (Session):
par1 = 12 ; par2 = -0.5 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = -0.5 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')