QQ plots

R code for plotting quantile-quantile (QQ) plots with concentration bands. Concentration bands can be thought of as confidence regions under the null hypothesis. A common application is in visualising the association results from a genome-wide association study (GWAS).

Concentration bands are plotted using the pointwise method of Quesenberry & Hale (1980) J. Statist. Comput. Simul. 11:41-53. The method proceeds from noting that the kth order statistic from a sample of n i.i.d. U(0,1) statistics has a Beta(k,n+1-k) distribution. Note that concentration bands should only be used as a rough guide to departures from Null expectation, for two reasons: (1) the band is pointwise, so the chances of getting a deviation outside the 95% concentration band *somewhere* along the whole range is greater than 5%; (2) linkage disequilibrium between nearby SNPs on a GWAS panel breaks the assumption of independence, and further increases the chances of a deviation outside the concentration band. Finally, note that there is a case for plotting one-tailed concentration bands (which is an option in the code provided), as usually no-one is interested in deviation of GWAS signals below the band. In practice, however, two-tailed bands are widely used.


qq_plot_v7.R