View source: R/helpers-model.R
stancode.bmmformula | R Documentation |
Given the model
, the data
and the formula
for the model,
this function will return the combined stan code generated by bmm
and
brms
## S3 method for class 'bmmformula'
stancode(object, data, model, prior = NULL, ...)
object |
A |
data |
An object of class data.frame, containing data of all variables
used in the model. The names of the variables must match the variable names
passed to the |
model |
A description of the model to be fitted. This is a call to a
|
prior |
One or more |
... |
Further arguments passed to |
A character string containing the fully commented Stan code to fit a bmm model.
supported_models()
, brms::stancode()
scode1 <- stancode(bmf(c ~ 1, kappa ~ 1),
data = oberauer_lin_2017,
model = sdm(resp_error = "dev_rad")
)
cat(scode1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.