Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 14 Dec 2008 06:28:07 -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/14/t1229261421yo1uo11vp9d15dk.htm/, Retrieved Wed, 15 May 2024 22:14:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33362, Retrieved Wed, 15 May 2024 22:14:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact164
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting...] [2008-12-14 13:28:07] [74a138e5b32af267311b5ad4cd13bf7e] [Current]
Feedback Forum

Post a new message
Dataseries X:
93,7
105,7
109,5
105,3
102,8
100,6
97,6
110,3
107,2
107,2
108,1
97,1
92,2
112,2
111,6
115,7
111,3
104,2
103,2
112,7
106,4
102,6
110,6
95,2
89
112,5
116,8
107,2
113,6
101,8
102,6
122,7
110,3
110,5
121,6
100,3
100,7
123,4
127,1
124,1
131,2
111,6
114,2
130,1
125,9
119
133,8
107,5
113,5
134,4
126,8
135,6
139,9
129,8
131
153,1
134,1
144,1
155,9
123,3
128,1
144,3
153
149,9
150,9
141
138,9
157,4
142,9
151,7
161
138,5
135,9
151,5
164
159,1
157
142,1
144,8
152,1
154,6
148,7
157,7
146,4
136,5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33362&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]1 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=33362&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33362&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 time1 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[85])
73135.9-------
74151.5-------
75164-------
76159.1-------
77157-------
78142.1-------
79144.8-------
80152.1-------
81154.6-------
82148.7-------
83157.7-------
84146.4-------
85136.5-------
86NA154.1479142.0922167.0082NA0.99640.65670.9964
87NA166.8998153.7886180.8903NANA0.65771
88NA161.9304147.7753177.1499NANA0.64230.9995
89NA159.8005144.5814176.275NANA0.63050.9972
90NA144.6861129.6139161.129NANA0.62110.8354
91NA147.4253131.1548165.2719NANA0.61350.8849
92NA154.8305136.9587174.5211NANA0.60710.966
93NA157.3663138.3571178.4096NANA0.60170.974
94NA151.3816132.1335172.8103NANA0.59690.9133
95NA160.5105139.5006183.9787NANA0.59280.9775
96NA149.0484128.5214172.1184NANA0.5890.8568
97NA139.0044118.9354161.6956NANA0.58560.5856

\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[85]) \tabularnewline
73 & 135.9 & - & - & - & - & - & - & - \tabularnewline
74 & 151.5 & - & - & - & - & - & - & - \tabularnewline
75 & 164 & - & - & - & - & - & - & - \tabularnewline
76 & 159.1 & - & - & - & - & - & - & - \tabularnewline
77 & 157 & - & - & - & - & - & - & - \tabularnewline
78 & 142.1 & - & - & - & - & - & - & - \tabularnewline
79 & 144.8 & - & - & - & - & - & - & - \tabularnewline
80 & 152.1 & - & - & - & - & - & - & - \tabularnewline
81 & 154.6 & - & - & - & - & - & - & - \tabularnewline
82 & 148.7 & - & - & - & - & - & - & - \tabularnewline
83 & 157.7 & - & - & - & - & - & - & - \tabularnewline
84 & 146.4 & - & - & - & - & - & - & - \tabularnewline
85 & 136.5 & - & - & - & - & - & - & - \tabularnewline
86 & NA & 154.1479 & 142.0922 & 167.0082 & NA & 0.9964 & 0.6567 & 0.9964 \tabularnewline
87 & NA & 166.8998 & 153.7886 & 180.8903 & NA & NA & 0.6577 & 1 \tabularnewline
88 & NA & 161.9304 & 147.7753 & 177.1499 & NA & NA & 0.6423 & 0.9995 \tabularnewline
89 & NA & 159.8005 & 144.5814 & 176.275 & NA & NA & 0.6305 & 0.9972 \tabularnewline
90 & NA & 144.6861 & 129.6139 & 161.129 & NA & NA & 0.6211 & 0.8354 \tabularnewline
91 & NA & 147.4253 & 131.1548 & 165.2719 & NA & NA & 0.6135 & 0.8849 \tabularnewline
92 & NA & 154.8305 & 136.9587 & 174.5211 & NA & NA & 0.6071 & 0.966 \tabularnewline
93 & NA & 157.3663 & 138.3571 & 178.4096 & NA & NA & 0.6017 & 0.974 \tabularnewline
94 & NA & 151.3816 & 132.1335 & 172.8103 & NA & NA & 0.5969 & 0.9133 \tabularnewline
95 & NA & 160.5105 & 139.5006 & 183.9787 & NA & NA & 0.5928 & 0.9775 \tabularnewline
96 & NA & 149.0484 & 128.5214 & 172.1184 & NA & NA & 0.589 & 0.8568 \tabularnewline
97 & NA & 139.0044 & 118.9354 & 161.6956 & NA & NA & 0.5856 & 0.5856 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33362&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[85])[/C][/ROW]
[ROW][C]73[/C][C]135.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]151.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]164[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]159.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]157[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]142.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]144.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]152.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]154.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]148.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]157.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]146.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]136.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]NA[/C][C]154.1479[/C][C]142.0922[/C][C]167.0082[/C][C]NA[/C][C]0.9964[/C][C]0.6567[/C][C]0.9964[/C][/ROW]
[ROW][C]87[/C][C]NA[/C][C]166.8998[/C][C]153.7886[/C][C]180.8903[/C][C]NA[/C][C]NA[/C][C]0.6577[/C][C]1[/C][/ROW]
[ROW][C]88[/C][C]NA[/C][C]161.9304[/C][C]147.7753[/C][C]177.1499[/C][C]NA[/C][C]NA[/C][C]0.6423[/C][C]0.9995[/C][/ROW]
[ROW][C]89[/C][C]NA[/C][C]159.8005[/C][C]144.5814[/C][C]176.275[/C][C]NA[/C][C]NA[/C][C]0.6305[/C][C]0.9972[/C][/ROW]
[ROW][C]90[/C][C]NA[/C][C]144.6861[/C][C]129.6139[/C][C]161.129[/C][C]NA[/C][C]NA[/C][C]0.6211[/C][C]0.8354[/C][/ROW]
[ROW][C]91[/C][C]NA[/C][C]147.4253[/C][C]131.1548[/C][C]165.2719[/C][C]NA[/C][C]NA[/C][C]0.6135[/C][C]0.8849[/C][/ROW]
[ROW][C]92[/C][C]NA[/C][C]154.8305[/C][C]136.9587[/C][C]174.5211[/C][C]NA[/C][C]NA[/C][C]0.6071[/C][C]0.966[/C][/ROW]
[ROW][C]93[/C][C]NA[/C][C]157.3663[/C][C]138.3571[/C][C]178.4096[/C][C]NA[/C][C]NA[/C][C]0.6017[/C][C]0.974[/C][/ROW]
[ROW][C]94[/C][C]NA[/C][C]151.3816[/C][C]132.1335[/C][C]172.8103[/C][C]NA[/C][C]NA[/C][C]0.5969[/C][C]0.9133[/C][/ROW]
[ROW][C]95[/C][C]NA[/C][C]160.5105[/C][C]139.5006[/C][C]183.9787[/C][C]NA[/C][C]NA[/C][C]0.5928[/C][C]0.9775[/C][/ROW]
[ROW][C]96[/C][C]NA[/C][C]149.0484[/C][C]128.5214[/C][C]172.1184[/C][C]NA[/C][C]NA[/C][C]0.589[/C][C]0.8568[/C][/ROW]
[ROW][C]97[/C][C]NA[/C][C]139.0044[/C][C]118.9354[/C][C]161.6956[/C][C]NA[/C][C]NA[/C][C]0.5856[/C][C]0.5856[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33362&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33362&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[85])
73135.9-------
74151.5-------
75164-------
76159.1-------
77157-------
78142.1-------
79144.8-------
80152.1-------
81154.6-------
82148.7-------
83157.7-------
84146.4-------
85136.5-------
86NA154.1479142.0922167.0082NA0.99640.65670.9964
87NA166.8998153.7886180.8903NANA0.65771
88NA161.9304147.7753177.1499NANA0.64230.9995
89NA159.8005144.5814176.275NANA0.63050.9972
90NA144.6861129.6139161.129NANA0.62110.8354
91NA147.4253131.1548165.2719NANA0.61350.8849
92NA154.8305136.9587174.5211NANA0.60710.966
93NA157.3663138.3571178.4096NANA0.60170.974
94NA151.3816132.1335172.8103NANA0.59690.9133
95NA160.5105139.5006183.9787NANA0.59280.9775
96NA149.0484128.5214172.1184NANA0.5890.8568
97NA139.0044118.9354161.6956NANA0.58560.5856







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.0426NANANANANA
870.0428NANANANANA
880.048NANANANANA
890.0526NANANANANA
900.058NANANANANA
910.0618NANANANANA
920.0649NANANANANA
930.0682NANANANANA
940.0722NANANANANA
950.0746NANANANANA
960.079NANANANANA
970.0833NANANANANA

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & 0.0426 & NA & NA & NA & NA & NA \tabularnewline
87 & 0.0428 & NA & NA & NA & NA & NA \tabularnewline
88 & 0.048 & NA & NA & NA & NA & NA \tabularnewline
89 & 0.0526 & NA & NA & NA & NA & NA \tabularnewline
90 & 0.058 & NA & NA & NA & NA & NA \tabularnewline
91 & 0.0618 & NA & NA & NA & NA & NA \tabularnewline
92 & 0.0649 & NA & NA & NA & NA & NA \tabularnewline
93 & 0.0682 & NA & NA & NA & NA & NA \tabularnewline
94 & 0.0722 & NA & NA & NA & NA & NA \tabularnewline
95 & 0.0746 & NA & NA & NA & NA & NA \tabularnewline
96 & 0.079 & NA & NA & NA & NA & NA \tabularnewline
97 & 0.0833 & NA & NA & NA & NA & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33362&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]86[/C][C]0.0426[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]87[/C][C]0.0428[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]88[/C][C]0.048[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]89[/C][C]0.0526[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]90[/C][C]0.058[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]91[/C][C]0.0618[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]92[/C][C]0.0649[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]93[/C][C]0.0682[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]94[/C][C]0.0722[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]95[/C][C]0.0746[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]96[/C][C]0.079[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]97[/C][C]0.0833[/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=33362&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33362&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
860.0426NANANANANA
870.0428NANANANANA
880.048NANANANANA
890.0526NANANANANA
900.058NANANANANA
910.0618NANANANANA
920.0649NANANANANA
930.0682NANANANANA
940.0722NANANANANA
950.0746NANANANANA
960.079NANANANANA
970.0833NANANANANA



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