rmvnorm_max: Maximal coupling of two multivariate Normal distributions

View source: R/mvnorm_couplings.R

rmvnorm_maxR Documentation

Maximal coupling of two multivariate Normal distributions

Description

Sample from maximal coupling of two multivariate Normal distributions, specified through their means and covariance matrices. See rmvnorm_max_chol for a version using Cholesky factors and their inverses. See rmvnorm_reflectionmax for a reflection-maximal coupling, in the case Sigma1=Sigma2.

Usage

rmvnorm_max(mu1, mu2, Sigma1, Sigma2)

Arguments

mu1

First mean

mu2

First mean

Sigma1

First covariance matrix

Sigma2

Second covariance matrix

Value

A list containing 'xy', a matrix with 2 columns (one for each draw), and a boolean indicator 'identical' indicating whether the two draws are identical.

Examples

p <- 3
mu1 <- rep(0, p)
mu2 <- rep(1, p)
Sigma1 <- diag(0.4, p, p)
Sigma1[1,2] <- Sigma1[2,1] <- 0.2
Sigma2 <- diag(1.4, p, p)
Sigma2[1,2] <- Sigma2[2,1] <- -0.5
rmvnorm_max(mu1, mu2, Sigma1, Sigma2)

pierrejacob/debiasedmcmc documentation built on Aug. 22, 2022, 12:41 a.m.