Learn R Programming

mcmcsae (version 0.7.8)

create_cMVN_sampler: Set up a function for direct sampling from a constrained multivariate normal distribution

Description

Set up a function for direct sampling from a constrained multivariate normal distribution

Usage

create_cMVN_sampler(
  D = NULL,
  Q = NULL,
  update.Q = FALSE,
  R = NULL,
  r = NULL,
  eps1 = 0,
  eps2 = 0,
  chol.control = chol_control(perm = TRUE)
)

Value

An environment with precomputed quantities and a method 'draw' for sampling from a multivariate normal distribution subject to equality constraints.

Arguments

D

factor of precision matrix Q such that Q=D'D.

Q

precision matrix.

update.Q

whether to update (D and) Q for each draw.

R

equality restriction matrix.

r

rhs vector for equality constraints \(R'x = r\), where \(R'\) denotes the transpose of R.

eps1

scalar parameter to control numerical robustness against singularity of Q.

eps2

scalar parameter associated with the constraint part to control numerical robustness.

chol.control

options for Cholesky decomposition, see chol_control.