plotGammaFit: plot the fitting results of 'gammaFitEM'

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

View source: R/methylation_preprocessing.R

Description

plot the fitting results of gammaFitEM. It basically plot the histogram of M-values plus the estimated gamma density plots and their mixture.

Usage

1
plotGammaFit(x, gammaFit = NULL, k = NULL, theta = NULL, shift = NULL, proportion = NULL, plotType = c("histogram", "density"), ...)

Arguments

x

a vector of M-values covering the whole genome

gammaFit

a "gammaFit" class object returned by gammaFitEM

k

parameter k of gamma distribution

theta

parameter theta of gamma distribution

shift

parameter shift of gamma distribution

proportion

the proportion of two components (gamma distributions)

plotType

determine the way to show the distribution of the input data, either histogram or density plot

...

Other parameters used by hist or plot (for "density" plotType) function.

Details

This function is to visualize the fitting results, which helps us understand how well the fitting is.

Value

Invisibly return TRUE if the plot is successful.

Author(s)

Pan DU

See Also

gammaFitEM

Examples

1
2
3
4
data(example.lumiMethy)
M <- exprs(example.lumiMethy)
fittedGamma <- gammaFitEM(M[,1], initialFit=NULL, maxIteration=50, tol=0.0001, plotMode=FALSE, verbose=FALSE)
plotGammaFit(M[,1], gammaFit=fittedGamma)

lumi documentation built on Nov. 8, 2020, 5:27 p.m.

Related to plotGammaFit in lumi...