HmcDual: HmcDual

Description Usage Arguments Value

Description

Hamiltonian Monte Carlo with Dual Averaging

Usage

1
HmcDual(theta0, delta, lambda, L, M, Madapt)

Arguments

theta0

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

delta

the desired average acceptance probability

lambda

trajectory length for leapfrog

L

a callable function that returns a 2-dimensional vector whose first element is the logarithm of the density of the input and the second is the gradient of the logarithm of the density evaluated at the input.

M

an integer specifying the number of iterations.

Madapt

an integer specifying the number of iterations of the warmup phase.

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.