plot_qq | R Documentation |
This function plots expected vs. observed p-values following -log10 transform.
plot_qq(dat, lambda = FALSE, title = "QQ Plot", hover = FALSE)
dat |
Either a vector of p-values, optionally named, or any object with a column for p-values coercable to a data frame. Missing values are silently removed. |
lambda |
Calculate genomic inflation factor? See Details. |
title |
Optional plot title. |
hover |
Show probe name by hovering mouse over data point? If |
QQ plots are a common way to visually assess the applicability of a statistical test to a given data set. If the black points deviate too sharply from the red line, especially at low expected values of -log10(p), then it suggests a violation of the assumptions upon which the test was based.
In addition, plot_qq
optionally calculates the genomic inflation
factor lambda, defined as the ratio of the median of the observed
distribution of the test statistic to the expected median. Inflated
lambda-values (i.e., lambda > 1) are indicative of a high false
positive rate, possibly due to some systematic and unaccounted for bias in
the data.
df <- data.frame(p.value = runif(1e4)) plot_qq(df, lambda = TRUE) library(DESeq2) dds <- makeExampleDESeqDataSet() dds <- DESeq(dds) res <- results(dds) plot_qq(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.