w.qqplot: W P-values Diagnosis by Q-Q Plot

Description Usage Arguments Details Value Examples

View source: R/w.qqplot.R

Description

Draw a Q-Q plot for W-test

Usage

1
2
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. w.order = 1 gives main effect Q-Q plot. w.order = 2 gives interaction Q-Q plot.

input.poolsize

a numeric number; The maximum number of SNPs to calculate the Q-Q plot. Default is 200. The input.poolsize is suggested to set as 1000 for w.order = 1, and 200 for w.order = 2.

hf1

h and f values to calculate main effect, organized as a matrix, with columns (k, h, f), k = 2 to 3. Needed when w.order = 1.

hf2

h and f values to calculate interaction associations, organized as a matrix, with columns (k, h, f), k = 2 to 9. Needed when w.order = 2.

...

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

1
2
3
4
5
6
7
8
9
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)

wtest documentation built on Sept. 3, 2019, 9:04 a.m.

Related to w.qqplot in wtest...