w.qqplot {wtest} | R Documentation |
W P-values Diagnosis by Q-Q Plot
Description
Draw a Q-Q plot for W-test
Usage
w.qqplot(data, y, w.order = c(1, 2), input.poolsize = 200,
hf1 = "default.hf1", hf2 = "default.hf2", ...)
Arguments
data |
a data frame or matrix containing genotypes in the columns. Genotypes should be coded as (0, 1, 2) or (0, 1). |
y |
a numeric vector of 0 or 1. |
w.order |
a numeric number taking values 1 or 2. |
input.poolsize |
a numeric number; The maximum number of SNPs to calculate the Q-Q plot. Default is 200. The |
hf1 |
h and f values to calculate main effect, organized as a matrix, with columns (k, h, f), k = 2 to 3. Needed when |
hf2 |
h and f values to calculate interaction associations, organized as a matrix, with columns (k, h, f), k = 2 to 9. Needed when |
... |
graphical parameters. |
Details
With a given data and y, the p-value of W-test is calculated at given h and f values, which are plotted against the theoretical distribution.
Value
Q-Q plot
Examples
data(diabetes.geno)
data(phenotype1)
## Step 1. HF Calculation
# Please note that parameter B is recommended to be greater than 400.
hf1<-hf(data = diabetes.geno, w.order = 1, B = 200)
## Step 2. Q-Q Plot
w.qqplot(data = diabetes.geno, y = phenotype1, w.order = 1, hf1 = hf1, cex =.5)
abline(0,1)