density | R Documentation |
This function computes densities of a Gaussian mixture model.
density(gmm, data, y = NULL, log = FALSE)
gmm |
An object of class |
data |
A data frame or numeric matrix containing the observations whose
densities are computed. Its columns must explicitly be named after the
variables of |
y |
A character vector containing the dependent variables if conditional
densities are computed. If |
log |
A logical value indicating whether the densities are returned as log-densities. |
A numeric vector containing the (log-)densities.
expectation
, sampling
data(gmm_body, data_body) dens_1 <- density(gmm_body, data_body, log = TRUE) dens_2 <- density(gmm_body, data_body, y = "WAIST", log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.