Skip to contents

Builds a one-row list of brms model components (formula, family, prior, and stanvars suitable for assembling a fit_grid via model_grid(). Inputs are validated at construction so errors surface before compilation.

Usage

brms_model(formula, family = NULL, prior = NULL, stanvars = NULL)

Arguments

formula

A formula or brmsformula.

family

A brms family (e.g. gaussian(), student()), or NULL for the brms default.

prior

A brms prior object, or NULL.

stanvars

A brms stanvars object, or NULL.

Value

A named list with elements formula, family, prior, stanvars.

See also

Examples

if (FALSE) { # \dontrun{
brms_model(y ~ x, family = gaussian())
} # }