create_cMVN_sampler: Set up a function for direct sampling from a constrained...

View source: R/cMVN_sampler.R

create_cMVN_samplerR Documentation

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)
)

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.

Value

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


mcmcsae documentation built on April 12, 2025, 2:25 a.m.