Learn R Programming

bayesGDS (version 0.6.2)

get.cutoffs: Draw thresholds for the accept-reject stage of the BD sampling algorithm.

Description

Returns a vector of log(u), where u is the threshold to determine if a proposal draw should be accepted as a draw from the target posterior distribution.

Usage

get.cutoffs(log.phi, n.draws)

Arguments

log.phi
Vector of log.phi from the proposal draws. All must be non-positive.
n.draws
an integer. number of draws to be taken from the target posterior.

Value

a numeric vector for v = -log.u (the thresholds for the accept-reject stage).

Details

For use in conjunction with the Braun and Damien (2012) Generalized Direct Sampling algorithm. This is usually not called directly (and, thus, it is not exported), since it is called from the sample.GDS function.