| stancode.bmmformula {bmm} | R Documentation | 
Generate Stan code for bmm models
Description
Given the model, the data and the formula for the model,
this function will return the combined stan code generated by bmm and
brms
Usage
## S3 method for class 'bmmformula'
stancode(object, data, model, prior = NULL, ...)
Arguments
| 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  | 
Value
A character string containing the fully commented Stan code to fit a bmm model.
See Also
supported_models(), brms::stancode()
Examples
scode1 <- stancode(bmf(c ~ 1, kappa ~ 1),
  data = oberauer_lin_2017,
  model = sdm(resp_error = "dev_rad")
)
cat(scode1)