| bsubst {timsac} | R Documentation | 
Bayesian Type All Subset Analysis
Description
Produce Bayesian estimates of time series models such as pure AR models, AR models with non-linear terms, AR models with polynomial type mean value functions, etc. The goodness of fit of a model is checked by the analysis of several steps ahead prediction errors.
Usage
bsubst(y, mtype, lag = NULL, nreg, reg = NULL, term.lag = NULL, cstep = 5,
       plot = TRUE)
Arguments
y | 
 a univariate time series.  | ||||||||||
mtype | 
 model type. Allowed values are 
  | ||||||||||
lag | 
 maximum time lag. Default is   | ||||||||||
nreg | 
 number of regressors.  | ||||||||||
reg | 
 specification of regressor (  | ||||||||||
term.lag | 
 maximum time lag specify the regressors
( 
  | ||||||||||
cstep | 
 prediction errors checking (up to   | ||||||||||
plot | 
 logical. If   | 
Details
The AR model is given by ( mtype = 2 )
y(t) = a(1)y(t-1) + ... + a(p)y(t-p) + u(t).
The non-linear model is given by ( mtype = 2, 3 )
y(t) = a(1)z(t,1) + a(2)z(t,2) + ... + a(p)z(t,p) + u(t).
Where p is AR order and u(t) is Gaussian white noise with mean
0 and variance v(p).
Value
ymean | 
 mean of   | 
yvar | 
 variance of   | 
v | 
 innovation variance.  | 
aic | 
 AIC(m), (m=0,  ...   | 
aicmin | 
 minimum AIC.  | 
daic | 
 AIC(m)-  | 
order.maice | 
 order of minimum AIC.  | 
v.maice | 
 innovation variance attained at   | 
arcoef.maice | 
 AR coefficients attained at   | 
v.bay | 
 residual variance of Bayesian model.  | 
aic.bay | 
 AIC of Bayesian model.  | 
np.bay | 
 equivalent number of parameters.  | 
arcoef.bay | 
 AR coefficients of Bayesian model.  | 
ind.c | 
 index of   | 
parcor2 | 
 square of partial correlations (normalized by multiplying N).  | 
damp | 
 binomial type damper.  | 
bweight | 
 final Bayesian weights of partial correlations.  | 
parcor.bay | 
 partial correlations of the Bayesian model.  | 
eicmin | 
 minimum EIC.  | 
esum | 
 whole subset regression models.  | 
npmean | 
 mean of number of parameter.  | 
npmean.nreg | 
 =   | 
perr | 
 prediction error.  | 
mean | 
 mean.  | 
var | 
 variance.  | 
skew | 
 skewness.  | 
peak | 
 peakedness.  | 
peautcor | 
 autocorrelation function of 1-step ahead prediction error.  | 
pspec | 
 power spectrum (  | 
References
H.Akaike, G.Kitagawa, E.Arahata and F.Tada (1979) Computer Science Monograph, No.11, Timsac78. The Institute of Statistical Mathematics.
Examples
data(Canadianlynx)
Regressor <- matrix(
     c( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 1, 3, 1, 2, 3,
        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,  0,  0, 1, 2, 2, 3, 1, 2, 3,
        0, 0, 0, 0, 0, 0, 0, 0, 0,  0,  0,  0, 0, 0, 0, 0, 1, 2, 3 ),
     nrow = 3, ncol = 19, byrow = TRUE)
z <- bsubst(Canadianlynx, mtype = 2, lag = 12, nreg = 19, Regressor)
z$arcoef.bay