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, 13 Dec 2012 10:22:20 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/13/t1355412189jmbs20hlgkqhylt.htm/, Retrieved Sun, 28 Apr 2024 22:52:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=199279, Retrieved Sun, 28 Apr 2024 22:52:59 +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)
-     [ARIMA Forecasting] [] [2010-12-24 16:20:41] [055a14fb8042f7ec27c73c5dfc3bfa50]
-   PD  [ARIMA Forecasting] [] [2010-12-28 16:53:26] [c6813a60da787bb62b5d86150b8926dd]
- R P       [ARIMA Forecasting] [Deel 4: ARIMA model] [2012-12-13 15:22:20] [f988ca26b10d35edf58465884f70a009] [Current]
Feedback Forum

Post a new message
Dataseries X:
6
6
8
4
8
10
9
12
9
11
11
11
11
11
9
8
6
7
8
6
5
2
3
3
7
8
7
7
6
6
7
5
5
5
4
4
4
1
-1
3
4
3
2
1
4
3
5
6
6
6
6
6
5
6
5
6
5
7
4
5
6
6
5
3
2
3
3
2
0
4
4
5
6
6
5
5
3
5
5
5
3
6
6
4
6
5
4
5
5
4
3
2
3
2
-1
0
-2
1
-2
-2
-2
-6
-4
-2
0
-5
-4
-5
-1
-2
-4
-1
1
1
-2
1
1
3
3
1
1
0
2
2
-1
1
0
1
1
3
2




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199279&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' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199279&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199279&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' @ jenkins.wessa.net







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[119])
107-4-------
108-5-------
109-1-------
110-2-------
111-4-------
112-1-------
1131-------
1141-------
115-2-------
1161-------
1171-------
1183-------
1193-------
12013-0.42046.42040.12590.510.5
12113-1.19457.19450.1750.8250.96920.5
12203-1.9977.9970.11970.78360.97510.5
12323-2.64798.64790.36430.85110.99240.5
12423-3.24159.24150.37680.62320.89550.5
125-13-3.78069.78060.12380.61370.71840.5
12613-4.280610.28060.29510.85920.70490.5
12703-4.748210.74820.2240.69350.8970.5
12813-5.189211.18920.31610.76360.68390.5
12913-5.607711.60770.32440.67560.67560.5
13033-6.006712.00670.50.66830.50.5
13123-6.388812.38880.41730.50.50.5

\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[119]) \tabularnewline
107 & -4 & - & - & - & - & - & - & - \tabularnewline
108 & -5 & - & - & - & - & - & - & - \tabularnewline
109 & -1 & - & - & - & - & - & - & - \tabularnewline
110 & -2 & - & - & - & - & - & - & - \tabularnewline
111 & -4 & - & - & - & - & - & - & - \tabularnewline
112 & -1 & - & - & - & - & - & - & - \tabularnewline
113 & 1 & - & - & - & - & - & - & - \tabularnewline
114 & 1 & - & - & - & - & - & - & - \tabularnewline
115 & -2 & - & - & - & - & - & - & - \tabularnewline
116 & 1 & - & - & - & - & - & - & - \tabularnewline
117 & 1 & - & - & - & - & - & - & - \tabularnewline
118 & 3 & - & - & - & - & - & - & - \tabularnewline
119 & 3 & - & - & - & - & - & - & - \tabularnewline
120 & 1 & 3 & -0.4204 & 6.4204 & 0.1259 & 0.5 & 1 & 0.5 \tabularnewline
121 & 1 & 3 & -1.1945 & 7.1945 & 0.175 & 0.825 & 0.9692 & 0.5 \tabularnewline
122 & 0 & 3 & -1.997 & 7.997 & 0.1197 & 0.7836 & 0.9751 & 0.5 \tabularnewline
123 & 2 & 3 & -2.6479 & 8.6479 & 0.3643 & 0.8511 & 0.9924 & 0.5 \tabularnewline
124 & 2 & 3 & -3.2415 & 9.2415 & 0.3768 & 0.6232 & 0.8955 & 0.5 \tabularnewline
125 & -1 & 3 & -3.7806 & 9.7806 & 0.1238 & 0.6137 & 0.7184 & 0.5 \tabularnewline
126 & 1 & 3 & -4.2806 & 10.2806 & 0.2951 & 0.8592 & 0.7049 & 0.5 \tabularnewline
127 & 0 & 3 & -4.7482 & 10.7482 & 0.224 & 0.6935 & 0.897 & 0.5 \tabularnewline
128 & 1 & 3 & -5.1892 & 11.1892 & 0.3161 & 0.7636 & 0.6839 & 0.5 \tabularnewline
129 & 1 & 3 & -5.6077 & 11.6077 & 0.3244 & 0.6756 & 0.6756 & 0.5 \tabularnewline
130 & 3 & 3 & -6.0067 & 12.0067 & 0.5 & 0.6683 & 0.5 & 0.5 \tabularnewline
131 & 2 & 3 & -6.3888 & 12.3888 & 0.4173 & 0.5 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199279&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[119])[/C][/ROW]
[ROW][C]107[/C][C]-4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]-5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]-2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]-4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]-1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]-2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]1[/C][C]3[/C][C]-0.4204[/C][C]6.4204[/C][C]0.1259[/C][C]0.5[/C][C]1[/C][C]0.5[/C][/ROW]
[ROW][C]121[/C][C]1[/C][C]3[/C][C]-1.1945[/C][C]7.1945[/C][C]0.175[/C][C]0.825[/C][C]0.9692[/C][C]0.5[/C][/ROW]
[ROW][C]122[/C][C]0[/C][C]3[/C][C]-1.997[/C][C]7.997[/C][C]0.1197[/C][C]0.7836[/C][C]0.9751[/C][C]0.5[/C][/ROW]
[ROW][C]123[/C][C]2[/C][C]3[/C][C]-2.6479[/C][C]8.6479[/C][C]0.3643[/C][C]0.8511[/C][C]0.9924[/C][C]0.5[/C][/ROW]
[ROW][C]124[/C][C]2[/C][C]3[/C][C]-3.2415[/C][C]9.2415[/C][C]0.3768[/C][C]0.6232[/C][C]0.8955[/C][C]0.5[/C][/ROW]
[ROW][C]125[/C][C]-1[/C][C]3[/C][C]-3.7806[/C][C]9.7806[/C][C]0.1238[/C][C]0.6137[/C][C]0.7184[/C][C]0.5[/C][/ROW]
[ROW][C]126[/C][C]1[/C][C]3[/C][C]-4.2806[/C][C]10.2806[/C][C]0.2951[/C][C]0.8592[/C][C]0.7049[/C][C]0.5[/C][/ROW]
[ROW][C]127[/C][C]0[/C][C]3[/C][C]-4.7482[/C][C]10.7482[/C][C]0.224[/C][C]0.6935[/C][C]0.897[/C][C]0.5[/C][/ROW]
[ROW][C]128[/C][C]1[/C][C]3[/C][C]-5.1892[/C][C]11.1892[/C][C]0.3161[/C][C]0.7636[/C][C]0.6839[/C][C]0.5[/C][/ROW]
[ROW][C]129[/C][C]1[/C][C]3[/C][C]-5.6077[/C][C]11.6077[/C][C]0.3244[/C][C]0.6756[/C][C]0.6756[/C][C]0.5[/C][/ROW]
[ROW][C]130[/C][C]3[/C][C]3[/C][C]-6.0067[/C][C]12.0067[/C][C]0.5[/C][C]0.6683[/C][C]0.5[/C][C]0.5[/C][/ROW]
[ROW][C]131[/C][C]2[/C][C]3[/C][C]-6.3888[/C][C]12.3888[/C][C]0.4173[/C][C]0.5[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199279&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199279&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[119])
107-4-------
108-5-------
109-1-------
110-2-------
111-4-------
112-1-------
1131-------
1141-------
115-2-------
1161-------
1171-------
1183-------
1193-------
12013-0.42046.42040.12590.510.5
12113-1.19457.19450.1750.8250.96920.5
12203-1.9977.9970.11970.78360.97510.5
12323-2.64798.64790.36430.85110.99240.5
12423-3.24159.24150.37680.62320.89550.5
125-13-3.78069.78060.12380.61370.71840.5
12613-4.280610.28060.29510.85920.70490.5
12703-4.748210.74820.2240.69350.8970.5
12813-5.189211.18920.31610.76360.68390.5
12913-5.607711.60770.32440.67560.67560.5
13033-6.006712.00670.50.66830.50.5
13123-6.388812.38880.41730.50.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.5817-0.66670400
1210.7133-0.66670.6667442
1220.8498-10.777895.66672.3805
1230.9605-0.33330.666714.52.1213
1241.0615-0.33330.613.81.9494
1251.1532-1.33330.7222165.83332.4152
1261.2382-0.66670.714345.57142.3604
1271.3177-10.75962.4495
1281.3927-0.66670.740745.77782.4037
1291.4639-0.66670.733345.62.3664
1301.531700.666705.09092.2563
1311.5967-0.33330.638914.752.1794

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.5817 & -0.6667 & 0 & 4 & 0 & 0 \tabularnewline
121 & 0.7133 & -0.6667 & 0.6667 & 4 & 4 & 2 \tabularnewline
122 & 0.8498 & -1 & 0.7778 & 9 & 5.6667 & 2.3805 \tabularnewline
123 & 0.9605 & -0.3333 & 0.6667 & 1 & 4.5 & 2.1213 \tabularnewline
124 & 1.0615 & -0.3333 & 0.6 & 1 & 3.8 & 1.9494 \tabularnewline
125 & 1.1532 & -1.3333 & 0.7222 & 16 & 5.8333 & 2.4152 \tabularnewline
126 & 1.2382 & -0.6667 & 0.7143 & 4 & 5.5714 & 2.3604 \tabularnewline
127 & 1.3177 & -1 & 0.75 & 9 & 6 & 2.4495 \tabularnewline
128 & 1.3927 & -0.6667 & 0.7407 & 4 & 5.7778 & 2.4037 \tabularnewline
129 & 1.4639 & -0.6667 & 0.7333 & 4 & 5.6 & 2.3664 \tabularnewline
130 & 1.5317 & 0 & 0.6667 & 0 & 5.0909 & 2.2563 \tabularnewline
131 & 1.5967 & -0.3333 & 0.6389 & 1 & 4.75 & 2.1794 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199279&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]120[/C][C]0.5817[/C][C]-0.6667[/C][C]0[/C][C]4[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.7133[/C][C]-0.6667[/C][C]0.6667[/C][C]4[/C][C]4[/C][C]2[/C][/ROW]
[ROW][C]122[/C][C]0.8498[/C][C]-1[/C][C]0.7778[/C][C]9[/C][C]5.6667[/C][C]2.3805[/C][/ROW]
[ROW][C]123[/C][C]0.9605[/C][C]-0.3333[/C][C]0.6667[/C][C]1[/C][C]4.5[/C][C]2.1213[/C][/ROW]
[ROW][C]124[/C][C]1.0615[/C][C]-0.3333[/C][C]0.6[/C][C]1[/C][C]3.8[/C][C]1.9494[/C][/ROW]
[ROW][C]125[/C][C]1.1532[/C][C]-1.3333[/C][C]0.7222[/C][C]16[/C][C]5.8333[/C][C]2.4152[/C][/ROW]
[ROW][C]126[/C][C]1.2382[/C][C]-0.6667[/C][C]0.7143[/C][C]4[/C][C]5.5714[/C][C]2.3604[/C][/ROW]
[ROW][C]127[/C][C]1.3177[/C][C]-1[/C][C]0.75[/C][C]9[/C][C]6[/C][C]2.4495[/C][/ROW]
[ROW][C]128[/C][C]1.3927[/C][C]-0.6667[/C][C]0.7407[/C][C]4[/C][C]5.7778[/C][C]2.4037[/C][/ROW]
[ROW][C]129[/C][C]1.4639[/C][C]-0.6667[/C][C]0.7333[/C][C]4[/C][C]5.6[/C][C]2.3664[/C][/ROW]
[ROW][C]130[/C][C]1.5317[/C][C]0[/C][C]0.6667[/C][C]0[/C][C]5.0909[/C][C]2.2563[/C][/ROW]
[ROW][C]131[/C][C]1.5967[/C][C]-0.3333[/C][C]0.6389[/C][C]1[/C][C]4.75[/C][C]2.1794[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199279&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199279&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
1200.5817-0.66670400
1210.7133-0.66670.6667442
1220.8498-10.777895.66672.3805
1230.9605-0.33330.666714.52.1213
1241.0615-0.33330.613.81.9494
1251.1532-1.33330.7222165.83332.4152
1261.2382-0.66670.714345.57142.3604
1271.3177-10.75962.4495
1281.3927-0.66670.740745.77782.4037
1291.4639-0.66670.733345.62.3664
1301.531700.666705.09092.2563
1311.5967-0.33330.638914.752.1794



Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = additive ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 1 ; 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')