Hmc: Hmc

Description Usage Arguments Value

Description

This function performs the Hamiltonian Monte Carlo.

Usage

1
Hmc(theta0, epsilon, leap.nsteps, L, M)

Arguments

theta0

a p-dimensional vector with the initial value for each parameter.

epsilon

a non-negative value specifying the leapfrog step size.

leap.nsteps

an integer number specifying the number of leapfrog steps.

L

callable function: returns the value of log posterior and the gradient of log posterior probability at given input.

M

an integer specifying the number of iterations.

Value

This function returns a matrix whose m-th row is a sample from the joint density.


jodie0399/NUTS documentation built on May 29, 2019, 1:06 a.m.