Learn R Programming

mcmcsae (version 0.6.0)

set_opts: Set global options relating to computational details

Description

Set global options relating to computational details

Usage

set_opts(
  auto.order.block = TRUE,
  chol.inplace = TRUE,
  chol.ordering = 0L,
  PG.approx = TRUE,
  PG.approx.m = -2L,
  CRT.approx.m = 20L
)

Arguments

auto.order.block

whether Gibbs blocks should be ordered automatically in such a way that those with the most sparse design matrices come first. This way of ordering can make Cholesky updates more efficient.

chol.inplace

whether sparse Cholesky updates should re-use the same memory location.

chol.ordering

an integer passed to CHOLMOD routines determining which reordering schemes are tried to limit sparse Cholesky fill-in.

PG.approx

whether Polya-Gamma draws for logistic binomial models are approximated by a hybrid gamma convolution approach. If not, BayesLogit::rpg is used, which is exact for some values of the shape parameter.

PG.approx.m

if PG.approx=TRUE, the number of explicit gamma draws in the sum-of-gammas representation of the Polya-Gamma distribution. The remainder (infinite) convolution is approximated by a single moment-matching gamma draw. Special values are: -2L for a default choice depending on the value of the shape parameter and balancing performance and accuracy, -1L for a moment-matching normal approximation, and 0L for a moment-matching gamma approximation.

CRT.approx.m

scalar integer specifying the degree of approximation to sampling from a Chinese Restaurant Table distribution. The approximation is based on Le Cam's theorem. Larger values yield a slower but more accurate sampler.

Value

This function sets or resets options in the option environment .opts.

References

D. Bates, M. Maechler, B. Bolker and S.C. Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software 67(1), 1-48.

Y. Chen, T.A. Davis, W.W. Hager and S. Rajamanickam (2008). Algorithm 887: CHOLMOD, supernodal sparse Cholesky factorization and update/downdate. ACM Transactions on Mathematical Software 35(3), 1-14.