hf: Patameter Estimation for W-test Probability Distribution

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/hf.R

Description

Estimate parameters (h and f) for W-test.

Usage

1
2
hf(data, w.order, B = 400, n.sample = nrow(data),
  n.marker = "default.nmarker")

Arguments

data

a data frame or matrix containing genotypes in the columns and subjects in the rows. Genotypes should be coded as (0, 1, 2) or (0, 1).

w.order

a numeric number. w.order = 1 gives main effect calculation. w.order = 2 gives pairwise interaction calculation. w.order > 2 gives high order interaction calculation.

B

a numeric number specifying the number of replicates. Default is 400.

n.sample

a numeric number specifying the number of samples to be used for estimating parameters. Default is the total number of samples in the data.

n.marker

a numeric value, the number of biomarkers to include in bootstrapping. For order = 1, the default = min(P, 1000), and for order = 2, default = min(P, 50). P is the total number of markers in the data.

Value

a set of h and f values indexed by k, estimated automatically. For main effect, k is the number of levels of a predictor variable. For interactions, k is the number of categorical combinations of a variable pair.

Author(s)

Rui Sun, Maggie Haitian Wang

References

Maggie Haitian Wang, Rui Sun, Junfeng Guo, Haoyi Weng, Jack Lee, Inchi Hu, Pak Sham and Benny C.Y. Zee (2016). A fast and powerful W-test for pairwise epistasis testing. Nucleic Acids Research. doi:10.1093/nar/gkw347.

See Also

wtest, w.diagnosis, w.qqplot

Examples

1
2
3
4
5
6
data(diabetes.geno)

# Please note that parameter B is recommended to be greater than 400.
# For high order interaction analysis (w.order > 2), it is recommended to use default n.sample.
hf1 <- hf(data = diabetes.geno, w.order = 1, B = 100)
hf2 <- hf(data = diabetes.geno, w.order = 2, B = 80)

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

Related to hf in wtest...