build_grid_derivOnly: Build grid of values for the tempering scalar along with the...

View source: R/build_grid_derivOnly.R

build_grid_derivOnlyR Documentation

Build grid of values for the tempering scalar along with the (first and second) derivatives of the log-normalising constant.

Description

Build grid of values for the tempering scalar along with the (first and second) derivatives of the log-normalising constant.

Usage

build_grid_derivOnly(
  compiled.model.prior,
  eps = 0.01,
  M = 10,
  J = 15,
  v1 = 5,
  v2 = 10,
  stan.list,
  pars,
  niter = 5000,
  strict = FALSE,
  step_size = 0.99,
  tdepth = 15
)

Arguments

compiled.model.prior

a stan_model object containing the tempered target.

eps

grid increment factor. Default is eps=0.01.

M

maximum value for the tempering scalar. Default is M=1.

J

number of grid points. Default is J=15.

v1

scalar that controls the grid spacing in the minimum-finding phase. Default is v1 = 5.

v2

scalar that controls the grid spacing in the "gap-plugging" phase. Default is v2 = 10.

stan.list

list with data for the Stan model.

pars

which parameters to track.

niter

number of iterations, defaults to 5000.

strict

whether to use strict computational specs.

step_size

if spec=TRUE, sets the step_size. Default is step_size = 0.99.

tdepth

if spec=TRUE, sets the tree_depth. Default is tdepth = 15.

Value

a list containing a data.frame with the grid points, log-normalising constant and derivatives. If pars != NA, MCMC summaries for selected parameters are also returned.

See Also

build_grid


maxbiostat/npowerPrioR documentation built on Feb. 22, 2023, 2:13 p.m.