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, 18 Dec 2008 08:37:02 -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/2008/Dec/18/t1229614694yku8k4aoqbd6yvz.htm/, Retrieved Sun, 12 May 2024 11:59:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34849, Retrieved Sun, 12 May 2024 11:59:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact178
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [foutmelding arima...] [2008-12-12 15:06:09] [e43247bc0ab243a5af99ac7f55ba0b41]
F RMP   [ARIMA Forecasting] [stap 1 forecast] [2008-12-15 17:32:42] [e43247bc0ab243a5af99ac7f55ba0b41]
-   P     [ARIMA Forecasting] [arima forecast ma...] [2008-12-17 16:52:00] [e43247bc0ab243a5af99ac7f55ba0b41]
-   P         [ARIMA Forecasting] [forecast mannen j...] [2008-12-18 15:37:02] [f24298b2e4c2a19d76cf4460ec5d2246] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.8
7.6
7.5
7.6
7.5
7.3
7.6
7.5
7.6
7.9
7.9
8.1
8.2
8.0
7.5
6.8
6.5
6.6
7.6
8.0
8.0
7.7
7.5
7.6
7.7
7.9
7.8
7.5
7.5
7.1
7.5
7.5
7.6
7.7
7.7
7.9
8.1
8.2
8.2
8.1
7.9
7.3
6.9
6.6
6.7
6.9
7.0
7.1
7.2
7.1
6.9
7.0
6.8
6.4
6.7
6.7
6.4
6.3
6.2
6.5
6.8
6.8
6.5
6.3
5.9
5.9
6.4
6.4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 4 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34849&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34849&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34849&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 time4 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[56])
446.6-------
456.7-------
466.9-------
477-------
487.1-------
497.2-------
507.1-------
516.9-------
527-------
536.8-------
546.4-------
556.7-------
566.7-------
576.46.78376.41117.15630.02180.67020.67020.6702
586.36.87276.21037.53510.04510.91910.46790.6954
596.26.8716.02697.71510.05960.90750.38220.6543
606.56.97866.05227.90490.15560.95030.39860.7222
616.87.04456.09097.99810.30770.86850.37460.7605
626.87.00626.04517.96730.33710.66290.42410.7338
636.56.85265.88677.81850.23710.54250.46170.6216
646.36.70195.7277.67680.20960.65760.27440.5015
655.96.56795.57457.56130.09380.70140.32350.3972
665.96.32265.30087.34430.20880.79120.4410.2345
676.46.58255.52817.63680.36720.89770.41350.4135
686.46.59015.5057.67520.36560.63440.42130.4213

\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[56]) \tabularnewline
44 & 6.6 & - & - & - & - & - & - & - \tabularnewline
45 & 6.7 & - & - & - & - & - & - & - \tabularnewline
46 & 6.9 & - & - & - & - & - & - & - \tabularnewline
47 & 7 & - & - & - & - & - & - & - \tabularnewline
48 & 7.1 & - & - & - & - & - & - & - \tabularnewline
49 & 7.2 & - & - & - & - & - & - & - \tabularnewline
50 & 7.1 & - & - & - & - & - & - & - \tabularnewline
51 & 6.9 & - & - & - & - & - & - & - \tabularnewline
52 & 7 & - & - & - & - & - & - & - \tabularnewline
53 & 6.8 & - & - & - & - & - & - & - \tabularnewline
54 & 6.4 & - & - & - & - & - & - & - \tabularnewline
55 & 6.7 & - & - & - & - & - & - & - \tabularnewline
56 & 6.7 & - & - & - & - & - & - & - \tabularnewline
57 & 6.4 & 6.7837 & 6.4111 & 7.1563 & 0.0218 & 0.6702 & 0.6702 & 0.6702 \tabularnewline
58 & 6.3 & 6.8727 & 6.2103 & 7.5351 & 0.0451 & 0.9191 & 0.4679 & 0.6954 \tabularnewline
59 & 6.2 & 6.871 & 6.0269 & 7.7151 & 0.0596 & 0.9075 & 0.3822 & 0.6543 \tabularnewline
60 & 6.5 & 6.9786 & 6.0522 & 7.9049 & 0.1556 & 0.9503 & 0.3986 & 0.7222 \tabularnewline
61 & 6.8 & 7.0445 & 6.0909 & 7.9981 & 0.3077 & 0.8685 & 0.3746 & 0.7605 \tabularnewline
62 & 6.8 & 7.0062 & 6.0451 & 7.9673 & 0.3371 & 0.6629 & 0.4241 & 0.7338 \tabularnewline
63 & 6.5 & 6.8526 & 5.8867 & 7.8185 & 0.2371 & 0.5425 & 0.4617 & 0.6216 \tabularnewline
64 & 6.3 & 6.7019 & 5.727 & 7.6768 & 0.2096 & 0.6576 & 0.2744 & 0.5015 \tabularnewline
65 & 5.9 & 6.5679 & 5.5745 & 7.5613 & 0.0938 & 0.7014 & 0.3235 & 0.3972 \tabularnewline
66 & 5.9 & 6.3226 & 5.3008 & 7.3443 & 0.2088 & 0.7912 & 0.441 & 0.2345 \tabularnewline
67 & 6.4 & 6.5825 & 5.5281 & 7.6368 & 0.3672 & 0.8977 & 0.4135 & 0.4135 \tabularnewline
68 & 6.4 & 6.5901 & 5.505 & 7.6752 & 0.3656 & 0.6344 & 0.4213 & 0.4213 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34849&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[56])[/C][/ROW]
[ROW][C]44[/C][C]6.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]6.7[/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]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]6.4[/C][C]6.7837[/C][C]6.4111[/C][C]7.1563[/C][C]0.0218[/C][C]0.6702[/C][C]0.6702[/C][C]0.6702[/C][/ROW]
[ROW][C]58[/C][C]6.3[/C][C]6.8727[/C][C]6.2103[/C][C]7.5351[/C][C]0.0451[/C][C]0.9191[/C][C]0.4679[/C][C]0.6954[/C][/ROW]
[ROW][C]59[/C][C]6.2[/C][C]6.871[/C][C]6.0269[/C][C]7.7151[/C][C]0.0596[/C][C]0.9075[/C][C]0.3822[/C][C]0.6543[/C][/ROW]
[ROW][C]60[/C][C]6.5[/C][C]6.9786[/C][C]6.0522[/C][C]7.9049[/C][C]0.1556[/C][C]0.9503[/C][C]0.3986[/C][C]0.7222[/C][/ROW]
[ROW][C]61[/C][C]6.8[/C][C]7.0445[/C][C]6.0909[/C][C]7.9981[/C][C]0.3077[/C][C]0.8685[/C][C]0.3746[/C][C]0.7605[/C][/ROW]
[ROW][C]62[/C][C]6.8[/C][C]7.0062[/C][C]6.0451[/C][C]7.9673[/C][C]0.3371[/C][C]0.6629[/C][C]0.4241[/C][C]0.7338[/C][/ROW]
[ROW][C]63[/C][C]6.5[/C][C]6.8526[/C][C]5.8867[/C][C]7.8185[/C][C]0.2371[/C][C]0.5425[/C][C]0.4617[/C][C]0.6216[/C][/ROW]
[ROW][C]64[/C][C]6.3[/C][C]6.7019[/C][C]5.727[/C][C]7.6768[/C][C]0.2096[/C][C]0.6576[/C][C]0.2744[/C][C]0.5015[/C][/ROW]
[ROW][C]65[/C][C]5.9[/C][C]6.5679[/C][C]5.5745[/C][C]7.5613[/C][C]0.0938[/C][C]0.7014[/C][C]0.3235[/C][C]0.3972[/C][/ROW]
[ROW][C]66[/C][C]5.9[/C][C]6.3226[/C][C]5.3008[/C][C]7.3443[/C][C]0.2088[/C][C]0.7912[/C][C]0.441[/C][C]0.2345[/C][/ROW]
[ROW][C]67[/C][C]6.4[/C][C]6.5825[/C][C]5.5281[/C][C]7.6368[/C][C]0.3672[/C][C]0.8977[/C][C]0.4135[/C][C]0.4135[/C][/ROW]
[ROW][C]68[/C][C]6.4[/C][C]6.5901[/C][C]5.505[/C][C]7.6752[/C][C]0.3656[/C][C]0.6344[/C][C]0.4213[/C][C]0.4213[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34849&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34849&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[56])
446.6-------
456.7-------
466.9-------
477-------
487.1-------
497.2-------
507.1-------
516.9-------
527-------
536.8-------
546.4-------
556.7-------
566.7-------
576.46.78376.41117.15630.02180.67020.67020.6702
586.36.87276.21037.53510.04510.91910.46790.6954
596.26.8716.02697.71510.05960.90750.38220.6543
606.56.97866.05227.90490.15560.95030.39860.7222
616.87.04456.09097.99810.30770.86850.37460.7605
626.87.00626.04517.96730.33710.66290.42410.7338
636.56.85265.88677.81850.23710.54250.46170.6216
646.36.70195.7277.67680.20960.65760.27440.5015
655.96.56795.57457.56130.09380.70140.32350.3972
665.96.32265.30087.34430.20880.79120.4410.2345
676.46.58255.52817.63680.36720.89770.41350.4135
686.46.59015.5057.67520.36560.63440.42130.4213







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
570.028-0.05660.00470.14720.01230.1108
580.0492-0.08330.00690.3280.02730.1653
590.0627-0.09770.00810.45020.03750.1937
600.0677-0.06860.00570.2290.01910.1382
610.0691-0.03470.00290.05980.0050.0706
620.07-0.02940.00250.04250.00350.0595
630.0719-0.05150.00430.12430.01040.1018
640.0742-0.060.0050.16150.01350.116
650.0772-0.10170.00850.44610.03720.1928
660.0824-0.06680.00560.17860.01490.122
670.0817-0.02770.00230.03330.00280.0527
680.084-0.02880.00240.03610.0030.0549

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
57 & 0.028 & -0.0566 & 0.0047 & 0.1472 & 0.0123 & 0.1108 \tabularnewline
58 & 0.0492 & -0.0833 & 0.0069 & 0.328 & 0.0273 & 0.1653 \tabularnewline
59 & 0.0627 & -0.0977 & 0.0081 & 0.4502 & 0.0375 & 0.1937 \tabularnewline
60 & 0.0677 & -0.0686 & 0.0057 & 0.229 & 0.0191 & 0.1382 \tabularnewline
61 & 0.0691 & -0.0347 & 0.0029 & 0.0598 & 0.005 & 0.0706 \tabularnewline
62 & 0.07 & -0.0294 & 0.0025 & 0.0425 & 0.0035 & 0.0595 \tabularnewline
63 & 0.0719 & -0.0515 & 0.0043 & 0.1243 & 0.0104 & 0.1018 \tabularnewline
64 & 0.0742 & -0.06 & 0.005 & 0.1615 & 0.0135 & 0.116 \tabularnewline
65 & 0.0772 & -0.1017 & 0.0085 & 0.4461 & 0.0372 & 0.1928 \tabularnewline
66 & 0.0824 & -0.0668 & 0.0056 & 0.1786 & 0.0149 & 0.122 \tabularnewline
67 & 0.0817 & -0.0277 & 0.0023 & 0.0333 & 0.0028 & 0.0527 \tabularnewline
68 & 0.084 & -0.0288 & 0.0024 & 0.0361 & 0.003 & 0.0549 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34849&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]57[/C][C]0.028[/C][C]-0.0566[/C][C]0.0047[/C][C]0.1472[/C][C]0.0123[/C][C]0.1108[/C][/ROW]
[ROW][C]58[/C][C]0.0492[/C][C]-0.0833[/C][C]0.0069[/C][C]0.328[/C][C]0.0273[/C][C]0.1653[/C][/ROW]
[ROW][C]59[/C][C]0.0627[/C][C]-0.0977[/C][C]0.0081[/C][C]0.4502[/C][C]0.0375[/C][C]0.1937[/C][/ROW]
[ROW][C]60[/C][C]0.0677[/C][C]-0.0686[/C][C]0.0057[/C][C]0.229[/C][C]0.0191[/C][C]0.1382[/C][/ROW]
[ROW][C]61[/C][C]0.0691[/C][C]-0.0347[/C][C]0.0029[/C][C]0.0598[/C][C]0.005[/C][C]0.0706[/C][/ROW]
[ROW][C]62[/C][C]0.07[/C][C]-0.0294[/C][C]0.0025[/C][C]0.0425[/C][C]0.0035[/C][C]0.0595[/C][/ROW]
[ROW][C]63[/C][C]0.0719[/C][C]-0.0515[/C][C]0.0043[/C][C]0.1243[/C][C]0.0104[/C][C]0.1018[/C][/ROW]
[ROW][C]64[/C][C]0.0742[/C][C]-0.06[/C][C]0.005[/C][C]0.1615[/C][C]0.0135[/C][C]0.116[/C][/ROW]
[ROW][C]65[/C][C]0.0772[/C][C]-0.1017[/C][C]0.0085[/C][C]0.4461[/C][C]0.0372[/C][C]0.1928[/C][/ROW]
[ROW][C]66[/C][C]0.0824[/C][C]-0.0668[/C][C]0.0056[/C][C]0.1786[/C][C]0.0149[/C][C]0.122[/C][/ROW]
[ROW][C]67[/C][C]0.0817[/C][C]-0.0277[/C][C]0.0023[/C][C]0.0333[/C][C]0.0028[/C][C]0.0527[/C][/ROW]
[ROW][C]68[/C][C]0.084[/C][C]-0.0288[/C][C]0.0024[/C][C]0.0361[/C][C]0.003[/C][C]0.0549[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34849&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34849&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
570.028-0.05660.00470.14720.01230.1108
580.0492-0.08330.00690.3280.02730.1653
590.0627-0.09770.00810.45020.03750.1937
600.0677-0.06860.00570.2290.01910.1382
610.0691-0.03470.00290.05980.0050.0706
620.07-0.02940.00250.04250.00350.0595
630.0719-0.05150.00430.12430.01040.1018
640.0742-0.060.0050.16150.01350.116
650.0772-0.10170.00850.44610.03720.1928
660.0824-0.06680.00560.17860.01490.122
670.0817-0.02770.00230.03330.00280.0527
680.084-0.02880.00240.03610.0030.0549



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