Density of the multivariate normal and t distributions | R Documentation |
Density of the multivariate normal and t distributions.
dmvnorm(x, mu, sigma, logged = FALSE)
dmvt(x, mu, sigma, nu, logged = FALSE)
x |
A numerical matrix with the data. The rows correspond to observations and the columns to variables. |
mu |
The mean vector. |
sigma |
The covariance matrix. |
nu |
The degrees of freedom for the multivariate t distribution. |
logged |
Should the logarithm of the density be returned (TRUE) or not (FALSE)? |
The (log) density of the multivariate normal distribution is calculated for given mean vector and covariance matrix.
A numerical vector with the density values calculated at each vector (row of the matrix x).
Michail Tsagris
R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>.
Kanti V. Mardia, John T. Kent and John M. Bibby (1979). Multivariate analysis. Academic Press, London.
rmvnorm, rmvt, mvnorm.mle, iag.mle
x <- matrnorm(100, 20)
mu <- colmeans(x)
s <- cova(x)
a1 <- dmvnorm(x, mu, s)
a2 <- dmvt(x, mu, s, 1)
x <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.