qqchisq: Chi-square quantile-quantile plot

Description Usage Arguments Details Value References See Also Examples

View source: R/qqchisq.R

Description

Make a chi-square quantile-quantile plot.

Usage

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

Arguments

stat

vector of χ^2 statistics.

df

degrees of freedom of stat.

normal

logical; set to TRUE if the χ^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 χ^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.

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.

Value

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

Example output



tweeDEseq documentation built on Nov. 8, 2020, 5:59 p.m.