Univariate Gaussian model with AR(1) latent process
Constructs a simple Gaussian model where the state dynamics follow an AR(1) process.
ar1_lg(y, rho, sigma, mu, sd_y, beta, xreg = NULL)
y |
Vector or a |
rho |
prior for autoregressive coefficient. |
sigma |
Prior for the standard deviation of noise of the AR-process. |
mu |
A fixed value or a prior for the stationary mean of the latent AR(1) process. Parameter is omitted if this is set to 0. |
sd_y |
Prior for the standard deviation of observation equation. |
beta |
Prior for the regression coefficients. |
xreg |
Matrix containing covariates. |
Object of class ar1_lg
.
model <- ar1_lg(BJsales, rho = uniform(0.5,-1,1), sigma = halfnormal(1, 10), mu = normal(200, 200, 100), sd_y = halfnormal(1, 10)) out <- run_mcmc(model, iter = 2e4) summary(out, return_se = TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.