Last chance! 50% off unlimited learning
Sale ends in
run_mcmc.rwm(nsim, fn, params.init, alpha = 1, covar = NULL, diagnostic = FALSE)
alpha
varies the acceptance rate.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'), proposed samples ('par.proposed'), vector of
which proposals were accepted ('accepted'), and the total function calls
('n.calls'), which for this algorithm is nsim
alpha
so some trial and error may be required for efficient sampling.
run_mcmc
, run_mcmc.nuts
, run_mcmc.hmc