brms-package: Bayesian Regression Models using Stan
Description
The brms package provides an interface to fit Bayesian generalized linear mixed models using Stan,
which is a C++ package for obtaining Bayesian inference using the No-U-turn sampler (see http://mc-stan.org/). The formula syntax is very similar to that of the package lme4 to provide a familiar and simple interface for performing regression analyses.Details
The main function of the brms package is brm
, which creates the model in Stan language and fits it using the package rstan, if installed. Subsequently, methods suchs as summary
or plot
can be applied to investigate the obtained results
Without having rstan installed, the function brm
will not return posterior samples, but all prerequisites to fit the model in Stan, such as the model code and the relevant data. If rstan is installed, the model is fitted automatically. Unfortunately, rstan has to be installed manually, as it is not on CRAN, yet. However, the developers of Stan and rstan are currently working on a version to be uploaded on CRAN. In the meantime, instructions on how to install rstan can be found at https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started.References
The Stan Development Team Stan Modeling Language User's Guide and Reference Manual. http://mc-stan.org/.