standata {brms} | R Documentation |
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, ...)
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 |
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
.
Value
A named list of objects containing the required data to fit a Bayesian model with Stan.
See Also
standata.default
, standata.brmsfit
Examples
sdata1 <- standata(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = "cumulative")
str(sdata1)