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, method = "burg", na.action = na.contiguous) ardec.lm.bayes(x, method = "burg", na.action = na.contiguous, R, med = TRUE, seed = 1)
x |
time series |
method |
method used to fit the model ("yule-walker", "burg", "ols", "mle", "yw"); defaults to "burg" |
na.action |
function to be called to handle missing values; defaults to na.contiguous |
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 |
seed |
integer for set.seed |
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
data(tempEng) model=ardec.lm(tempEng)