dnormmix: density of a k-component normal mixture

Description Usage Arguments Details Value Author(s) Examples

View source: R/normmixture.R

Description

density of a k-component normal mixture

Usage

1
dnormmix(x, theta)

Arguments

x

x like dnorm(x, ...

theta

parameters of the mixture proportion, mean and sd

Details

details follow

Value

density of a k-component normal mixture

Author(s)

mvaniterson

Examples

1
2
3
4
5
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)

Example output

Loading required package: ggplot2
Loading required package: BiocParallel
Loading required package: ellipse

Attaching package:ellipseThe following object is masked frompackage:graphics:

    pairs

bacon documentation built on Nov. 8, 2020, 4:54 p.m.