Run multiple HMC chains and return a dataframe of parameters

hmc_da(log_posterior, gradient, n_steps, init_parameters, iters, chains = 2)

Arguments

log_posterior

a function for the unnormalised log-posterior from parameters -> log-likelihood

gradient

the gradient of the log_posterior

n_steps

the number of leapfrog steps

init_parameters

a named vector of initial parameters

iters

the number of iterations

chains

the number of chains

step_size

the step size of the leapfrog steps

Value

Details

To run this in parallel call future::plan(future::multiprocess()) before this function