build_tree: Tree building function for NUTS

View source: R/NUTS.R

build_treeR Documentation

Tree building function for NUTS

Description

Tree building function for NUTS

Usage

build_tree(
  A,
  j,
  aa,
  u,
  v,
  jj,
  eps,
  A00,
  aa0,
  lpd_func,
  grad_lpd_func,
  M_diag,
  Delta_max = 1000,
  ...
)

Arguments

A

Parameter A or B.

j

The index for which column of A or B to be updated.

aa

The momentum vector of the j-th column of A or B.

u

a random number used in NUTS.

v

a random number from discrete Unif-1, +1 used in NUTS.

jj

The index for the layer of the tree.

eps

Stepsize.

A00

A or B from the previous iteration.

aa0

The momentum vector from the previous iteration.

lpd_func

The log full conditional posterior density of A or B.

grad_lpd_func

The function to calculate the gradients of the log full conditional posterior density of A or B.

M_diag

Covariance matrix for our matrix parameter A or B.

Delta_max

The Delta_max parameter used in the Algorithm 6 of NUTS.

...

Other parameters that may be useful.


yanbowisc/SIMP documentation built on Oct. 30, 2022, 1:33 a.m.