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

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

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)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: plyr
Loading required package: ggplot2
Loading required package: scales
Loading required package: foreach
Loading required package: xtable
Loading required package: biomaRt
Loading required package: gtools
Loading required package: GOstats
Loading required package: Category
Loading required package: stats4
Loading required package: AnnotationDbi
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:plyr':

    rename

The following object is masked from 'package:base':

    expand.grid


Attaching package: 'IRanges'

The following object is masked from 'package:plyr':

    desc

Loading required package: Matrix

Attaching package: 'Matrix'

The following object is masked from 'package:S4Vectors':

    expand

Loading required package: graph

Attaching package: 'graph'

The following object is masked from 'package:plyr':

    join



Attaching package: 'GOstats'

The following object is masked from 'package:AnnotationDbi':

    makeGOGraph

Loading required package: cluster
Loading required package: marray
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Loading required package: mclust
Package 'mclust' version 5.3
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: RColorBrewer
Loading required package: colorspace
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:graph':

    degree, edges, intersection, union

The following object is masked from 'package:IRanges':

    union

The following object is masked from 'package:S4Vectors':

    union

The following object is masked from 'package:gtools':

    permute

The following objects are masked from 'package:BiocGenerics':

    normalize, union

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: Rgraphviz
Loading required package: grid

Attaching package: 'Rgraphviz'

The following objects are masked from 'package:IRanges':

    from, to

The following objects are masked from 'package:S4Vectors':

    from, to

Loading required package: annotate
Loading required package: XML

Attaching package: 'XML'

The following object is masked from 'package:graph':

    addNode


Attaching package: 'annotate'

The following object is masked from 'package:Rgraphviz':

    toFile

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula

Attaching package: 'Hmisc'

The following object is masked from 'package:AnnotationDbi':

    contents

The following objects are masked from 'package:xtable':

    label, label<-

The following objects are masked from 'package:plyr':

    is.discrete, summarize

The following objects are masked from 'package:Biobase':

    combine, contents

The following object is masked from 'package:BiocGenerics':

    combine

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

Loading required package: fastICA
Loading required package: JADE
NULL

MineICA documentation built on Nov. 8, 2020, 5:35 p.m.