Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 17 Dec 2007 10:28:33 -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/17/t1197911500eni9oqhtrsg2q9m.htm/, Retrieved Sat, 04 May 2024 00:22:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4399, Retrieved Sat, 04 May 2024 00:22:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsElynne
Estimated Impact163
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Estimation Tijdre...] [2007-12-17 17:28:33] [c119ddc84594f6b781d845667bf1cf2c] [Current]
Feedback Forum

Post a new message
Dataseries X:
100,3
100,3
100,4
101,5
98,6
96,1
92,6
93,4
91,9
87,7
82,6
82,1
82,7
81,2
84,9
83,7
81,5
81,8
82,9
83,4
85,8
84,8
82,7
82
83,8
82,1
84
87,2
88,4
89,2
90,1
89
88,7
90,5
89,4
88,3
89,4
88,9
89,6
88,9
89,3
90,5
90
90,3
92,7
92
93,2
93,2
92
92,7
95,2
94,7
96,5
98,9
97,1
94,2
91,1
88,8
88,8
88,9
86,9
86,3
87
85,6
87,7
90,5
90,6
91,4
91,4
89,9
87,8
87,8
88
88,3
86,8
88
89
90,3
89,8
91




Summary of compuational 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 compuational 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=4399&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]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=4399&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4399&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 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[80])
6891.4-------
6991.4-------
7089.9-------
7187.8-------
7287.8-------
7388-------
7488.3-------
7586.8-------
7688-------
7789-------
7890.3-------
7989.8-------
8091-------
81NA91.269687.979994.6824NA0.56150.47020.5615
82NA91.329886.184296.7826NANA0.69640.5472
83NA91.343284.788498.4048NANA0.83730.5379
84NA91.346283.641199.7612NANA0.79560.5321
85NA91.346982.6564100.9511NANA0.75270.5282
86NA91.34781.7853102.0267NANA0.7120.5254
87NA91.347180.9985103.0178NANA0.77750.5232
88NA91.347180.2771103.9436NANA0.69870.5215
89NA91.347179.6083104.8168NANA0.63360.5201
90NA91.347178.9831105.6466NANA0.55710.519
91NA91.347178.3945106.4397NANA0.57960.518
92NA91.347177.8376107.2013NANA0.51710.5171

\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[80]) \tabularnewline
68 & 91.4 & - & - & - & - & - & - & - \tabularnewline
69 & 91.4 & - & - & - & - & - & - & - \tabularnewline
70 & 89.9 & - & - & - & - & - & - & - \tabularnewline
71 & 87.8 & - & - & - & - & - & - & - \tabularnewline
72 & 87.8 & - & - & - & - & - & - & - \tabularnewline
73 & 88 & - & - & - & - & - & - & - \tabularnewline
74 & 88.3 & - & - & - & - & - & - & - \tabularnewline
75 & 86.8 & - & - & - & - & - & - & - \tabularnewline
76 & 88 & - & - & - & - & - & - & - \tabularnewline
77 & 89 & - & - & - & - & - & - & - \tabularnewline
78 & 90.3 & - & - & - & - & - & - & - \tabularnewline
79 & 89.8 & - & - & - & - & - & - & - \tabularnewline
80 & 91 & - & - & - & - & - & - & - \tabularnewline
81 & NA & 91.2696 & 87.9799 & 94.6824 & NA & 0.5615 & 0.4702 & 0.5615 \tabularnewline
82 & NA & 91.3298 & 86.1842 & 96.7826 & NA & NA & 0.6964 & 0.5472 \tabularnewline
83 & NA & 91.3432 & 84.7884 & 98.4048 & NA & NA & 0.8373 & 0.5379 \tabularnewline
84 & NA & 91.3462 & 83.6411 & 99.7612 & NA & NA & 0.7956 & 0.5321 \tabularnewline
85 & NA & 91.3469 & 82.6564 & 100.9511 & NA & NA & 0.7527 & 0.5282 \tabularnewline
86 & NA & 91.347 & 81.7853 & 102.0267 & NA & NA & 0.712 & 0.5254 \tabularnewline
87 & NA & 91.3471 & 80.9985 & 103.0178 & NA & NA & 0.7775 & 0.5232 \tabularnewline
88 & NA & 91.3471 & 80.2771 & 103.9436 & NA & NA & 0.6987 & 0.5215 \tabularnewline
89 & NA & 91.3471 & 79.6083 & 104.8168 & NA & NA & 0.6336 & 0.5201 \tabularnewline
90 & NA & 91.3471 & 78.9831 & 105.6466 & NA & NA & 0.5571 & 0.519 \tabularnewline
91 & NA & 91.3471 & 78.3945 & 106.4397 & NA & NA & 0.5796 & 0.518 \tabularnewline
92 & NA & 91.3471 & 77.8376 & 107.2013 & NA & NA & 0.5171 & 0.5171 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4399&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[80])[/C][/ROW]
[ROW][C]68[/C][C]91.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]91.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]89.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]87.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]87.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]88.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]86.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]90.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]89.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]NA[/C][C]91.2696[/C][C]87.9799[/C][C]94.6824[/C][C]NA[/C][C]0.5615[/C][C]0.4702[/C][C]0.5615[/C][/ROW]
[ROW][C]82[/C][C]NA[/C][C]91.3298[/C][C]86.1842[/C][C]96.7826[/C][C]NA[/C][C]NA[/C][C]0.6964[/C][C]0.5472[/C][/ROW]
[ROW][C]83[/C][C]NA[/C][C]91.3432[/C][C]84.7884[/C][C]98.4048[/C][C]NA[/C][C]NA[/C][C]0.8373[/C][C]0.5379[/C][/ROW]
[ROW][C]84[/C][C]NA[/C][C]91.3462[/C][C]83.6411[/C][C]99.7612[/C][C]NA[/C][C]NA[/C][C]0.7956[/C][C]0.5321[/C][/ROW]
[ROW][C]85[/C][C]NA[/C][C]91.3469[/C][C]82.6564[/C][C]100.9511[/C][C]NA[/C][C]NA[/C][C]0.7527[/C][C]0.5282[/C][/ROW]
[ROW][C]86[/C][C]NA[/C][C]91.347[/C][C]81.7853[/C][C]102.0267[/C][C]NA[/C][C]NA[/C][C]0.712[/C][C]0.5254[/C][/ROW]
[ROW][C]87[/C][C]NA[/C][C]91.3471[/C][C]80.9985[/C][C]103.0178[/C][C]NA[/C][C]NA[/C][C]0.7775[/C][C]0.5232[/C][/ROW]
[ROW][C]88[/C][C]NA[/C][C]91.3471[/C][C]80.2771[/C][C]103.9436[/C][C]NA[/C][C]NA[/C][C]0.6987[/C][C]0.5215[/C][/ROW]
[ROW][C]89[/C][C]NA[/C][C]91.3471[/C][C]79.6083[/C][C]104.8168[/C][C]NA[/C][C]NA[/C][C]0.6336[/C][C]0.5201[/C][/ROW]
[ROW][C]90[/C][C]NA[/C][C]91.3471[/C][C]78.9831[/C][C]105.6466[/C][C]NA[/C][C]NA[/C][C]0.5571[/C][C]0.519[/C][/ROW]
[ROW][C]91[/C][C]NA[/C][C]91.3471[/C][C]78.3945[/C][C]106.4397[/C][C]NA[/C][C]NA[/C][C]0.5796[/C][C]0.518[/C][/ROW]
[ROW][C]92[/C][C]NA[/C][C]91.3471[/C][C]77.8376[/C][C]107.2013[/C][C]NA[/C][C]NA[/C][C]0.5171[/C][C]0.5171[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4399&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4399&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[80])
6891.4-------
6991.4-------
7089.9-------
7187.8-------
7287.8-------
7388-------
7488.3-------
7586.8-------
7688-------
7789-------
7890.3-------
7989.8-------
8091-------
81NA91.269687.979994.6824NA0.56150.47020.5615
82NA91.329886.184296.7826NANA0.69640.5472
83NA91.343284.788498.4048NANA0.83730.5379
84NA91.346283.641199.7612NANA0.79560.5321
85NA91.346982.6564100.9511NANA0.75270.5282
86NA91.34781.7853102.0267NANA0.7120.5254
87NA91.347180.9985103.0178NANA0.77750.5232
88NA91.347180.2771103.9436NANA0.69870.5215
89NA91.347179.6083104.8168NANA0.63360.5201
90NA91.347178.9831105.6466NANA0.55710.519
91NA91.347178.3945106.4397NANA0.57960.518
92NA91.347177.8376107.2013NANA0.51710.5171







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
810.0191NANANANANA
820.0305NANANANANA
830.0394NANANANANA
840.047NANANANANA
850.0536NANANANANA
860.0596NANANANANA
870.0652NANANANANA
880.0704NANANANANA
890.0752NANANANANA
900.0799NANANANANA
910.0843NANANANANA
920.0886NANANANANA

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
81 & 0.0191 & NA & NA & NA & NA & NA \tabularnewline
82 & 0.0305 & NA & NA & NA & NA & NA \tabularnewline
83 & 0.0394 & NA & NA & NA & NA & NA \tabularnewline
84 & 0.047 & NA & NA & NA & NA & NA \tabularnewline
85 & 0.0536 & NA & NA & NA & NA & NA \tabularnewline
86 & 0.0596 & NA & NA & NA & NA & NA \tabularnewline
87 & 0.0652 & NA & NA & NA & NA & NA \tabularnewline
88 & 0.0704 & NA & NA & NA & NA & NA \tabularnewline
89 & 0.0752 & NA & NA & NA & NA & NA \tabularnewline
90 & 0.0799 & NA & NA & NA & NA & NA \tabularnewline
91 & 0.0843 & NA & NA & NA & NA & NA \tabularnewline
92 & 0.0886 & NA & NA & NA & NA & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4399&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]81[/C][C]0.0191[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]82[/C][C]0.0305[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]83[/C][C]0.0394[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]84[/C][C]0.047[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]85[/C][C]0.0536[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]86[/C][C]0.0596[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]87[/C][C]0.0652[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]88[/C][C]0.0704[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]89[/C][C]0.0752[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]90[/C][C]0.0799[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]91[/C][C]0.0843[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]92[/C][C]0.0886[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4399&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4399&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
810.0191NANANANANA
820.0305NANANANANA
830.0394NANANANANA
840.047NANANANANA
850.0536NANANANANA
860.0596NANANANANA
870.0652NANANANANA
880.0704NANANANANA
890.0752NANANANANA
900.0799NANANANANA
910.0843NANANANANA
920.0886NANANANANA



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