Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qqplot.pvalues

QQ plot of p-values


Description

Draws a QQ plot of p-values

Usage

qqplot.pvalues(p, col.abline = "red", CB = TRUE, col.CB = "gray80", 
                       CB.level = 0.95, thinning = TRUE, ...)

Arguments

p

A vector of p-values, or a data.frame with a column named p

col.abline

Color of the line of slope 1. Set to NA to suppress.

CB

Logical. If TRUE, a confidence band is included in the plot.

col.CB

The color of the confidence band.

CB.level

The level of the confidence band.

thinning

Logical. If TRUE, not all points are displayed.

...

Graphical parameters to be passed to plot and points

Details

The QQ plot is on the -log10 scale, as is usual when reporting GWAS results.

The confidence band is not a global confidence region: it is the mere juxtaposition of confidence intervals for each quantile. Moreover it assumes independance of the p-values, an hypothesis hich is false for the p-values resulting from an association test in presence of linkage disequilibrium. Therefore, the probability that some of the points lie outsite of this band is greater that CB.level.

The thinning procedure suppress some points to avoid generating too heavy graphs. The user should check that setting thinning = FALSE does not change the final aspect of the QQ plot.

See Also

Examples

# a vector of uniform p-values
p <- runif(1e6)
qqplot.pvalues(p)
# if we don't thin the points, using pch = "." is advised
qqplot.pvalues(p, pch = ".", cex = 2, thinning = FALSE)

gaston

Genetic Data Handling (QC, GRM, LD, PCA) & Linear Mixed Models

v1.5.7
GPL-3
Authors
Hervé Perdry [cre, aut, cph], Claire Dandine-Roulland [aut, cph], Deepak Bandyopadhyay [cph] (C++ gzstream class), Lutz Kettner [cph] (C++ gzstream class)
Initial release
2020-09-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.