sampling {RStanTVA} | R Documentation |
Draw posterior samples from an RStanTVA model
Description
Draw samples from the model defined by object
.
Usage
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)
)
Arguments
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 |
Value
Returns a stantva_fit
object, which inherits from stanfit
, representing the fit of object
to data
.
Functions
-
sampling(stantvamodel)
: method
[Package RStanTVA version 0.3.0 Index]