Learn R Programming

sbgcop (version 1.0)

ldmvnorm: Log Multivariate Normal Density

Description

Computes the log of the multivariate normal density

Usage

ldmvnorm(Y, S)

Value

A real number.

Arguments

Y

an n x p matrix

S

a p x p positive definite matrix

Author

Peter Hoff

Details

This function computes the log density of the data matrix Y under the model that the rows are independent samples from a mean-zero multivariate normal distribution with covariance matrix S.

Examples

Run this code

Y<-matrix(rnorm(9*7),9,7) 
ldmvnorm(Y,diag(7))



Run the code above in your browser using DataLab