observedStatistics: Compute observed statistics for a genotype count matrix

Description Usage Arguments Value Examples

Description

#' Four measures of fit to Hardy-Weinberg for a given set of genotype counts may be computed.

Usage

1
2
3
4
5
6
7
observedProb(c)

observedLLR(c)

observedU(c)

observedX2(c, returnExpected = F)

Arguments

c

Matrix of observed genotype counts. Each number should be a non-negative integer, and matrix is k x k.

returnExpected

Used in observedX2 to indicate whether a matrix of expected numbers should be returned instead.

Value

the observed statistic

Examples

1
2
t <- vec.to.matrix(c(0,3,1,5,18,1,3,7,5,2))
observedStats <- c(observedProb(t), observedLLR(t), observedU(t), observedX2(t))

HWxtest documentation built on May 31, 2019, 9:04 a.m.