make_standata(formula, data = NULL, family = "gaussian", prior = NULL, autocor = NULL, nonlinear = NULL, partial = NULL, cov_ranef = NULL, sample_prior = FALSE, knots = NULL, control = list(), ...)brmsformula
(or one that can be coerced to that class):
a symbolic description of the model to be fitted.
The details of model specification are explained in
brmsformula.as.data.frame to a data frame) containing the variables in the model.
If not found in data, the variables are taken from environment(formula),
typically the environment from which brm is called.
Although it is optional, we strongly recommend to supply a data.frame.link argument allowing to specify
the link function to be applied on the response variable.
If not specified, default links are used.
For details of supported families see
brmsfamily.NULL (the default)
formula is treated as an ordinary formula.
If not NULL, formula is treated as a non-linear model
and nonlinear should contain a formula for each non-linear
parameter, which has the parameter on the left hand side and its
linear predictor on the right hand side.
Alternatively, it can be a single formula with all non-linear
parameters on the left hand side (separated by a +) and a
common linear predictor on the right hand side.
More information is given under 'Details'.~expression allowing to specify predictors with
category specific effects in non-cumulative ordinal models
(i.e. in families cratio, sratio, or acat).
As of brms > 0.8.0 category specific effects should be
specified directly within formula using function cse.data that are used as grouping factors.
All levels of the grouping factor should appear as rownames
of the corresponding matrix. This argument can be used,
among others, to model pedigrees and phylogenetic effects.FALSE). Among others, these samples can be used
to calculate Bayes factors for point hypotheses.
Alternatively, sample_prior can be set to "only" to
sample solely from the priors. In this case, all parameters must
have proper priors.gamm.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)
Run the code above in your browser using DataLab