ldmvnorm: Multivariate Normal Log-Density for Complete and Incomplete...

Description Usage Arguments Author(s) Examples

Description

This function provides the log-density function for the multivariate normal distribution with mean equal to mu and covariance matrix Sigma. Marginal distributions will be used when the vector (or matrix) of quantiles is incomplete. That is, when the vector (or matrix) of quantiles contain NA.

Usage

1
ldmvnorm(x, mu, Sigma, onNA=0)

Arguments

x

Vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile.

mu

Mean vector, default is rep(0, length = ncol(x))

Sigma

Covariance matrix, default is diag(ncol(x)).

onNA

Action for a row on NAs. Default is to return 0.

Author(s)

Alessio Farcomeni alessio.farcomeni@uniroma1.it, Andy Leung andy.leung@stat.ubc.ca

Examples

1
2
3
4
5
6
x <- matrix(rnorm(1000),100, 10)
u <- matrix(rbinom(1000, 1, 0.1), 100, 10)
x[ u == 1 ] <- NA
mu <- rep(0,10)
Sigma <- diag(10)
ldmvnorm(x, mu, Sigma)

snipEM documentation built on May 1, 2019, 8:49 p.m.

Related to ldmvnorm in snipEM...