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 computationFri, 16 Dec 2016 16:46:48 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2016/Dec/16/t148190322476y48ivgrb0qdit.htm/, Retrieved Fri, 01 Nov 2024 03:31:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=300390, Retrieved Fri, 01 Nov 2024 03:31:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact94
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [] [2016-12-16 13:36:55] [683f400e1b95307fc738e729f07c4fce]
-    D  [ARIMA Backward Selection] [] [2016-12-16 14:17:56] [683f400e1b95307fc738e729f07c4fce]
- R  D    [ARIMA Backward Selection] [] [2016-12-16 14:51:40] [683f400e1b95307fc738e729f07c4fce]
- RM D        [ARIMA Forecasting] [] [2016-12-16 15:46:48] [404ac5ee4f7301873f6a96ef36861981] [Current]
Feedback Forum

Post a new message
Dataseries X:
1880
3600
4600
6560
7840
8560
10120
9240
9320
7000
3960
4680
3920
1560
4800
5240
8000
9760
9800
9280
7680
7760
5680
4560
1560
3680
4200
7400
7040
8480
9720
9760
9440
7240
5080
4080
5120
4400
5160
6680
8240
8960
9280
9880
8480
7320
4880
5280
4080
4720
6360
5760
9000
9160
10480
10160
9120
7880
5080
4360
4480
6000
6120
6200
8960
8680
10240
10920
8440
7760
5320
3920
4040
2960
6280
6320
7160
8160




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time4 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300390&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]4 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=300390&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300390&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R ServerBig Analytics Cloud Computing Center







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[71])
595080-------
604360-------
614480-------
626000-------
636120-------
646200-------
658960-------
668680-------
6710240-------
6810920-------
698440-------
707760-------
715320-------
7239205122.85673504.83586740.87760.07250.40560.82230.4056
7340404076.86122455.86625697.85630.48220.57520.3130.0664
7429605133.6053497.3926769.81790.00460.90490.14970.4117
7562806403.00714754.1498051.86520.441910.63170.901
7663206150.7664494.44417807.0880.42060.43920.47680.8372
7771608977.74787315.588210639.90730.0160.99910.50831
7881608730.70197060.949510400.45430.25150.96740.52371

\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[71]) \tabularnewline
59 & 5080 & - & - & - & - & - & - & - \tabularnewline
60 & 4360 & - & - & - & - & - & - & - \tabularnewline
61 & 4480 & - & - & - & - & - & - & - \tabularnewline
62 & 6000 & - & - & - & - & - & - & - \tabularnewline
63 & 6120 & - & - & - & - & - & - & - \tabularnewline
64 & 6200 & - & - & - & - & - & - & - \tabularnewline
65 & 8960 & - & - & - & - & - & - & - \tabularnewline
66 & 8680 & - & - & - & - & - & - & - \tabularnewline
67 & 10240 & - & - & - & - & - & - & - \tabularnewline
68 & 10920 & - & - & - & - & - & - & - \tabularnewline
69 & 8440 & - & - & - & - & - & - & - \tabularnewline
70 & 7760 & - & - & - & - & - & - & - \tabularnewline
71 & 5320 & - & - & - & - & - & - & - \tabularnewline
72 & 3920 & 5122.8567 & 3504.8358 & 6740.8776 & 0.0725 & 0.4056 & 0.8223 & 0.4056 \tabularnewline
73 & 4040 & 4076.8612 & 2455.8662 & 5697.8563 & 0.4822 & 0.5752 & 0.313 & 0.0664 \tabularnewline
74 & 2960 & 5133.605 & 3497.392 & 6769.8179 & 0.0046 & 0.9049 & 0.1497 & 0.4117 \tabularnewline
75 & 6280 & 6403.0071 & 4754.149 & 8051.8652 & 0.4419 & 1 & 0.6317 & 0.901 \tabularnewline
76 & 6320 & 6150.766 & 4494.4441 & 7807.088 & 0.4206 & 0.4392 & 0.4768 & 0.8372 \tabularnewline
77 & 7160 & 8977.7478 & 7315.5882 & 10639.9073 & 0.016 & 0.9991 & 0.5083 & 1 \tabularnewline
78 & 8160 & 8730.7019 & 7060.9495 & 10400.4543 & 0.2515 & 0.9674 & 0.5237 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300390&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[71])[/C][/ROW]
[ROW][C]59[/C][C]5080[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]4360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]4480[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]6000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]6120[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]6200[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]8960[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]8680[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]10240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]10920[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]8440[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]7760[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]5320[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]3920[/C][C]5122.8567[/C][C]3504.8358[/C][C]6740.8776[/C][C]0.0725[/C][C]0.4056[/C][C]0.8223[/C][C]0.4056[/C][/ROW]
[ROW][C]73[/C][C]4040[/C][C]4076.8612[/C][C]2455.8662[/C][C]5697.8563[/C][C]0.4822[/C][C]0.5752[/C][C]0.313[/C][C]0.0664[/C][/ROW]
[ROW][C]74[/C][C]2960[/C][C]5133.605[/C][C]3497.392[/C][C]6769.8179[/C][C]0.0046[/C][C]0.9049[/C][C]0.1497[/C][C]0.4117[/C][/ROW]
[ROW][C]75[/C][C]6280[/C][C]6403.0071[/C][C]4754.149[/C][C]8051.8652[/C][C]0.4419[/C][C]1[/C][C]0.6317[/C][C]0.901[/C][/ROW]
[ROW][C]76[/C][C]6320[/C][C]6150.766[/C][C]4494.4441[/C][C]7807.088[/C][C]0.4206[/C][C]0.4392[/C][C]0.4768[/C][C]0.8372[/C][/ROW]
[ROW][C]77[/C][C]7160[/C][C]8977.7478[/C][C]7315.5882[/C][C]10639.9073[/C][C]0.016[/C][C]0.9991[/C][C]0.5083[/C][C]1[/C][/ROW]
[ROW][C]78[/C][C]8160[/C][C]8730.7019[/C][C]7060.9495[/C][C]10400.4543[/C][C]0.2515[/C][C]0.9674[/C][C]0.5237[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300390&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300390&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[71])
595080-------
604360-------
614480-------
626000-------
636120-------
646200-------
658960-------
668680-------
6710240-------
6810920-------
698440-------
707760-------
715320-------
7239205122.85673504.83586740.87760.07250.40560.82230.4056
7340404076.86122455.86625697.85630.48220.57520.3130.0664
7429605133.6053497.3926769.81790.00460.90490.14970.4117
7562806403.00714754.1498051.86520.441910.63170.901
7663206150.7664494.44417807.0880.42060.43920.47680.8372
7771608977.74787315.588210639.90730.0160.99910.50831
7881608730.70197060.949510400.45430.25150.96740.52371







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
720.1611-0.30690.30690.2661446864.19600-1.12771.1277
730.2029-0.00910.1580.13761358.7499724111.473850.9474-0.03460.5811
740.1626-0.73430.35010.27074724558.54482057593.83021434.4315-2.03781.0667
750.1314-0.01960.26750.207915130.74511546978.0591243.7757-0.11530.8288
760.13740.02680.21930.171828640.13221243310.47361115.03830.15870.6948
770.0945-0.25390.22510.18073304206.97631586793.22411259.6798-1.70410.863
780.0976-0.06990.20290.1645325700.62641406637.13871186.0173-0.5350.8162

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
72 & 0.1611 & -0.3069 & 0.3069 & 0.266 & 1446864.196 & 0 & 0 & -1.1277 & 1.1277 \tabularnewline
73 & 0.2029 & -0.0091 & 0.158 & 0.1376 & 1358.7499 & 724111.473 & 850.9474 & -0.0346 & 0.5811 \tabularnewline
74 & 0.1626 & -0.7343 & 0.3501 & 0.2707 & 4724558.5448 & 2057593.8302 & 1434.4315 & -2.0378 & 1.0667 \tabularnewline
75 & 0.1314 & -0.0196 & 0.2675 & 0.2079 & 15130.7451 & 1546978.059 & 1243.7757 & -0.1153 & 0.8288 \tabularnewline
76 & 0.1374 & 0.0268 & 0.2193 & 0.1718 & 28640.1322 & 1243310.4736 & 1115.0383 & 0.1587 & 0.6948 \tabularnewline
77 & 0.0945 & -0.2539 & 0.2251 & 0.1807 & 3304206.9763 & 1586793.2241 & 1259.6798 & -1.7041 & 0.863 \tabularnewline
78 & 0.0976 & -0.0699 & 0.2029 & 0.1645 & 325700.6264 & 1406637.1387 & 1186.0173 & -0.535 & 0.8162 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300390&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]sMAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][C]ScaledE[/C][C]MASE[/C][/ROW]
[ROW][C]72[/C][C]0.1611[/C][C]-0.3069[/C][C]0.3069[/C][C]0.266[/C][C]1446864.196[/C][C]0[/C][C]0[/C][C]-1.1277[/C][C]1.1277[/C][/ROW]
[ROW][C]73[/C][C]0.2029[/C][C]-0.0091[/C][C]0.158[/C][C]0.1376[/C][C]1358.7499[/C][C]724111.473[/C][C]850.9474[/C][C]-0.0346[/C][C]0.5811[/C][/ROW]
[ROW][C]74[/C][C]0.1626[/C][C]-0.7343[/C][C]0.3501[/C][C]0.2707[/C][C]4724558.5448[/C][C]2057593.8302[/C][C]1434.4315[/C][C]-2.0378[/C][C]1.0667[/C][/ROW]
[ROW][C]75[/C][C]0.1314[/C][C]-0.0196[/C][C]0.2675[/C][C]0.2079[/C][C]15130.7451[/C][C]1546978.059[/C][C]1243.7757[/C][C]-0.1153[/C][C]0.8288[/C][/ROW]
[ROW][C]76[/C][C]0.1374[/C][C]0.0268[/C][C]0.2193[/C][C]0.1718[/C][C]28640.1322[/C][C]1243310.4736[/C][C]1115.0383[/C][C]0.1587[/C][C]0.6948[/C][/ROW]
[ROW][C]77[/C][C]0.0945[/C][C]-0.2539[/C][C]0.2251[/C][C]0.1807[/C][C]3304206.9763[/C][C]1586793.2241[/C][C]1259.6798[/C][C]-1.7041[/C][C]0.863[/C][/ROW]
[ROW][C]78[/C][C]0.0976[/C][C]-0.0699[/C][C]0.2029[/C][C]0.1645[/C][C]325700.6264[/C][C]1406637.1387[/C][C]1186.0173[/C][C]-0.535[/C][C]0.8162[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300390&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300390&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.PEMAPEsMAPESq.EMSERMSEScaledEMASE
720.1611-0.30690.30690.2661446864.19600-1.12771.1277
730.2029-0.00910.1580.13761358.7499724111.473850.9474-0.03460.5811
740.1626-0.73430.35010.27074724558.54482057593.83021434.4315-2.03781.0667
750.1314-0.01960.26750.207915130.74511546978.0591243.7757-0.11530.8288
760.13740.02680.21930.171828640.13221243310.47361115.03830.15870.6948
770.0945-0.25390.22510.18073304206.97631586793.22411259.6798-1.70410.863
780.0976-0.06990.20290.1645325700.62641406637.13871186.0173-0.5350.8162



Parameters (Session):
par1 = FALSE ; par2 = 1 ; par3 = 2 ; par4 = 0 ; par5 = 1 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 0 ;
Parameters (R input):
par1 = 7 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 2 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
R code (references can be found in the software module):
par10 <- 'FALSE'
par9 <- '1'
par8 <- '2'
par7 <- '2'
par6 <- '3'
par5 <- '12'
par4 <- '1'
par3 <- '0'
par2 <- '1'
par1 <- '7'
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*2
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.spe <- array(0, dim=fx)
perf.scalederr <- array(0, dim=fx)
perf.mase <- array(0, dim=fx)
perf.mase1 <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.smape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.smape1 <- 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)
perf.scaleddenom <- 0
for (i in 2:fx) {
perf.scaleddenom = perf.scaleddenom + abs(x[nx+i] - x[nx+i-1])
}
perf.scaleddenom = perf.scaleddenom / (fx-1)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.scalederr[i] = (x[nx+i] - forecast$pred[i]) / perf.scaleddenom
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / x[nx+i]
perf.spe[i] = 2*(x[nx+i] - forecast$pred[i]) / (x[nx+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.smape[1] = abs(perf.spe[1])
perf.mape1[1] = perf.mape[1]
perf.smape1[1] = perf.smape[1]
perf.mse[1] = perf.se[1]
perf.mase[1] = abs(perf.scalederr[1])
perf.mase1[1] = perf.mase[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.smape[i] = perf.smape[i-1] + abs(perf.spe[i])
perf.smape1[i] = perf.smape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
perf.mase[i] = perf.mase[i-1] + abs(perf.scalederr[i])
perf.mase1[i] = perf.mase[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',10,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,'sMAPE',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.element(a,'ScaledE',1,header=TRUE)
a<-table.element(a,'MASE',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.smape1[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.element(a,round(perf.scalederr[i],4))
a<-table.element(a,round(perf.mase1[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')