get_deriv_only: Compute the derivative of the log-normalising constant for a...

View source: R/get_deriv_only.R

get_deriv_onlyR Documentation

Compute the derivative of the log-normalising constant for a given tempering scalar.

Description

Compute the derivative of the log-normalising constant for a given tempering scalar.

Usage

get_deriv_only(
  a,
  compiled.model.prior,
  stan.list,
  pars = NA,
  niter = 5000,
  strict = FALSE,
  step_size = 0.99,
  tdepth = 15
)

Arguments

a

the tempering scalar.

compiled.model.prior

a stan_model object containing the tempered target.

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 with the stanfit object, the first and second derivatives of the log-normalising constant.

See Also

get_deriv_and_mal


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