Learn R Programming

brms (version 0.1.0)

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.

Arguments

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, brm.plot can be applied to visualize the obtained results making use of the ggmcmc package. Without having rstan installed, the function brm will return the Stan model, the required data, and the parameters of interest, which are the important prerequisites to fit the model in Stan. 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/.

See Also

rstan, stanfit