Last chance! 50% off unlimited learning
Sale ends in
run_mcmc.nuts(nsim, fn, gr, params.init, max_doublings = 4, eps = NULL, Madapt = NULL, delta = 0.5, covar = NULL, diagnostic = FALSE)
fn
).NULL
value will initiate adaptation of eps
using the dual averaging
algorithm during the first Madapt
steps.eps
in the dual averaging algorithm. A value of NULL
results in a default of Madapt=nsim/2
.covar
approximates the
covariance, then the transformed parameter space will be close to
multivariate standard normal. In this case the algorithm will be more
efficient, but there will be overhead in the matrix calculations which
need to be done at each step. The default of NULL specifies to not do
this transformation.diagnostic
is FALSE (default), returns a matrix
of nsim
samples from the posterior. Otherwise returns a list
containing samples ('par'), vector of steps taken at each iteration
('steps.taken'), and the total function and gradient calls
('n.calls'), which in the case of NUTS is dynamic, and finally the
average eps
('epsbar') from the dual averaging algorithm if
used (otherwise NULL).
eps
) via an algorithm
called dual averaging. In theory neither the step length nor step size
needs to be input by the user to obtain efficient sampling from the
posterior.
run_mcmc
, run_mcmc.hmc
, run_mcmc.rwm