HWQqplot | R Documentation |
HWQqplot
creates a Q-Q plot for the p-values obtained in an Exact
test for Hardy-Weinberg equilibrium. Empirical p-values are plotted
against multiple simulated quantiles of the theoretical p-value distribution.
HWQqplot(X, nsim = 100, fit = "curve", logplot = FALSE,
main = "Q-Q plot for HWE", mm = NULL, pvaluetype = "selome", ...)
X |
Data matrix with genotype counts, one row for each sample, 3 columns |
nsim |
Number of samples drawn from the null distribution (100 by default) |
fit |
If |
logplot |
If |
main |
Title for the plot |
mm |
Maximal value for x and y axis in the plot |
pvaluetype |
Type of p-value to be used in an exact test. Can be "selome" (default), "midp" or "dost". |
... |
Any additional arguments for the |
HWQqplot
constructs a Q-Q plot of the p-values of an exact test
for Hardy-Weinberg equilibrium. Under the null, this p-value is not
uniform. HWQqplot samples from the theoretical null distribution, taking
into account that markers may vary in allele frequency and in sample
size (due to missing values). For each simulated sample a grey curve or
line is shown. A green reference line with intercept 0 and slope 1 is
also shown in the plot.
NULL
Jan Graffelman jan.graffelman@upc.edu
Rohlfs, R.V. and Weir, B.S. (2008) Distributions of Hardy-Weinberg equilibrium test statistics. Genetics 180, pp. 1609-1616.
HWTernaryPlot
, HWExact
, qqplot
## Not run:
set.seed(1234)
n <- 200 # sample size
m <- 100 # number of markers
X <- HWData(n,m)
HWQqplot(X,logplot=TRUE,pvaluetype="selome",main="Q-Q Plot for HWE")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.