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,...)
Arguments
object: An object of class mvgam or mvgam_prefit, returned from a call to mvgam
...: ignored
Returns
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.
Examples
simdat <- sim_mvgam()mod <- mvgam(y ~ s(season)+ s(time, by = series), family = poisson(), data = simdat$data_train, run_model =FALSE)# View Stan model codestancode(mod)# View Stan model datasdata <- standata(mod)str(sdata)