View source: R/qqplot.pvalues.r
qqplot.pvalues | R Documentation |
Draws a QQ plot of p-values
qqplot.pvalues(p, col.abline = "red", CB = TRUE, col.CB = "gray80",
CB.level = 0.95, thinning = TRUE, ...)
p |
A vector of p-values, or a data.frame with a column named |
col.abline |
Color of the line of slope 1. Set to |
CB |
|
col.CB |
The color of the confidence band. |
CB.level |
The level of the confidence band. |
thinning |
|
... |
Graphical parameters to be passed to |
The QQ plot is on the -\log_{10}
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.
association.test
, manhattan
, qqplot
,
plot.default
, points.default
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.