brms (version 2.21.0)

standata: Stan data for Bayesian models

Description

standata is a generic function that can be used to generate data for Bayesian models to be passed to Stan. Its original use is within the brms package, but new methods for use with objects from other packages can be registered to the same generic.

Usage

standata(object, ...)

make_standata(formula, ...)

Value

A named list of objects containing the required data to fit a Bayesian model with Stan.

Arguments

object

A formula object whose class will determine which method will be used. A symbolic description of the model to be fitted.

...

Further arguments passed to the specific method.

formula

Synonym of object for use in make_standata.

Details

See standata.default for the default method applied for brms models. You can view the available methods by typing methods(standata). The make_standata function is an alias of standata.

See Also

standata.default, standata.brmsfit

Examples

Run this code
sdata1 <- standata(rating ~ treat + period + carry + (1|subject),
                   data = inhaler, family = "cumulative")
str(sdata1)

Run the code above in your browser using DataLab