`dmvnorm.Rd`

Efficiently computes the density of observations for a generic multivariate Gaussian distribution.

dmvnorm(data, mean, sigma, log = FALSE)

data | A numeric vector, matrix, or data frame of observations. Categorical variables are not allowed. If a matrix or data frame, rows correspond to observations and columns correspond to variables. |
---|---|

mean | A vector of means for each variable. |

sigma | A positive definite covariance matrix. |

log | A logical value indicating whether or not the logarithm of the densities should be returned. |

A numeric vector whose *i*th element gives the density of the
*ith* observation in `data`

for the multivariate Gaussian
distribution with parameters `mean`

and `sigma`

.

# univariate ngrid <- 101 x <- seq(-5, 5, length = ngrid) dens <- dmvnorm(x, mean = 1, sigma = 5) plot(x, dens, type = "l")