ardec.lm {ArDec}R Documentation

Fit an autoregressive model as a linear regression

Description

Function ardec.lm fits an autoregressive model of order p, AR(p) to a time series through a linear least squares regression.

Function ardec.lm.bayes provides a sample of autoregressive parameters from the multivariate normal posterior distribution for the coefficients assuming a (non-informative) reference prior.

Usage

ardec.lm(x)

ardec.lm.bayes(x,R,med=TRUE)

Arguments

x time series
R size of sample to be simulated from posterior
med logical, indicating if a median vector of autoregressive parameters should be computed from the simulated sample

Value

For ardec.lm, an object of class "lm".
For ardec.lm.bayes an Rxp matrix containing the samples of autoregressive coefficients as columns (if med=FALSE).
If med=TRUE, ardec.lm.bayes returns a single column matrix containing the median vector of autoregressive parameters.

Author(s)

S. M. Barbosa

References

West, M. (1995), Bayesian inference in cyclical component dynamic linear models.Journal of the American Statistical Association, 90, 1301-1312.

See Also

ar, lm

Examples

data(tempEng)
model=ardec.lm(tempEng)

[Package ArDec version 1.1-3 Index]