Learn R Programming

condmixt (version 1.1)

gaussmixt: Mixture of Gaussians

Description

Density and distribution function for a mixture of Gaussians with m components.

Usage

dgaussmixt(params, x, log = FALSE, trunc = TRUE)
pgaussmixt(params, x, trunc = TRUE)

Arguments

params

matrix of mixture parameters of dimension 3 x m, where m is the number of components, so that each column contains the mixture parameters (pi, mu, sigma) related to one component

x

vector of sample data

log

logical, if TRUE, probabilities p are given as log(p).

trunc

logical, if TRUE (default), the Gaussian density is truncated below zero.

Value

dgaussmixt gives the density and pgaussmixt gives the distribution function

See Also

Normal