plotMix: Plots an histogram and Gaussian fitted by 'Mclust'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/functions_comp2annot.R

Description

Given a result of function Mclust applied to a numeric vector, this function draws the fitted Gaussian on the histogram of the data values.

Usage

1
2
  plotMix(mc, data, nbBreaks, traceDensity = TRUE,
    title = "", xlim, ylim, ...)

Arguments

mc

The result of Mclust function applied to argument data

data

A vector of numeric values

nbBreaks

The number of breaks for the histogram

traceDensity

If TRUE (default) density are displayed on the y-axis, else if FALSE counts are displayed on the y-acis

title

A title for the plot

xlim

x-axis limits to be used in the plot

ylim

y-axis limits to be used in the plot

...

additional arguments for hist

Details

A shapiro test p-value is added to the plot title. This function can only deal with at the most three Gaussian.

Value

NULL

Author(s)

Anne Biton

See Also

hist, Mclust

Examples

1
2
3
4
5
6
## create a mix of two Gaussian
v <-c(rnorm(80,mean=-0.5,sd=1),rnorm(80,mean=1,sd=0.2))
## apply Mclust
mc <- Mclust(v)
## plot fitted Gaussian on histogram of v
plotMix(mc=mc,data=v,nbBreaks=30)

Bioconductor-mirror/MineICA documentation built on May 29, 2017, 8:30 a.m.