Density of the multivariate normal and t distributions
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@yahoo.gr> and Manos Papadakis <papadakm95@gmail.com>.
Kanti V. Mardia, John T. Kent and John M. Bibby (1979). Multivariate analysis. Academic Press, London.
x <- matrnorm(100, 20) mu <- colmeans(x) s <- cova(x) a1 <- dmvnorm(x, mu, s) a2 <- dmvt(x, mu, s, 1) x <- NULL
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.