plotGammaFit {lumi} | R Documentation

## 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.

### 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

    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)

[Package lumi version 2.46.0 Index]