stancode | R Documentation |
stancode
is a generic function that can be used to
generate Stan code for Bayesian models. 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.
stancode(object, ...)
make_stancode(formula, ...)
object |
An object whose class will determine which method to apply. Usually, it will be some kind of symbolic description of the model form which Stan code should be generated. |
... |
Further arguments passed to the specific method. |
formula |
Synonym of |
See stancode.default
for the default
method applied for brms models.
You can view the available methods by typing: methods(stancode)
The make_stancode
function is an alias of stancode
.
Usually, a character string containing the generated Stan code.
For pretty printing, we recommend the returned object to be of class
c("character", "brmsmodel")
.
stancode.default
, stancode.brmsfit
stancode(rating ~ treat + period + carry + (1|subject),
data = inhaler, family = "cumulative")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.