hmc_neal_2010 {catalytic}R Documentation

Hamiltonian Monte Carlo (HMC) Implementation

Description

This function implements the Hamiltonian Monte Carlo algorithm as described by Radford M. Neal (2010) in "MCMC using Hamiltonian dynamics", which is a part of the Handbook of Markov Chain Monte Carlo. The method uses Hamiltonian dynamics to propose new positions and then applies the Metropolis criterion to decide whether to accept or reject the new position.

Usage

hmc_neal_2010(
  neg_log_den_func,
  neg_log_den_grad_func,
  leapfrog_stepsize,
  leapfrog_step,
  current_pos
)

Arguments

neg_log_den_func

A function that evaluates the negative log of the density (potential energy) of the distribution to be sampled, including any constants.

neg_log_den_grad_func

A function that computes the gradient of neg_log_den_func.

leapfrog_stepsize

A numeric value specifying the step size for the leapfrog integration method.

leapfrog_step

A numeric value specifying the number of leapfrog steps to take to propose a new state.

current_pos

A numeric vector representing the current position (state) of the system.

Details

This function was written for illustrative purposes. More elaborate on Radford M. Neal's personal webpage (http://www.cs.utoronto.ca/~radford/).

Value

A list containing the following elements:

References

Neal, R. M. (2012). MCMC using Hamiltonian dynamics. arXiv:1206.1901. Available at: https://arxiv.org/pdf/1206.1901


[Package catalytic version 0.1.0 Index]