code | R Documentation |
Generate Stan code and data objects for mvgam models
code(object)
## S3 method for class 'mvgam_prefit'
stancode(object, ...)
## S3 method for class 'mvgam'
stancode(object, ...)
## S3 method for class 'mvgam_prefit'
standata(object, ...)
object |
An object of class |
... |
ignored |
Either a character string containing the fully commented Stan code to fit a mvgam model or a named list containing the data objects needed to fit the model in Stan.
simdat <- sim_mvgam()
mod <- mvgam(y ~ s(season) +
s(time, by = series),
family = poisson(),
data = simdat$data_train,
run_model = FALSE)
# View Stan model code
stancode(mod)
# View Stan model data
sdata <- standata(mod)
str(sdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.