HWE {GeneticsBase}R Documentation

Test the significances of Hardy-Weinberg Equilibrium (dis)equilibrium) statistics

Description

Test the significances of Hardy-Weinberg Equilibrium (dis)equilibrium) statistics for each marker in a data set.

Usage

HWE(object, 
    test = c("exact", "permutation", "chisq"), 
    B = 10000, 
    R = 1000, 
    correct = TRUE, 
    conf = c(0.95), 
    na.rm = TRUE, 
    founderOnly = TRUE, 
    ...) 

Arguments

object a geneSet object.
test specifys the test method. Available methods are “exact”, “permutation”, “chisq”.
B an integer specifying the number of replicates used in the Monte Carlo test. Defaults to 10000.
R Number of bootstrap iterations to use when computing the confidence interval. Defaults to 1000.
correct see diseq.ci.
conf Confidence level to use when computing the confidence level for linkage disequilibrium measures. Defaults to 0.95, should be in (0,1).
na.rm logical. Should missing values be removed?
founderOnly Indicates if only founders are used to do the test.
... othere arguments used by the function chisq.test.

Value

The function HWE returns a list:

“diseq” a character string.
call the matched call.
“D” a matrix with $m$ rows and $3+p$ columns, where $m$ is the number of markers in the geneSet, $p$ is the number of elements of the argument conf. The first column is the estimated “D”. The next $p$ columns are estimated confidence limits for the confidence levels specified in the argument conf. The last two columns are the sample size and the p-value of the test that “D” is equal to zero.
“D'” a matrix with $m$ rows and $3+p$ columns, where $m$ is the number of markers in the geneSet, $p$ is the number of elements of the argument conf. The first column is the estimated “D'”. The next $p$ columns are estimated confidence limits for the confidence levels specified in the argument conf. The last two columns are the sample size and the p-value of the test that “D'” is equal to zero.
“r” a matrix with $m$ rows and $3+p$ columns, where $m$ is the number of markers in the geneSet, $p$ is the number of elements of the argument conf. The first column is the estimated “r”. The next $p$ columns are estimated confidence limits for the confidence levels specified in the argument conf. The last two columns are the sample size and the p-value of the test that “r” is equal to zero.
“X$^2$” a matrix with $m$ rows and $3+p$ columns, where $m$ is the number of markers in the geneSet, $p$ is the number of elements of the argument conf. The first column is the test statistic “X$^2$” for HWE test. The next $p$ columns are zeros. The last two columns are the sample size and the p-value of the test for Hardy-Weinberg equilibrium.

Author(s)

Gregory R. Warnes gregory.r.warnes@pfizer.com and Nitin Jain nitin.jain@pfizer.com

Examples

library(GeneticsBase)
data(CAMP)

HWE(CAMP)


[Package GeneticsBase version 1.2.0 Index]