NUTS: No-U-Turn sampler

Description Usage Arguments Value

Description

No-U-Turn sampler

Usage

1
2
NUTS(theta, f, grad_f, n_iter, M_diag = NULL, M_adapt = 50, delta = 0.5,
  max_treedepth = 10, eps = 1, verbose = TRUE)

Arguments

theta

Initial value for the parameters

f

log-likelihood function (up to a constant)

grad_f

the gradient of the log-likelihood function

n_iter

Number of MCMC iterations

M_diag

Diagonal elements of the mass matrix in HMC. Defaults to ones.

M_adapt

Parameter M_adapt in algorithm 6 in the NUTS paper

delta

Target acceptance ratio, defaults to 0.5

max_treedepth

Maximum depth of the binary trees constructed by NUTS

eps

Starting guess for epsilon

Value

Matrix with the trace of sampled parameters. Each mcmc iteration in rows and parameters in columns.


kasparmartens/NUTS documentation built on May 7, 2019, 11:14 a.m.