Creates a configuration for the No-U-Turn Sampler (NUTS), a variant of Hamiltonian Monte Carlo that automatically tunes step size and number of steps.

nuts_sampler(warmup = 1000, draws = 1000, chains = 4, target_acceptance = 0.8)

Arguments

warmup

Integer. Number of warmup/adaptation iterations. Default: 1000.

draws

Integer. Number of post-warmup samples to draw. Default: 1000.

chains

Integer. Number of MCMC chains to run. Default: 4.

target_acceptance

Numeric. Target acceptance rate for adaptation. Default: 0.8.

Value

An S3 object of class c("epiaware_nuts", "epiaware_sampler") containing sampler configuration.

Examples

if (FALSE) { # \dontrun{
# Default NUTS configuration
sampler <- nuts_sampler()

# Custom configuration for faster testing
test_sampler <- nuts_sampler(
  warmup = 100,
  draws = 100,
  chains = 2
)
} # }