Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function plots ranked observed chi-squared test statistics against the corresponding expected order statistics. It also estimates an inflation (or deflation) factor, lambda, by the ratio of the trimmed means of observed and expected values. This is useful for inspecting the results of whole-genome association studies for overdispersion due to population substructure and other sources of bias or confounding.
1 2 3 4 5 6 |
x |
A vector of observed chi-squared test values |
df |
The degreees of freedom for the tests |
x.max |
If present, truncate the observed value (Y) axis here |
main |
The main heading |
sub |
The subheading |
xlab |
x-axis label (default "Expected") |
ylab |
y-axis label (default "Observed") |
conc |
Lower and upper probability bounds for concentration band
for the plot. Set this to |
overdisp |
If |
trim |
Quantile point for trimmed mean calculations for estimation of lambda. Default is to trim at the median |
slope.one |
Is a line of slope one to be superimpsed? |
slope.lambda |
Is a line of slope lambda to be superimposed? |
thin |
A pair of numbers indicating how points will be thinned
before plotting (see Details).
If |
oor.pch |
Observed values greater than |
col.shade |
The colour with which the concentration band will be filled |
... |
Further graphical parameter settings to be passed to
|
To reduce plotting time and the size of plot files, the smallest
observed and expected points are thinned so that only a reduced number of
(approximately equally spaced) points are plotted. The precise
behaviour is controlled by the parameter
thin
, whose value should be a pair of numbers.
The first number must lie
between 0 and 1 and sets the proportion of the X axis over which
thinning is to be applied. The second number should be an integer and
sets the maximum number of points to be plotted in this section.
The "concentration band" for the plot is shown in grey. This region is defined by upper and lower probability bounds for each order statistic. The default is to use the 2.5 Note that this is not a simultaneous confidence region; the probability that the plot will stray outside the band at some point exceeds 95
When required, he dispersion factor is estimated by the ratio of the observed trimmed mean to its expected value under the chi-squared assumption.
The function returns the number of tests, the number of values omitted
from the plot (greater than x.max
), and the estimated
dispersion factor, lambda.
All tests must have the same number of degrees of freedom. If this is not the case, I suggest transforming to p-values and then plotting -2log(p) as chi-squared on 2 df.
David Clayton david.clayton@cimr.cam.ac.uk
Devlin, B. and Roeder, K. (1999) Genomic control for association studies. Biometrics, 55:997-1004
single.snp.tests
, snp.lhs.tests
,
snp.rhs.tests
1 | ## See example the single.snp.tests() function
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.