powered by
Extracts the Stan code from a StanTVA model object.
model_code(object, type)# S4 method for stanmodel model_code(object, type = c("stan", "stan2", "cpp"))# S4 method for stanfit model_code(object, type)
# S4 method for stanmodel model_code(object, type = c("stan", "stan2", "cpp"))
# S4 method for stanfit model_code(object, type)
A RStanTVA model code object (stan), or a string containing the code (stan2 or cpp).
stan
stan2
cpp
A StanTVA model object or fit.
The type of code to return (stan: formatted StanTVA, stan2: ready-to-compile Stan code, cpp: generated C++ code).
model_code(stanmodel): method
model_code(stanmodel)
model_code(stanfit): Extract code from a model fit
model_code(stanfit)
if (FALSE) { model <- stantva_model(locations = 2) model_code(model) }
Run the code above in your browser using DataLab