Learn R Programming

bacon (version 1.0.4)

dnormmix: density of a k-component normal mixture

Description

density of a k-component normal mixture

Usage

dnormmix(x, theta)

Arguments

x
x like dnorm(x, ...
theta
parameters of the mixture proportion, mean and sd

Value

density of a k-component normal mixture

Details

details follow

Examples

Run this code
n <- 2000
theta <- c(0.8, 0, 1, 0, 4, 1)
x <- rnormmix(n, theta)
hist(x, freq=FALSE, n=100)
curve(dnormmix(x, theta), add=TRUE, lwd=2)

Run the code above in your browser using DataLab