Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mvbrmsformula

Set up a multivariate model formula for use in brms


Description

Set up a multivariate model formula for use in the brms package allowing to define (potentially non-linear) additive multilevel models for all parameters of the assumed response distributions.

Usage

mvbrmsformula(..., flist = NULL, rescor = NULL)

Arguments

...

Objects of class formula or brmsformula, each specifying a univariate model. See brmsformula for details on how to specify univariate models.

flist

Optional list of formulas, which are treated in the same way as formulas passed via the ... argument.

rescor

Logical; Indicates if residual correlation between the response variables should be modeled. Currently, this is only possible in multivariate gaussian and student models. If NULL (the default), rescor is internally set to TRUE when possible.

Details

See vignette("brms_multivariate") for a case study.

Value

An object of class mvbrmsformula, which is essentially a list containing all model formulas as well as some additional information for multivariate models.

See Also

Examples

bf1 <- bf(y1 ~ x + (1|g))
bf2 <- bf(y2 ~ s(z))
mvbf(bf1, bf2)

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.