density: Compute densities of a Gaussian mixture model
Description
This function computes densities of a Gaussian mixture model.
Usage
density(gmm, data, y = NULL, log = FALSE)
Value
A numeric vector containing the (log-)densities.
Arguments
gmm
An object of class gmm.
data
A data frame or numeric matrix containing the observations whose
densities are computed. Its columns must explicitly be named after the
variables of gmm.
y
A character vector containing the dependent variables if conditional
densities are computed. If NULL (the default), joint densities are
computed.
log
A logical value indicating whether the densities are returned as
log-densities.