leapfrog_step: Leapfrog Step

Description Usage Arguments

View source: R/samplers.R

Description

Helper Function for Hamiltonian Monte Carlo based samplers.The leapfrog function is a symplectic integrator which deals with error accumulation in the generation of Hamiltonian trajectories. It requires that the distribution of the momentum is independent of position.

Usage

1
leapfrog_step(theta, momentum, epsilon, log_posterior, L = 1)

Arguments

theta

A vector of length d with the current position

momentum

A vector of length d with the current momentum

epsilon

A numeric value with the size of the leapfrog step

log_posterior

Function of the log probability density of a value theta in the target distribution.


lucas-castillo/SampleR documentation built on Jan. 1, 2021, 8:25 a.m.