hmc.run: Run one HMC chain

Description Usage Arguments Value

View source: R/hmc.R

Description

Run one HMC chain

Usage

1
hmc.run(log_prob, hamiltonian, x0, iter, step_size)

Arguments

log_prob

a function that takes input theta and returns a value that is proportional to the log probability density at theta

hamiltonian

a function that takes as input the location and momentum and returns their time derivatives

x0

initial value

iter

number of iterations

step_size

leapfrog step size

Value

a list


jtimonen/mc2 documentation built on Jan. 20, 2020, 10:37 a.m.