Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 06 Dec 2007 06:30:59 -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/2007/Dec/06/t1196947098notevn0vq20sdja.htm/, Retrieved Fri, 03 May 2024 13:52:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2595, Retrieved Fri, 03 May 2024 13:52:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact181
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting Q1] [2007-12-06 13:30:59] [9fe578921d87f9af8e79a90d6142ba02] [Current]
Feedback Forum

Post a new message
Dataseries X:
8.1
8.2
8
8.1
8.3
8.2
8.1
7.7
7.6
7.7
8.2
8.4
8.4
8.6
8.4
8.5
8.7
8.7
8.6
7.4
7.3
7.4
9
9.2
9.2
8.5
8.3
8.3
8.6
8.6
8.5
8.1
8.1
8
8.6
8.7
8.7
8.6
8.4
8.4
8.7
8.7
8.5
8.3
8.3
8.3
8.1
8.2
8.1
8.1
7.9
7.7
8.1
8
7.7
7.8
7.6
7.4
7.7
7.9
7.6




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

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2595&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2595&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2595&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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[49])
378.7-------
388.6-------
398.4-------
408.4-------
418.7-------
428.7-------
438.5-------
448.3-------
458.3-------
468.3-------
478.1-------
488.2-------
498.1-------
508.18.32647.87748.77540.16150.83850.11610.8385
517.98.22057.56198.8790.17010.640.29650.64
527.78.28477.46949.10010.07990.82250.39090.6715
538.18.31887.47749.16010.30510.92530.18720.6949
5488.34377.48589.20160.21620.71110.20780.7111
557.78.22967.35559.10370.11750.69670.27210.6143
567.88.14747.21189.0830.23340.82570.37460.5395
577.68.13047.12429.13650.15080.74010.37050.5236
587.48.17897.10639.25150.07730.85490.41240.5573
597.78.07376.96759.17980.25390.88370.48140.4814
607.98.1186.9869.25010.35290.76540.44360.5125
617.68.05786.90089.21470.2190.60540.47150.4715

\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[49]) \tabularnewline
37 & 8.7 & - & - & - & - & - & - & - \tabularnewline
38 & 8.6 & - & - & - & - & - & - & - \tabularnewline
39 & 8.4 & - & - & - & - & - & - & - \tabularnewline
40 & 8.4 & - & - & - & - & - & - & - \tabularnewline
41 & 8.7 & - & - & - & - & - & - & - \tabularnewline
42 & 8.7 & - & - & - & - & - & - & - \tabularnewline
43 & 8.5 & - & - & - & - & - & - & - \tabularnewline
44 & 8.3 & - & - & - & - & - & - & - \tabularnewline
45 & 8.3 & - & - & - & - & - & - & - \tabularnewline
46 & 8.3 & - & - & - & - & - & - & - \tabularnewline
47 & 8.1 & - & - & - & - & - & - & - \tabularnewline
48 & 8.2 & - & - & - & - & - & - & - \tabularnewline
49 & 8.1 & - & - & - & - & - & - & - \tabularnewline
50 & 8.1 & 8.3264 & 7.8774 & 8.7754 & 0.1615 & 0.8385 & 0.1161 & 0.8385 \tabularnewline
51 & 7.9 & 8.2205 & 7.5619 & 8.879 & 0.1701 & 0.64 & 0.2965 & 0.64 \tabularnewline
52 & 7.7 & 8.2847 & 7.4694 & 9.1001 & 0.0799 & 0.8225 & 0.3909 & 0.6715 \tabularnewline
53 & 8.1 & 8.3188 & 7.4774 & 9.1601 & 0.3051 & 0.9253 & 0.1872 & 0.6949 \tabularnewline
54 & 8 & 8.3437 & 7.4858 & 9.2016 & 0.2162 & 0.7111 & 0.2078 & 0.7111 \tabularnewline
55 & 7.7 & 8.2296 & 7.3555 & 9.1037 & 0.1175 & 0.6967 & 0.2721 & 0.6143 \tabularnewline
56 & 7.8 & 8.1474 & 7.2118 & 9.083 & 0.2334 & 0.8257 & 0.3746 & 0.5395 \tabularnewline
57 & 7.6 & 8.1304 & 7.1242 & 9.1365 & 0.1508 & 0.7401 & 0.3705 & 0.5236 \tabularnewline
58 & 7.4 & 8.1789 & 7.1063 & 9.2515 & 0.0773 & 0.8549 & 0.4124 & 0.5573 \tabularnewline
59 & 7.7 & 8.0737 & 6.9675 & 9.1798 & 0.2539 & 0.8837 & 0.4814 & 0.4814 \tabularnewline
60 & 7.9 & 8.118 & 6.986 & 9.2501 & 0.3529 & 0.7654 & 0.4436 & 0.5125 \tabularnewline
61 & 7.6 & 8.0578 & 6.9008 & 9.2147 & 0.219 & 0.6054 & 0.4715 & 0.4715 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2595&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[49])[/C][/ROW]
[ROW][C]37[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]8.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]8.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]8.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]8.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]8.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]8.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]8.1[/C][C]8.3264[/C][C]7.8774[/C][C]8.7754[/C][C]0.1615[/C][C]0.8385[/C][C]0.1161[/C][C]0.8385[/C][/ROW]
[ROW][C]51[/C][C]7.9[/C][C]8.2205[/C][C]7.5619[/C][C]8.879[/C][C]0.1701[/C][C]0.64[/C][C]0.2965[/C][C]0.64[/C][/ROW]
[ROW][C]52[/C][C]7.7[/C][C]8.2847[/C][C]7.4694[/C][C]9.1001[/C][C]0.0799[/C][C]0.8225[/C][C]0.3909[/C][C]0.6715[/C][/ROW]
[ROW][C]53[/C][C]8.1[/C][C]8.3188[/C][C]7.4774[/C][C]9.1601[/C][C]0.3051[/C][C]0.9253[/C][C]0.1872[/C][C]0.6949[/C][/ROW]
[ROW][C]54[/C][C]8[/C][C]8.3437[/C][C]7.4858[/C][C]9.2016[/C][C]0.2162[/C][C]0.7111[/C][C]0.2078[/C][C]0.7111[/C][/ROW]
[ROW][C]55[/C][C]7.7[/C][C]8.2296[/C][C]7.3555[/C][C]9.1037[/C][C]0.1175[/C][C]0.6967[/C][C]0.2721[/C][C]0.6143[/C][/ROW]
[ROW][C]56[/C][C]7.8[/C][C]8.1474[/C][C]7.2118[/C][C]9.083[/C][C]0.2334[/C][C]0.8257[/C][C]0.3746[/C][C]0.5395[/C][/ROW]
[ROW][C]57[/C][C]7.6[/C][C]8.1304[/C][C]7.1242[/C][C]9.1365[/C][C]0.1508[/C][C]0.7401[/C][C]0.3705[/C][C]0.5236[/C][/ROW]
[ROW][C]58[/C][C]7.4[/C][C]8.1789[/C][C]7.1063[/C][C]9.2515[/C][C]0.0773[/C][C]0.8549[/C][C]0.4124[/C][C]0.5573[/C][/ROW]
[ROW][C]59[/C][C]7.7[/C][C]8.0737[/C][C]6.9675[/C][C]9.1798[/C][C]0.2539[/C][C]0.8837[/C][C]0.4814[/C][C]0.4814[/C][/ROW]
[ROW][C]60[/C][C]7.9[/C][C]8.118[/C][C]6.986[/C][C]9.2501[/C][C]0.3529[/C][C]0.7654[/C][C]0.4436[/C][C]0.5125[/C][/ROW]
[ROW][C]61[/C][C]7.6[/C][C]8.0578[/C][C]6.9008[/C][C]9.2147[/C][C]0.219[/C][C]0.6054[/C][C]0.4715[/C][C]0.4715[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2595&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2595&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[49])
378.7-------
388.6-------
398.4-------
408.4-------
418.7-------
428.7-------
438.5-------
448.3-------
458.3-------
468.3-------
478.1-------
488.2-------
498.1-------
508.18.32647.87748.77540.16150.83850.11610.8385
517.98.22057.56198.8790.17010.640.29650.64
527.78.28477.46949.10010.07990.82250.39090.6715
538.18.31887.47749.16010.30510.92530.18720.6949
5488.34377.48589.20160.21620.71110.20780.7111
557.78.22967.35559.10370.11750.69670.27210.6143
567.88.14747.21189.0830.23340.82570.37460.5395
577.68.13047.12429.13650.15080.74010.37050.5236
587.48.17897.10639.25150.07730.85490.41240.5573
597.78.07376.96759.17980.25390.88370.48140.4814
607.98.1186.9869.25010.35290.76540.44360.5125
617.68.05786.90089.21470.2190.60540.47150.4715







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0275-0.02720.00230.05130.00430.0654
510.0409-0.0390.00320.10270.00860.0925
520.0502-0.07060.00590.34190.02850.1688
530.0516-0.02630.00220.04790.0040.0632
540.0525-0.04120.00340.11810.00980.0992
550.0542-0.06440.00540.28050.02340.1529
560.0586-0.04260.00360.12070.01010.1003
570.0631-0.06520.00540.28130.02340.1531
580.0669-0.09520.00790.60660.05060.2248
590.0699-0.04630.00390.13960.01160.1079
600.0711-0.02690.00220.04750.0040.0629
610.0733-0.05680.00470.20960.01750.1321

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0275 & -0.0272 & 0.0023 & 0.0513 & 0.0043 & 0.0654 \tabularnewline
51 & 0.0409 & -0.039 & 0.0032 & 0.1027 & 0.0086 & 0.0925 \tabularnewline
52 & 0.0502 & -0.0706 & 0.0059 & 0.3419 & 0.0285 & 0.1688 \tabularnewline
53 & 0.0516 & -0.0263 & 0.0022 & 0.0479 & 0.004 & 0.0632 \tabularnewline
54 & 0.0525 & -0.0412 & 0.0034 & 0.1181 & 0.0098 & 0.0992 \tabularnewline
55 & 0.0542 & -0.0644 & 0.0054 & 0.2805 & 0.0234 & 0.1529 \tabularnewline
56 & 0.0586 & -0.0426 & 0.0036 & 0.1207 & 0.0101 & 0.1003 \tabularnewline
57 & 0.0631 & -0.0652 & 0.0054 & 0.2813 & 0.0234 & 0.1531 \tabularnewline
58 & 0.0669 & -0.0952 & 0.0079 & 0.6066 & 0.0506 & 0.2248 \tabularnewline
59 & 0.0699 & -0.0463 & 0.0039 & 0.1396 & 0.0116 & 0.1079 \tabularnewline
60 & 0.0711 & -0.0269 & 0.0022 & 0.0475 & 0.004 & 0.0629 \tabularnewline
61 & 0.0733 & -0.0568 & 0.0047 & 0.2096 & 0.0175 & 0.1321 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2595&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]50[/C][C]0.0275[/C][C]-0.0272[/C][C]0.0023[/C][C]0.0513[/C][C]0.0043[/C][C]0.0654[/C][/ROW]
[ROW][C]51[/C][C]0.0409[/C][C]-0.039[/C][C]0.0032[/C][C]0.1027[/C][C]0.0086[/C][C]0.0925[/C][/ROW]
[ROW][C]52[/C][C]0.0502[/C][C]-0.0706[/C][C]0.0059[/C][C]0.3419[/C][C]0.0285[/C][C]0.1688[/C][/ROW]
[ROW][C]53[/C][C]0.0516[/C][C]-0.0263[/C][C]0.0022[/C][C]0.0479[/C][C]0.004[/C][C]0.0632[/C][/ROW]
[ROW][C]54[/C][C]0.0525[/C][C]-0.0412[/C][C]0.0034[/C][C]0.1181[/C][C]0.0098[/C][C]0.0992[/C][/ROW]
[ROW][C]55[/C][C]0.0542[/C][C]-0.0644[/C][C]0.0054[/C][C]0.2805[/C][C]0.0234[/C][C]0.1529[/C][/ROW]
[ROW][C]56[/C][C]0.0586[/C][C]-0.0426[/C][C]0.0036[/C][C]0.1207[/C][C]0.0101[/C][C]0.1003[/C][/ROW]
[ROW][C]57[/C][C]0.0631[/C][C]-0.0652[/C][C]0.0054[/C][C]0.2813[/C][C]0.0234[/C][C]0.1531[/C][/ROW]
[ROW][C]58[/C][C]0.0669[/C][C]-0.0952[/C][C]0.0079[/C][C]0.6066[/C][C]0.0506[/C][C]0.2248[/C][/ROW]
[ROW][C]59[/C][C]0.0699[/C][C]-0.0463[/C][C]0.0039[/C][C]0.1396[/C][C]0.0116[/C][C]0.1079[/C][/ROW]
[ROW][C]60[/C][C]0.0711[/C][C]-0.0269[/C][C]0.0022[/C][C]0.0475[/C][C]0.004[/C][C]0.0629[/C][/ROW]
[ROW][C]61[/C][C]0.0733[/C][C]-0.0568[/C][C]0.0047[/C][C]0.2096[/C][C]0.0175[/C][C]0.1321[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2595&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2595&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
500.0275-0.02720.00230.05130.00430.0654
510.0409-0.0390.00320.10270.00860.0925
520.0502-0.07060.00590.34190.02850.1688
530.0516-0.02630.00220.04790.0040.0632
540.0525-0.04120.00340.11810.00980.0992
550.0542-0.06440.00540.28050.02340.1529
560.0586-0.04260.00360.12070.01010.1003
570.0631-0.06520.00540.28130.02340.1531
580.0669-0.09520.00790.60660.05060.2248
590.0699-0.04630.00390.13960.01160.1079
600.0711-0.02690.00220.04750.0040.0629
610.0733-0.05680.00470.20960.01750.1321



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