bsubst: Bayesian Type All Subset Analysis

bsubstR 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

1 : autoregressive model,
2 : polynomial type non-linear model (lag's read in),
3 : polynomial type non-linear model (lag's automatically set),
4 : AR-model with polynomial mean value function,
5,6,7 : originally defined but omitted here.
lag

maximum time lag. Default is 2 \sqrt{n}, where n is the length of the time series y.

nreg

number of regressors.

reg

specification of regressor (mtype = 2).
i-th regressor is defined by z(n-L1(i)) \times z(n-L2(i)) \times z(n-L3(i)), where L1(i) is reg(1,i), L2(i) is reg(2,i) and L3(i) is reg(3,i). 0-lag term z(n-0) is replaced by the constant 1.

term.lag

maximum time lag specify the regressors (L1(i),L2(i),L3(i)) (i=1,...,nreg) (mtype = 3).

term.lag[1] : maximum time lag of linear term
term.lag[2] : maximum time lag of squared term
term.lag[3] : maximum time lag of quadratic crosses term
term.lag[4] : maximum time lag of cubic term
term.lag[5] : maximum time lag of cubic cross term.
cstep

prediction errors checking (up to cstep-steps ahead) is requested. (mtype = 1, 2, 3).

plot

logical. If TRUE (default), daic, perr and peautcor are plotted.

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 y.

yvar

variance of y.

v

innovation variance.

aic

AIC(m), (m=0, ... nreg).

aicmin

minimum AIC.

daic

AIC(m)-aicmin (m=0, ... nreg).

order.maice

order of minimum AIC.

v.maice

innovation variance attained at order.maice.

arcoef.maice

AR coefficients attained at order.maice.

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 in order of increasing magnitude.

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

= 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 (mtype = 1).

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

timsac documentation built on Sept. 30, 2023, 5:06 p.m.