ardec.lm {ArDec} | R Documentation |
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.
ardec.lm(x) ardec.lm.bayes(x,R,med=TRUE)
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 |
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.
S. M. Barbosa
West, M. (1995), Bayesian inference in cyclical component dynamic linear models.Journal of the American Statistical Association, 90, 1301-1312.
data(tempEng) model=ardec.lm(tempEng)