Learn R Programming

OVL.CI (version 0.1.1)

dnorm_mixture: Computes the probability density function of a finite mixture of normal distributions at a given point or vector of points.

Description

Computes the probability density function of a finite mixture of normal distributions at a given point or vector of points.

Usage

dnorm_mixture(x, mu, sigma, pi)

Value

A numeric vector containing the values of the mixture density evaluated at x.

Arguments

x

Numeric vector of points at which the density is evaluated.

mu

Numeric vector of component means.

sigma

Numeric vector of component standard deviations.

pi

Numeric vector of mixing proportions. Must have the same length as mu and sigma, and sum to 1.