sampling | R Documentation |
Draw samples from the model defined by object
.
sampling(object, ...)
## S4 method for signature 'stantvamodel'
sampling(
object,
data,
init = "random",
...,
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)
)
object |
The StanTVA model object. |
... |
Further arguments passed to the sampling handler of the specified backend. |
data |
The data to which the model should be fitted, usually a |
init |
How to initialize the individual chains, see |
backend |
Which backend to use for fitting (default: |
cpp_options |
Which options to pass to |
Returns a stantva_fit
object, which inherits from stanfit
, representing the fit of object
to data
.
sampling(stantvamodel)
: method
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.