Skip to contents

Run HMC/NUTS on all eligible nodes with slice fallback

Usage

run_hmc_all_nodes(
  build_fn,
  niter,
  nburnin = floor(0.25 * niter),
  thin = 1L,
  monitors = NULL,
  nchains = 1L,
  opts = samOptiPro_options()
)

Arguments

build_fn

Function with no arguments returning a list with model, optional cmodel, and optional monitors.

niter

Total number of MCMC iterations.

nburnin

Number of burn-in iterations discarded.

thin

Thinning interval (keep 1 draw every thin iterations).

monitors

Optional character vector of monitor roots; if NULL, defaults are inferred.

nchains

Integer; number of chains for runMCMC.

opts

List of options as returned by samOptiPro_options().

Value

A list with samples, samples2, runtime_s, conf, and a logical hmc_applied flag.