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, 14 Dec 2009 06:22:22 -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/14/t12607970002sq0m74fkhrvsg6.htm/, Retrieved Sun, 05 May 2024 12:03:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=67550, Retrieved Sun, 05 May 2024 12:03:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact145
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [ARIMA bel20] [2008-12-13 15:32:40] [74be16979710d4c4e7c6647856088456]
F RMP   [ARIMA Forecasting] [] [2008-12-13 15:36:11] [74be16979710d4c4e7c6647856088456]
-  MPD      [ARIMA Forecasting] [forecasting] [2009-12-14 13:22:22] [21abcd6b6f55e53f03dbc7aec5059429] [Current]
Feedback Forum

Post a new message
Dataseries X:
10,9
10
9,2
9,2
9,5
9,6
9,5
9,1
8,9
9
10,1
10,3
10,2
9,6
9,2
9,3
9,4
9,4
9,2
9
9
9
9,8
10
9,8
9,3
9
9
9,1
9,1
9,1
9,2
8,8
8,3
8,4
8,1
7,7
7,9
7,9
8
7,9
7,6
7,1
6,8
6,5
6,9
8,2
8,7
8,3
7,9
7,5
7,8
8,3
8,4
8,2
7,7
7,2
7,3
8,1
8,5




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=67550&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=67550&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67550&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])
368.1-------
377.7-------
387.9-------
397.9-------
408-------
417.9-------
427.6-------
437.1-------
446.8-------
456.5-------
466.9-------
478.2-------
488.7-------
498.38.65568.08769.22360.10990.43910.99950.4391
507.99.02767.654310.40090.05380.85050.94620.68
517.59.3697.017511.72040.05960.88960.88960.7114
527.810.04796.750113.34580.09080.9350.88820.7885
538.310.63856.42814.84910.13820.90680.89880.8166
548.410.96025.827716.09270.16410.84520.90030.806
558.210.95814.817817.09830.18930.79290.89090.7645
567.711.08943.831118.34770.180.78240.87660.7406
577.211.24682.775119.71840.17460.79410.86390.7221
587.312.16732.424921.90980.16370.84120.85540.7573
598.114.02672.976225.07720.14660.88360.84930.8276
608.515.07762.681627.47360.14920.8650.84340.8434

\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 & 8.1 & - & - & - & - & - & - & - \tabularnewline
37 & 7.7 & - & - & - & - & - & - & - \tabularnewline
38 & 7.9 & - & - & - & - & - & - & - \tabularnewline
39 & 7.9 & - & - & - & - & - & - & - \tabularnewline
40 & 8 & - & - & - & - & - & - & - \tabularnewline
41 & 7.9 & - & - & - & - & - & - & - \tabularnewline
42 & 7.6 & - & - & - & - & - & - & - \tabularnewline
43 & 7.1 & - & - & - & - & - & - & - \tabularnewline
44 & 6.8 & - & - & - & - & - & - & - \tabularnewline
45 & 6.5 & - & - & - & - & - & - & - \tabularnewline
46 & 6.9 & - & - & - & - & - & - & - \tabularnewline
47 & 8.2 & - & - & - & - & - & - & - \tabularnewline
48 & 8.7 & - & - & - & - & - & - & - \tabularnewline
49 & 8.3 & 8.6556 & 8.0876 & 9.2236 & 0.1099 & 0.4391 & 0.9995 & 0.4391 \tabularnewline
50 & 7.9 & 9.0276 & 7.6543 & 10.4009 & 0.0538 & 0.8505 & 0.9462 & 0.68 \tabularnewline
51 & 7.5 & 9.369 & 7.0175 & 11.7204 & 0.0596 & 0.8896 & 0.8896 & 0.7114 \tabularnewline
52 & 7.8 & 10.0479 & 6.7501 & 13.3458 & 0.0908 & 0.935 & 0.8882 & 0.7885 \tabularnewline
53 & 8.3 & 10.6385 & 6.428 & 14.8491 & 0.1382 & 0.9068 & 0.8988 & 0.8166 \tabularnewline
54 & 8.4 & 10.9602 & 5.8277 & 16.0927 & 0.1641 & 0.8452 & 0.9003 & 0.806 \tabularnewline
55 & 8.2 & 10.9581 & 4.8178 & 17.0983 & 0.1893 & 0.7929 & 0.8909 & 0.7645 \tabularnewline
56 & 7.7 & 11.0894 & 3.8311 & 18.3477 & 0.18 & 0.7824 & 0.8766 & 0.7406 \tabularnewline
57 & 7.2 & 11.2468 & 2.7751 & 19.7184 & 0.1746 & 0.7941 & 0.8639 & 0.7221 \tabularnewline
58 & 7.3 & 12.1673 & 2.4249 & 21.9098 & 0.1637 & 0.8412 & 0.8554 & 0.7573 \tabularnewline
59 & 8.1 & 14.0267 & 2.9762 & 25.0772 & 0.1466 & 0.8836 & 0.8493 & 0.8276 \tabularnewline
60 & 8.5 & 15.0776 & 2.6816 & 27.4736 & 0.1492 & 0.865 & 0.8434 & 0.8434 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67550&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]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]7.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]7.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]7.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]8.3[/C][C]8.6556[/C][C]8.0876[/C][C]9.2236[/C][C]0.1099[/C][C]0.4391[/C][C]0.9995[/C][C]0.4391[/C][/ROW]
[ROW][C]50[/C][C]7.9[/C][C]9.0276[/C][C]7.6543[/C][C]10.4009[/C][C]0.0538[/C][C]0.8505[/C][C]0.9462[/C][C]0.68[/C][/ROW]
[ROW][C]51[/C][C]7.5[/C][C]9.369[/C][C]7.0175[/C][C]11.7204[/C][C]0.0596[/C][C]0.8896[/C][C]0.8896[/C][C]0.7114[/C][/ROW]
[ROW][C]52[/C][C]7.8[/C][C]10.0479[/C][C]6.7501[/C][C]13.3458[/C][C]0.0908[/C][C]0.935[/C][C]0.8882[/C][C]0.7885[/C][/ROW]
[ROW][C]53[/C][C]8.3[/C][C]10.6385[/C][C]6.428[/C][C]14.8491[/C][C]0.1382[/C][C]0.9068[/C][C]0.8988[/C][C]0.8166[/C][/ROW]
[ROW][C]54[/C][C]8.4[/C][C]10.9602[/C][C]5.8277[/C][C]16.0927[/C][C]0.1641[/C][C]0.8452[/C][C]0.9003[/C][C]0.806[/C][/ROW]
[ROW][C]55[/C][C]8.2[/C][C]10.9581[/C][C]4.8178[/C][C]17.0983[/C][C]0.1893[/C][C]0.7929[/C][C]0.8909[/C][C]0.7645[/C][/ROW]
[ROW][C]56[/C][C]7.7[/C][C]11.0894[/C][C]3.8311[/C][C]18.3477[/C][C]0.18[/C][C]0.7824[/C][C]0.8766[/C][C]0.7406[/C][/ROW]
[ROW][C]57[/C][C]7.2[/C][C]11.2468[/C][C]2.7751[/C][C]19.7184[/C][C]0.1746[/C][C]0.7941[/C][C]0.8639[/C][C]0.7221[/C][/ROW]
[ROW][C]58[/C][C]7.3[/C][C]12.1673[/C][C]2.4249[/C][C]21.9098[/C][C]0.1637[/C][C]0.8412[/C][C]0.8554[/C][C]0.7573[/C][/ROW]
[ROW][C]59[/C][C]8.1[/C][C]14.0267[/C][C]2.9762[/C][C]25.0772[/C][C]0.1466[/C][C]0.8836[/C][C]0.8493[/C][C]0.8276[/C][/ROW]
[ROW][C]60[/C][C]8.5[/C][C]15.0776[/C][C]2.6816[/C][C]27.4736[/C][C]0.1492[/C][C]0.865[/C][C]0.8434[/C][C]0.8434[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67550&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67550&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])
368.1-------
377.7-------
387.9-------
397.9-------
408-------
417.9-------
427.6-------
437.1-------
446.8-------
456.5-------
466.9-------
478.2-------
488.7-------
498.38.65568.08769.22360.10990.43910.99950.4391
507.99.02767.654310.40090.05380.85050.94620.68
517.59.3697.017511.72040.05960.88960.88960.7114
527.810.04796.750113.34580.09080.9350.88820.7885
538.310.63856.42814.84910.13820.90680.89880.8166
548.410.96025.827716.09270.16410.84520.90030.806
558.210.95814.817817.09830.18930.79290.89090.7645
567.711.08943.831118.34770.180.78240.87660.7406
577.211.24682.775119.71840.17460.79410.86390.7221
587.312.16732.424921.90980.16370.84120.85540.7573
598.114.02672.976225.07720.14660.88360.84930.8276
608.515.07762.681627.47360.14920.8650.84340.8434







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0335-0.04110.00340.12640.01050.1027
500.0776-0.12490.01041.27160.1060.3255
510.1281-0.19950.01663.49310.29110.5395
520.1675-0.22370.01865.05320.42110.6489
530.2019-0.21980.01835.46870.45570.6751
540.2389-0.23360.01956.55470.54620.7391
550.2859-0.25170.0217.6070.63390.7962
560.3339-0.30560.025511.4880.95730.9784
570.3843-0.35980.0316.37631.36471.1682
580.4085-0.40.033323.69111.97431.4051
590.4019-0.42250.035235.12592.92721.7109
600.4195-0.43630.036443.2653.60541.8988

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0335 & -0.0411 & 0.0034 & 0.1264 & 0.0105 & 0.1027 \tabularnewline
50 & 0.0776 & -0.1249 & 0.0104 & 1.2716 & 0.106 & 0.3255 \tabularnewline
51 & 0.1281 & -0.1995 & 0.0166 & 3.4931 & 0.2911 & 0.5395 \tabularnewline
52 & 0.1675 & -0.2237 & 0.0186 & 5.0532 & 0.4211 & 0.6489 \tabularnewline
53 & 0.2019 & -0.2198 & 0.0183 & 5.4687 & 0.4557 & 0.6751 \tabularnewline
54 & 0.2389 & -0.2336 & 0.0195 & 6.5547 & 0.5462 & 0.7391 \tabularnewline
55 & 0.2859 & -0.2517 & 0.021 & 7.607 & 0.6339 & 0.7962 \tabularnewline
56 & 0.3339 & -0.3056 & 0.0255 & 11.488 & 0.9573 & 0.9784 \tabularnewline
57 & 0.3843 & -0.3598 & 0.03 & 16.3763 & 1.3647 & 1.1682 \tabularnewline
58 & 0.4085 & -0.4 & 0.0333 & 23.6911 & 1.9743 & 1.4051 \tabularnewline
59 & 0.4019 & -0.4225 & 0.0352 & 35.1259 & 2.9272 & 1.7109 \tabularnewline
60 & 0.4195 & -0.4363 & 0.0364 & 43.265 & 3.6054 & 1.8988 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=67550&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.0335[/C][C]-0.0411[/C][C]0.0034[/C][C]0.1264[/C][C]0.0105[/C][C]0.1027[/C][/ROW]
[ROW][C]50[/C][C]0.0776[/C][C]-0.1249[/C][C]0.0104[/C][C]1.2716[/C][C]0.106[/C][C]0.3255[/C][/ROW]
[ROW][C]51[/C][C]0.1281[/C][C]-0.1995[/C][C]0.0166[/C][C]3.4931[/C][C]0.2911[/C][C]0.5395[/C][/ROW]
[ROW][C]52[/C][C]0.1675[/C][C]-0.2237[/C][C]0.0186[/C][C]5.0532[/C][C]0.4211[/C][C]0.6489[/C][/ROW]
[ROW][C]53[/C][C]0.2019[/C][C]-0.2198[/C][C]0.0183[/C][C]5.4687[/C][C]0.4557[/C][C]0.6751[/C][/ROW]
[ROW][C]54[/C][C]0.2389[/C][C]-0.2336[/C][C]0.0195[/C][C]6.5547[/C][C]0.5462[/C][C]0.7391[/C][/ROW]
[ROW][C]55[/C][C]0.2859[/C][C]-0.2517[/C][C]0.021[/C][C]7.607[/C][C]0.6339[/C][C]0.7962[/C][/ROW]
[ROW][C]56[/C][C]0.3339[/C][C]-0.3056[/C][C]0.0255[/C][C]11.488[/C][C]0.9573[/C][C]0.9784[/C][/ROW]
[ROW][C]57[/C][C]0.3843[/C][C]-0.3598[/C][C]0.03[/C][C]16.3763[/C][C]1.3647[/C][C]1.1682[/C][/ROW]
[ROW][C]58[/C][C]0.4085[/C][C]-0.4[/C][C]0.0333[/C][C]23.6911[/C][C]1.9743[/C][C]1.4051[/C][/ROW]
[ROW][C]59[/C][C]0.4019[/C][C]-0.4225[/C][C]0.0352[/C][C]35.1259[/C][C]2.9272[/C][C]1.7109[/C][/ROW]
[ROW][C]60[/C][C]0.4195[/C][C]-0.4363[/C][C]0.0364[/C][C]43.265[/C][C]3.6054[/C][C]1.8988[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=67550&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=67550&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.0335-0.04110.00340.12640.01050.1027
500.0776-0.12490.01041.27160.1060.3255
510.1281-0.19950.01663.49310.29110.5395
520.1675-0.22370.01865.05320.42110.6489
530.2019-0.21980.01835.46870.45570.6751
540.2389-0.23360.01956.55470.54620.7391
550.2859-0.25170.0217.6070.63390.7962
560.3339-0.30560.025511.4880.95730.9784
570.3843-0.35980.0316.37631.36471.1682
580.4085-0.40.033323.69111.97431.4051
590.4019-0.42250.035235.12592.92721.7109
600.4195-0.43630.036443.2653.60541.8988



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