Learn R Programming

tweeDEseq (version 1.18.0)

qqchisq: Chi-square quantile-quantile plot

Description

Make a chi-square quantile-quantile plot.

Usage

qqchisq(stat, df=1, normal=FALSE, rangeExpected=FALSE, obsQuantiles=c(0.50, 0.75, 0.95), ylim = NULL, ...)

Arguments

stat
vector of $\chi^2$ statistics.
df
degrees of freedom of stat.
normal
logical; set to TRUE if the $\chi^2$ statistics in stat should be transform into normal z-scores in order to improve the display of lower quantiles. For this purpose, this function uses the zscoreGamma function from the limma package. Default is set to FALSE.
rangeExpected
logical; set to TRUE if the displayed range of the observed $\chi^2$ statistics is restricted to the range of their expected values. Default is set to FALSE.
obsQuantiles
observed quantiles to indicate by horizontal dash lines. By default, these are set to 50%, 75% and 95%.
ylim
they y limits of the plot. If 'NULL' (default), these will be obtained from the data.
...
further arguments to pass to the plot function.

Value

it returns invisibly a list with two components x and y corresponding to the coordinates of the plotted statistics.

Details

The main purpose of this function in the tweeDEseq package is to provide means to assess the goodness of fit of count data to the negative binomial distribution. The main input argument stats should be the output of gofTest.

References

Esnaola M, Puig P, Gonzalez D, Castelo R and Gonzalez JR (2013). A flexible count data model to fit the wide diversity of expression profiles arising from extensively replicated RNA-seq experiments. BMC Bioinformatics 14: 254

See Also

compareCountDist testShapePT

Examples

Run this code
## Generate a random matrix of counts
counts <- matrix(rPT(n=2000, a=0.5, mu=10, D=5), nrow=20)

## Perform the goodness-of-fit tests for every row in the matrix
chi2gof <- gofTest(counts)

## Not run: 
# qqchisq(chi2gof)
# ## End(Not run)

Run the code above in your browser using DataLab