Conditional Multivariate Normal Distribution

Description

Computes the distribution function of the conditional multivariate normal, [Y given X], where Z = (X,Y) is the fully-joint multivariate normal distribution with mean equal to mean and covariance matrix sigma.

Usage

1
2
3
pcmvnorm(lower=-Inf, upper=Inf, mean, sigma, 
	dependent.ind, given.ind, X.given, 
	check.sigma=TRUE, algorithm = GenzBretz(), ...)

Arguments

lower

the vector of lower limits of length n.

upper

the vector of upper limits of length n.

mean

the mean vector of length n.

sigma

a symmetric, positive-definte matrix, of dimension n x n, which must be specified.

dependent.ind

a vector of integers denoting the indices of the dependent variable Y.

given.ind

a vector of integers denoting the indices of the conditioning variable X.

X.given

a vector of reals denoting the conditioning value of X. When both given.ind and X.given are missing, the distribution of Y becomes Z[dependent.ind]

check.sigma

logical; if TRUE, the variance-covariance matrix is checked for appropriateness (symmetry, positive-definiteness). This could be set to FALSE if the user knows it is appropriate.

algorithm

an object of class GenzBretz, Miwa or TVPACK specifying both the algorithm to be used as well as the associated hyper parameters.

...

additional parameters (currently given to GenzBretz for backward compatibility issues).

Details

This program involves the computation of multivariate normal probabilities with arbitrary correlation matrices.

Value

The evaluated distribution function is returned with attributes

error

estimated absolute error and

msg

status messages.

See Also

dcmvnorm, rcmvnorm, pmvnorm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n <- 10
A <- matrix(rnorm(n^2), n, n)
A <- A %*% t(A)

pcmvnorm(lower=-Inf, upper=1, mean=rep(1,n), sigma=A, 	dependent.ind=3, given.ind=c(1,4,7,9,10), 
	X.given=c(1,1,0,0,-1))

pcmvnorm(lower=-Inf, upper=c(1,2), mean=rep(1,n), 
	sigma=A, dep=c(2,5), given=c(1,4,7,9,10), 
	X=c(1,1,0,0,-1))

pcmvnorm(lower=-Inf, upper=c(1,2), mean=rep(1,n), sigma=A, 
	dep=c(2,5))