Description Usage Arguments Details Value Note Note Author(s) See Also Examples
Function qqPlotFast creates a QQ-plot
with a confidence band and
an estimate of inflation factor lambda.
It optimized to work quickly even for tens of millions of p-values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  | qqPlotPrepare(
        pvalues,
        ntests = NULL,
        ismlog10 = FALSE)
qqPlotFast(
        x, 
        ntests = NULL, 
        ismlog10 = FALSE, 
        ci.level = 0.05, 
        ylim = NULL, 
        newplot = TRUE, 
        col = "#D94D4C", 
        cex = 0.5, 
        yaxmax = NULL, 
        lwd = 3, 
        axistep = 2, 
        col.band = "#ECA538",
        makelegend = TRUE,
        xlab = expression(
            paste("\u2013", " log"[10]*"(", italic("P"), "), null")),
        ylab = expression(
            paste("\u2013", " log"[10]*"(", italic("P"), "), observed")))
 | 
pvalues | 
 Vector of p-values. 
As is (if   | 
ntests | 
 If only significant p-values are provided,
the total number of tests performed.  | 
ismlog10 | 
 Specifies whether the provides p-values (  | 
x | 
 Either a vector of p-values, as in   | 
ci.level | 
 Significance level of the confidence band.
Set to   | 
ylim | 
 Numeric vectors of length 2, giving the y coordinate range. Exactly as in Plotting Parameters.  | 
newplot | 
 If   | 
col | 
 The QQ-plot curve color.  | 
col.band | 
 Confidence band curve color.  | 
cex | 
 The size of QQ-plot points. As in Graphics Parameters.  | 
lwd | 
 The line width.  | 
axistep | 
 Distance between axis label ticks for both axis.  | 
yaxmax | 
 Maximum reach of the y axis.  | 
makelegend | 
 If true, add legend to the plot.  | 
xlab, ylab | 
 Axis labels. As in plot function.  | 
The function qqPlotFast creates a QQ-plot. 
The function qqPlotPrepare extracts the necessary information
from a vector of p-values sufficient for creating QQ-plot. 
The resulting object is many times smaller than the vector of p-values.
The function qqPlotPrepare returns an object with
the necessary information from a vector of p-values
sufficient for creating QQ-plot.
The plot has no title. To add a title use title.
The function works faster if the p-values are sorted.
Andrey A Shabalin andrey.shabalin@gmail.com
See vignettes: browseVignettes("ramwas").
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  | # Million p-values
n = 1e6
# Null p-values
pv = runif(n)
# QQ-plot should be nearly diagonal
qqPlotFast(pv)
title("QQ-plot")
# Size of p-values before extraction of QQ-plot info
object.size(pv)
# Extract the QQ-plot info
qq = qqPlotPrepare(pv)
# Size of the QQ-plot info object
object.size(qq)
# Create QQ-plot, it is the same
qqPlotFast(qq)
# Create QQ-plot with plotting parameters
qqPlotFast(qq, ylim = c(0,10), yaxmax = 9, axistep = 3, lwd = 3, cex = 1)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.