Learn R Programming

bssm (version 0.1.8)

ar1: Univariate Gaussian model with AR(1) latent process

Description

Constructs a simple Gaussian model where the state dynamics follow an AR(1) process.

Usage

ar1(y, rho, sigma, mu, sd_y, beta, xreg = NULL)

Arguments

y

Vector or a ts object of observations.

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.

Value

Object of class ar1.