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 computationMon, 15 Dec 2008 14:12:42 -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/15/t1229375611q83wcz9b73svm1r.htm/, Retrieved Wed, 15 May 2024 00:34:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33825, Retrieved Wed, 15 May 2024 00:34:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact172
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [foutmelding arima...] [2008-12-12 15:06:09] [e43247bc0ab243a5af99ac7f55ba0b41]
F RMP   [ARIMA Forecasting] [stap 1 forecast] [2008-12-15 17:32:42] [e43247bc0ab243a5af99ac7f55ba0b41]
-    D      [ARIMA Forecasting] [voorspelling met ...] [2008-12-15 21:12:42] [f24298b2e4c2a19d76cf4460ec5d2246] [Current]
Feedback Forum

Post a new message
Dataseries X:
6,5
6,3
5,9
5,5
5,2
4,9
5,4
5,8
5,6
5,6
5,5
5,4
5,4
5,4
5,5
5,7
5,7
5,4
5,6
5,8
6,1
6,8
6,7
6,7
6,4
6,3
6,3
6,4
6,3
6
6,2
6,3
6,6
7,5
7,8
7,9
7,8
7,6
7,5
7,6
7,5
7,3
7,6
7,5
7,6
7,9
7,9
8,1
8,2
8
7,5
6,8
6,5
6,6
7,6
8
8
7,7
7,5
7,6
7,7
7,9
7,8
7,5
7,5
7,1
7,5
7,5
7,6
7,7
7,7
7,9
8,1
8,2
8,2
8,1
7,9
7,3
6,9
6,6
6,7
6,9
7
7,1
7,2
7,1
6,9
7
6,8
6,4
6,7
6,7
6,4
6,3
6,2
6,5
6,8
6,8
6,5
6,3
5,9
5,9
6,4
6,4
6,5
6,5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33825&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33825&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33825&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
946.3-------
956.2-------
966.5-------
976.8-------
986.8-------
996.5-------
1006.3-------
1015.9-------
1025.9-------
1036.4-------
1046.4-------
1056.5-------
1066.5-------
107NA6.44135.8946.9457NA0.40980.82580.4098
108NA6.57175.79997.2619NANA0.58070.5807
109NA6.70445.76677.5261NANA0.40980.687
110NA6.72445.63167.663NANA0.43730.6803
111NA6.62725.36877.6822NANA0.59340.5934
112NA6.50615.07867.6725NANA0.63550.5041
113NA6.35114.74067.6288NANA0.75550.4097
114NA6.39154.66427.7426NANA0.76210.4375
115NA6.50384.69527.9091NANA0.55760.5021
116NA6.48564.55117.9632NANA0.54520.4924
117NA6.59474.59328.1168NANA0.54850.5485
118NA6.62114.52238.1992NANA0.55980.5598

\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
94 & 6.3 & - & - & - & - & - & - & - \tabularnewline
95 & 6.2 & - & - & - & - & - & - & - \tabularnewline
96 & 6.5 & - & - & - & - & - & - & - \tabularnewline
97 & 6.8 & - & - & - & - & - & - & - \tabularnewline
98 & 6.8 & - & - & - & - & - & - & - \tabularnewline
99 & 6.5 & - & - & - & - & - & - & - \tabularnewline
100 & 6.3 & - & - & - & - & - & - & - \tabularnewline
101 & 5.9 & - & - & - & - & - & - & - \tabularnewline
102 & 5.9 & - & - & - & - & - & - & - \tabularnewline
103 & 6.4 & - & - & - & - & - & - & - \tabularnewline
104 & 6.4 & - & - & - & - & - & - & - \tabularnewline
105 & 6.5 & - & - & - & - & - & - & - \tabularnewline
106 & 6.5 & - & - & - & - & - & - & - \tabularnewline
107 & NA & 6.4413 & 5.894 & 6.9457 & NA & 0.4098 & 0.8258 & 0.4098 \tabularnewline
108 & NA & 6.5717 & 5.7999 & 7.2619 & NA & NA & 0.5807 & 0.5807 \tabularnewline
109 & NA & 6.7044 & 5.7667 & 7.5261 & NA & NA & 0.4098 & 0.687 \tabularnewline
110 & NA & 6.7244 & 5.6316 & 7.663 & NA & NA & 0.4373 & 0.6803 \tabularnewline
111 & NA & 6.6272 & 5.3687 & 7.6822 & NA & NA & 0.5934 & 0.5934 \tabularnewline
112 & NA & 6.5061 & 5.0786 & 7.6725 & NA & NA & 0.6355 & 0.5041 \tabularnewline
113 & NA & 6.3511 & 4.7406 & 7.6288 & NA & NA & 0.7555 & 0.4097 \tabularnewline
114 & NA & 6.3915 & 4.6642 & 7.7426 & NA & NA & 0.7621 & 0.4375 \tabularnewline
115 & NA & 6.5038 & 4.6952 & 7.9091 & NA & NA & 0.5576 & 0.5021 \tabularnewline
116 & NA & 6.4856 & 4.5511 & 7.9632 & NA & NA & 0.5452 & 0.4924 \tabularnewline
117 & NA & 6.5947 & 4.5932 & 8.1168 & NA & NA & 0.5485 & 0.5485 \tabularnewline
118 & NA & 6.6211 & 4.5223 & 8.1992 & NA & NA & 0.5598 & 0.5598 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33825&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]94[/C][C]6.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]6.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]6.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]5.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]5.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]NA[/C][C]6.4413[/C][C]5.894[/C][C]6.9457[/C][C]NA[/C][C]0.4098[/C][C]0.8258[/C][C]0.4098[/C][/ROW]
[ROW][C]108[/C][C]NA[/C][C]6.5717[/C][C]5.7999[/C][C]7.2619[/C][C]NA[/C][C]NA[/C][C]0.5807[/C][C]0.5807[/C][/ROW]
[ROW][C]109[/C][C]NA[/C][C]6.7044[/C][C]5.7667[/C][C]7.5261[/C][C]NA[/C][C]NA[/C][C]0.4098[/C][C]0.687[/C][/ROW]
[ROW][C]110[/C][C]NA[/C][C]6.7244[/C][C]5.6316[/C][C]7.663[/C][C]NA[/C][C]NA[/C][C]0.4373[/C][C]0.6803[/C][/ROW]
[ROW][C]111[/C][C]NA[/C][C]6.6272[/C][C]5.3687[/C][C]7.6822[/C][C]NA[/C][C]NA[/C][C]0.5934[/C][C]0.5934[/C][/ROW]
[ROW][C]112[/C][C]NA[/C][C]6.5061[/C][C]5.0786[/C][C]7.6725[/C][C]NA[/C][C]NA[/C][C]0.6355[/C][C]0.5041[/C][/ROW]
[ROW][C]113[/C][C]NA[/C][C]6.3511[/C][C]4.7406[/C][C]7.6288[/C][C]NA[/C][C]NA[/C][C]0.7555[/C][C]0.4097[/C][/ROW]
[ROW][C]114[/C][C]NA[/C][C]6.3915[/C][C]4.6642[/C][C]7.7426[/C][C]NA[/C][C]NA[/C][C]0.7621[/C][C]0.4375[/C][/ROW]
[ROW][C]115[/C][C]NA[/C][C]6.5038[/C][C]4.6952[/C][C]7.9091[/C][C]NA[/C][C]NA[/C][C]0.5576[/C][C]0.5021[/C][/ROW]
[ROW][C]116[/C][C]NA[/C][C]6.4856[/C][C]4.5511[/C][C]7.9632[/C][C]NA[/C][C]NA[/C][C]0.5452[/C][C]0.4924[/C][/ROW]
[ROW][C]117[/C][C]NA[/C][C]6.5947[/C][C]4.5932[/C][C]8.1168[/C][C]NA[/C][C]NA[/C][C]0.5485[/C][C]0.5485[/C][/ROW]
[ROW][C]118[/C][C]NA[/C][C]6.6211[/C][C]4.5223[/C][C]8.1992[/C][C]NA[/C][C]NA[/C][C]0.5598[/C][C]0.5598[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33825&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33825&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])
946.3-------
956.2-------
966.5-------
976.8-------
986.8-------
996.5-------
1006.3-------
1015.9-------
1025.9-------
1036.4-------
1046.4-------
1056.5-------
1066.5-------
107NA6.44135.8946.9457NA0.40980.82580.4098
108NA6.57175.79997.2619NANA0.58070.5807
109NA6.70445.76677.5261NANA0.40980.687
110NA6.72445.63167.663NANA0.43730.6803
111NA6.62725.36877.6822NANA0.59340.5934
112NA6.50615.07867.6725NANA0.63550.5041
113NA6.35114.74067.6288NANA0.75550.4097
114NA6.39154.66427.7426NANA0.76210.4375
115NA6.50384.69527.9091NANA0.55760.5021
116NA6.48564.55117.9632NANA0.54520.4924
117NA6.59474.59328.1168NANA0.54850.5485
118NA6.62114.52238.1992NANA0.55980.5598







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1070.0399NANANANANA
1080.0536NANANANANA
1090.0625NANANANANA
1100.0712NANANANANA
1110.0812NANANANANA
1120.0915NANANANANA
1130.1026NANANANANA
1140.1079NANANANANA
1150.1102NANANANANA
1160.1162NANANANANA
1170.1178NANANANANA
1180.1216NANANANANA

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
107 & 0.0399 & NA & NA & NA & NA & NA \tabularnewline
108 & 0.0536 & NA & NA & NA & NA & NA \tabularnewline
109 & 0.0625 & NA & NA & NA & NA & NA \tabularnewline
110 & 0.0712 & NA & NA & NA & NA & NA \tabularnewline
111 & 0.0812 & NA & NA & NA & NA & NA \tabularnewline
112 & 0.0915 & NA & NA & NA & NA & NA \tabularnewline
113 & 0.1026 & NA & NA & NA & NA & NA \tabularnewline
114 & 0.1079 & NA & NA & NA & NA & NA \tabularnewline
115 & 0.1102 & NA & NA & NA & NA & NA \tabularnewline
116 & 0.1162 & NA & NA & NA & NA & NA \tabularnewline
117 & 0.1178 & NA & NA & NA & NA & NA \tabularnewline
118 & 0.1216 & NA & NA & NA & NA & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33825&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]107[/C][C]0.0399[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]108[/C][C]0.0536[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]109[/C][C]0.0625[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]110[/C][C]0.0712[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]111[/C][C]0.0812[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]112[/C][C]0.0915[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]113[/C][C]0.1026[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]114[/C][C]0.1079[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]115[/C][C]0.1102[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]116[/C][C]0.1162[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]117[/C][C]0.1178[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C]118[/C][C]0.1216[/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=33825&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33825&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
1070.0399NANANANANA
1080.0536NANANANANA
1090.0625NANANANANA
1100.0712NANANANANA
1110.0812NANANANANA
1120.0915NANANANANA
1130.1026NANANANANA
1140.1079NANANANANA
1150.1102NANANANANA
1160.1162NANANANANA
1170.1178NANANANANA
1180.1216NANANANANA



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