Learn R Programming

lumi (version 2.24.0)

plotGammaFit: plot the fitting results of gammaFitEM

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

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.

Value

Invisibly return TRUE if the plot is successful.

Details

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

See Also

gammaFitEM

Examples

Run this code

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)

Run the code above in your browser using DataLab