| cor_bsts {brms} | R Documentation |
Add a basic Bayesian structural time series component to a brms model
cor_bsts(formula = ~1)
formula |
A one sided formula of the form |
Bayesian structural time series models offer an alternative to classical AR(I)MA models (they are in fact a generalization). The basic version currently implemented in brms introduces local level terms for each observation, whereas each local level term depends on the former local level term:
LL_t ~ N(LL_{t-1}, sigmaLL)
A simple introduction can be found in this blogpost: http://multithreaded.stitchfix.com/blog/2016/04/21/forget-arima/. More complicated Bayesian structural time series models may follow in the future.
An object of class cor_bsts.
## Not run: dat <- data.frame(y = rnorm(100), x = rnorm(100)) fit <- brm(y~x, data = dat, autocor = cor_bsts()) ## End(Not run)