Draw samples from the model defined by object.
sampling(object, ...)# S4 method for stantvamodel
sampling(
object,
data,
init = "random",
seed = sample.int(.Machine$integer.max, 1),
...,
backend = c("rstan", "cmdstanr", "cmdstanr_mpi"),
cpp_options = if (match.arg(backend) == "cmdstanr") list(stan_threads =
object@code@config$parallel) else if (match.arg(backend) == "cmdstanr_mpi") list(CXX
= "mpicxx", TBB_CXX_TYPE = "gcc", STAN_MPI = TRUE)
)
Returns a stantva_fit object, which inherits from stanfit, representing the fit of object to data.
The StanTVA model object.
Further arguments passed to the sampling handler of the specified backend.
The data to which the model should be fitted, usually a data.frame.
How to initialize the individual chains, see rstan::sampling(). Note that for random, any lower-level hierarchical (e.g., subject-level) parameters are initialized to zero.
Seed for random number generation and chain initialization
Which backend to use for fitting (default: rstan)
Which options to pass to stan_model() for compiling the C++ code.
sampling(stantvamodel): method