dmvnorm | R Documentation |
Density and log-density for the multivariate normal distribution
with mean equal to mu
and variance matrix equal to sigma
.
dmvnorm(y, mu=NULL, sigma=NULL)
logdmvnorm(y, mu=NULL, sigma=NULL)
y |
Either a |
mu |
|
sigma |
This |
This code is written to be efficient, using the qr-decomposition of the
covariance matrix (and using it only once, rather than recalculating it
for both the determinant and the inverse of sigma
).
dmvnorm
gives the densities, while
logdmvnorm
gives the logarithm of the densities.
qr
, qr.solve
, dnorm
,
rmvnorm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.