| make_standata {brms} | R Documentation |
Generate data for brms models to be passed to Stan
make_standata(formula, data, family = gaussian(), prior = NULL,
autocor = NULL, cov_ranef = NULL, sample_prior = c("no", "yes",
"only"), stanvars = NULL, knots = NULL, check_response = TRUE,
only_response = FALSE, control = list(), ...)
formula |
An object of class |
data |
An object of class |
family |
A description of the response distribution and link function to
be used in the model. This can be a family function, a call to a family
function or a character string naming the family. Every family function has
a |
prior |
One or more |
autocor |
An optional |
cov_ranef |
A list of matrices that are proportional to the (within)
covariance structure of the group-level effects. The names of the matrices
should correspond to columns in |
sample_prior |
Indicate if samples from all specified proper priors
should be drawn additionally to the posterior samples (defaults to
|
stanvars |
An optional |
knots |
Optional list containing user specified knot values to be used
for basis construction of smoothing terms. See
|
check_response |
Logical; check validity of the response? |
only_response |
Logical; extract data related to the response only? |
control |
A named list currently for internal usage only |
... |
Other potential arguments |
A named list of objects containing the required data to fit a brms model with Stan.
Paul-Christian Buerkner paul.buerkner@gmail.com
data1 <- make_standata(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = "cumulative")
names(data1)
data2 <- make_standata(count ~ log_Age_c + log_Base4_c * Trt_c
+ (1|patient) + (1|visit),
data = epilepsy, family = "poisson")
names(data2)