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 computationSun, 18 Dec 2016 14:15:15 +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/18/t1482066931mkd50cukwamwb80.htm/, Retrieved Wed, 08 May 2024 10:07:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=301061, Retrieved Wed, 08 May 2024 10:07:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact83
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Exponential Smoothing] [] [2016-12-18 12:31:12] [683f400e1b95307fc738e729f07c4fce]
- RM D    [ARIMA Forecasting] [] [2016-12-18 13:15:15] [404ac5ee4f7301873f6a96ef36861981] [Current]
Feedback Forum

Post a new message
Dataseries X:
3425
3440
3500
3545
3580
3620
3645
3655
3670
3675
3665
3665
3740
3800
3820
3860
3845
3865
3900
4050
4165
4100
4075
4110
4170
4235
4320
4370
4460
4575
4510
4510
4525
4570
4670
4735
4730
4680
4725
4750
4750
4740
4780
4835
4865
4885
4915
4925
4970
5015
5030
5030
5010
4985
4955
5000
5005
4990
5015
5030
5125
5055
5055
5000
4980
4950
4985
4930
4945
4930
4920
4920
4965
4970
4955
5050
5065
5065
5065
5085
5065
4920
4880
4955
5005
5010
5025
5005
4975
4970
4980
4900
4885
4895
4845
4875
4825
4765
4730
4630
4540
4555
4520
4520
4505
4485
4455
4410
4345
4350
4315
4245
4215
4175
4110
4085




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301061&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]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=301061&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301061&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 time1 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[106])
1054505-------
1064485-------
10744554457.2564372.06374542.44820.47930.26160.26160.2616
10844104428.3754291.85394564.89620.3960.35110.35110.2081
10943454402.86964230.99724574.7420.25460.46760.46760.1745
11043504377.72984178.02224577.43730.39280.6260.6260.1462
11143154353.00944126.4994579.51980.37110.51040.51040.1267
11242454327.46684072.01294582.92080.26350.53810.53810.1134
11342154301.95464016.34024587.56890.27530.6520.6520.1045
11441754276.37553959.96294592.78820.2650.64810.64810.0981
11541104250.95853903.5434598.3740.21320.66590.66590.0934
11640854225.52653846.62114604.4320.23360.72490.72490.0898

\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[106]) \tabularnewline
105 & 4505 & - & - & - & - & - & - & - \tabularnewline
106 & 4485 & - & - & - & - & - & - & - \tabularnewline
107 & 4455 & 4457.256 & 4372.0637 & 4542.4482 & 0.4793 & 0.2616 & 0.2616 & 0.2616 \tabularnewline
108 & 4410 & 4428.375 & 4291.8539 & 4564.8962 & 0.396 & 0.3511 & 0.3511 & 0.2081 \tabularnewline
109 & 4345 & 4402.8696 & 4230.9972 & 4574.742 & 0.2546 & 0.4676 & 0.4676 & 0.1745 \tabularnewline
110 & 4350 & 4377.7298 & 4178.0222 & 4577.4373 & 0.3928 & 0.626 & 0.626 & 0.1462 \tabularnewline
111 & 4315 & 4353.0094 & 4126.499 & 4579.5198 & 0.3711 & 0.5104 & 0.5104 & 0.1267 \tabularnewline
112 & 4245 & 4327.4668 & 4072.0129 & 4582.9208 & 0.2635 & 0.5381 & 0.5381 & 0.1134 \tabularnewline
113 & 4215 & 4301.9546 & 4016.3402 & 4587.5689 & 0.2753 & 0.652 & 0.652 & 0.1045 \tabularnewline
114 & 4175 & 4276.3755 & 3959.9629 & 4592.7882 & 0.265 & 0.6481 & 0.6481 & 0.0981 \tabularnewline
115 & 4110 & 4250.9585 & 3903.543 & 4598.374 & 0.2132 & 0.6659 & 0.6659 & 0.0934 \tabularnewline
116 & 4085 & 4225.5265 & 3846.6211 & 4604.432 & 0.2336 & 0.7249 & 0.7249 & 0.0898 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301061&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[106])[/C][/ROW]
[ROW][C]105[/C][C]4505[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]4485[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]4455[/C][C]4457.256[/C][C]4372.0637[/C][C]4542.4482[/C][C]0.4793[/C][C]0.2616[/C][C]0.2616[/C][C]0.2616[/C][/ROW]
[ROW][C]108[/C][C]4410[/C][C]4428.375[/C][C]4291.8539[/C][C]4564.8962[/C][C]0.396[/C][C]0.3511[/C][C]0.3511[/C][C]0.2081[/C][/ROW]
[ROW][C]109[/C][C]4345[/C][C]4402.8696[/C][C]4230.9972[/C][C]4574.742[/C][C]0.2546[/C][C]0.4676[/C][C]0.4676[/C][C]0.1745[/C][/ROW]
[ROW][C]110[/C][C]4350[/C][C]4377.7298[/C][C]4178.0222[/C][C]4577.4373[/C][C]0.3928[/C][C]0.626[/C][C]0.626[/C][C]0.1462[/C][/ROW]
[ROW][C]111[/C][C]4315[/C][C]4353.0094[/C][C]4126.499[/C][C]4579.5198[/C][C]0.3711[/C][C]0.5104[/C][C]0.5104[/C][C]0.1267[/C][/ROW]
[ROW][C]112[/C][C]4245[/C][C]4327.4668[/C][C]4072.0129[/C][C]4582.9208[/C][C]0.2635[/C][C]0.5381[/C][C]0.5381[/C][C]0.1134[/C][/ROW]
[ROW][C]113[/C][C]4215[/C][C]4301.9546[/C][C]4016.3402[/C][C]4587.5689[/C][C]0.2753[/C][C]0.652[/C][C]0.652[/C][C]0.1045[/C][/ROW]
[ROW][C]114[/C][C]4175[/C][C]4276.3755[/C][C]3959.9629[/C][C]4592.7882[/C][C]0.265[/C][C]0.6481[/C][C]0.6481[/C][C]0.0981[/C][/ROW]
[ROW][C]115[/C][C]4110[/C][C]4250.9585[/C][C]3903.543[/C][C]4598.374[/C][C]0.2132[/C][C]0.6659[/C][C]0.6659[/C][C]0.0934[/C][/ROW]
[ROW][C]116[/C][C]4085[/C][C]4225.5265[/C][C]3846.6211[/C][C]4604.432[/C][C]0.2336[/C][C]0.7249[/C][C]0.7249[/C][C]0.0898[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301061&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301061&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[106])
1054505-------
1064485-------
10744554457.2564372.06374542.44820.47930.26160.26160.2616
10844104428.3754291.85394564.89620.3960.35110.35110.2081
10943454402.86964230.99724574.7420.25460.46760.46760.1745
11043504377.72984178.02224577.43730.39280.6260.6260.1462
11143154353.00944126.4994579.51980.37110.51040.51040.1267
11242454327.46684072.01294582.92080.26350.53810.53810.1134
11342154301.95464016.34024587.56890.27530.6520.6520.1045
11441754276.37553959.96294592.78820.2650.64810.64810.0981
11541104250.95853903.5434598.3740.21320.66590.66590.0934
11640854225.52653846.62114604.4320.23360.72490.72490.0898







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPEsMAPESq.EMSERMSEScaledEMASE
1070.0098-5e-045e-045e-045.089300-0.05340.0534
1080.0157-0.00420.00230.0023337.6418171.365613.0907-0.43520.2443
1090.0199-0.01330.0060.0063348.89381230.541635.0791-1.37060.6197
1100.0233-0.00640.00610.0061768.93941115.141133.3937-0.65680.629
1110.0265-0.00880.00660.00661444.71291181.055434.3665-0.90020.6832
1120.0301-0.01940.00880.00876800.77912117.676146.0182-1.95320.8949
1130.0339-0.02060.01050.01047561.09392895.307253.8081-2.05941.0613
1140.0378-0.02430.01220.012110277.00133818.018961.7901-2.4011.2287
1150.0417-0.03430.01460.014519869.30145601.494874.8431-3.33851.4631
1160.0458-0.03440.01660.016419747.70797016.116183.7623-3.32831.6497

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & sMAPE & Sq.E & MSE & RMSE & ScaledE & MASE \tabularnewline
107 & 0.0098 & -5e-04 & 5e-04 & 5e-04 & 5.0893 & 0 & 0 & -0.0534 & 0.0534 \tabularnewline
108 & 0.0157 & -0.0042 & 0.0023 & 0.0023 & 337.6418 & 171.3656 & 13.0907 & -0.4352 & 0.2443 \tabularnewline
109 & 0.0199 & -0.0133 & 0.006 & 0.006 & 3348.8938 & 1230.5416 & 35.0791 & -1.3706 & 0.6197 \tabularnewline
110 & 0.0233 & -0.0064 & 0.0061 & 0.0061 & 768.9394 & 1115.1411 & 33.3937 & -0.6568 & 0.629 \tabularnewline
111 & 0.0265 & -0.0088 & 0.0066 & 0.0066 & 1444.7129 & 1181.0554 & 34.3665 & -0.9002 & 0.6832 \tabularnewline
112 & 0.0301 & -0.0194 & 0.0088 & 0.0087 & 6800.7791 & 2117.6761 & 46.0182 & -1.9532 & 0.8949 \tabularnewline
113 & 0.0339 & -0.0206 & 0.0105 & 0.0104 & 7561.0939 & 2895.3072 & 53.8081 & -2.0594 & 1.0613 \tabularnewline
114 & 0.0378 & -0.0243 & 0.0122 & 0.0121 & 10277.0013 & 3818.0189 & 61.7901 & -2.401 & 1.2287 \tabularnewline
115 & 0.0417 & -0.0343 & 0.0146 & 0.0145 & 19869.3014 & 5601.4948 & 74.8431 & -3.3385 & 1.4631 \tabularnewline
116 & 0.0458 & -0.0344 & 0.0166 & 0.0164 & 19747.7079 & 7016.1161 & 83.7623 & -3.3283 & 1.6497 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301061&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]107[/C][C]0.0098[/C][C]-5e-04[/C][C]5e-04[/C][C]5e-04[/C][C]5.0893[/C][C]0[/C][C]0[/C][C]-0.0534[/C][C]0.0534[/C][/ROW]
[ROW][C]108[/C][C]0.0157[/C][C]-0.0042[/C][C]0.0023[/C][C]0.0023[/C][C]337.6418[/C][C]171.3656[/C][C]13.0907[/C][C]-0.4352[/C][C]0.2443[/C][/ROW]
[ROW][C]109[/C][C]0.0199[/C][C]-0.0133[/C][C]0.006[/C][C]0.006[/C][C]3348.8938[/C][C]1230.5416[/C][C]35.0791[/C][C]-1.3706[/C][C]0.6197[/C][/ROW]
[ROW][C]110[/C][C]0.0233[/C][C]-0.0064[/C][C]0.0061[/C][C]0.0061[/C][C]768.9394[/C][C]1115.1411[/C][C]33.3937[/C][C]-0.6568[/C][C]0.629[/C][/ROW]
[ROW][C]111[/C][C]0.0265[/C][C]-0.0088[/C][C]0.0066[/C][C]0.0066[/C][C]1444.7129[/C][C]1181.0554[/C][C]34.3665[/C][C]-0.9002[/C][C]0.6832[/C][/ROW]
[ROW][C]112[/C][C]0.0301[/C][C]-0.0194[/C][C]0.0088[/C][C]0.0087[/C][C]6800.7791[/C][C]2117.6761[/C][C]46.0182[/C][C]-1.9532[/C][C]0.8949[/C][/ROW]
[ROW][C]113[/C][C]0.0339[/C][C]-0.0206[/C][C]0.0105[/C][C]0.0104[/C][C]7561.0939[/C][C]2895.3072[/C][C]53.8081[/C][C]-2.0594[/C][C]1.0613[/C][/ROW]
[ROW][C]114[/C][C]0.0378[/C][C]-0.0243[/C][C]0.0122[/C][C]0.0121[/C][C]10277.0013[/C][C]3818.0189[/C][C]61.7901[/C][C]-2.401[/C][C]1.2287[/C][/ROW]
[ROW][C]115[/C][C]0.0417[/C][C]-0.0343[/C][C]0.0146[/C][C]0.0145[/C][C]19869.3014[/C][C]5601.4948[/C][C]74.8431[/C][C]-3.3385[/C][C]1.4631[/C][/ROW]
[ROW][C]116[/C][C]0.0458[/C][C]-0.0344[/C][C]0.0166[/C][C]0.0164[/C][C]19747.7079[/C][C]7016.1161[/C][C]83.7623[/C][C]-3.3283[/C][C]1.6497[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301061&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301061&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
1070.0098-5e-045e-045e-045.089300-0.05340.0534
1080.0157-0.00420.00230.0023337.6418171.365613.0907-0.43520.2443
1090.0199-0.01330.0060.0063348.89381230.541635.0791-1.37060.6197
1100.0233-0.00640.00610.0061768.93941115.141133.3937-0.65680.629
1110.0265-0.00880.00660.00661444.71291181.055434.3665-0.90020.6832
1120.0301-0.01940.00880.00876800.77912117.676146.0182-1.95320.8949
1130.0339-0.02060.01050.01047561.09392895.307253.8081-2.05941.0613
1140.0378-0.02430.01220.012110277.00133818.018961.7901-2.4011.2287
1150.0417-0.03430.01460.014519869.30145601.494874.8431-3.33851.4631
1160.0458-0.03440.01660.016419747.70797016.116183.7623-3.32831.6497



Parameters (Session):
par1 = 12 ; par2 = Double ; par3 = additive ; par4 = 12 ;
Parameters (R input):
par1 = 10 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 1 ; par6 = 3 ; par7 = 2 ; par8 = 1 ; 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*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')