powered by
#' Four measures of fit to Hardy-Weinberg for a given set of genotype counts may be computed.
observedProb The probability of the observed set under the HW null and with the allele counts fixed.
observedProb
observedLLR The log-likelihood ratio of the observed set
observedLLR
observedU The observed U-score. Positive values indicate an excess of homozygotes and negative ones imply too many heterozygotes
observedU
observedX2 The classical “chi-squared” statistic
observedX2
observedProb(c)observedLLR(c)observedU(c)observedX2(c, returnExpected = F)
observedLLR(c)
observedU(c)
observedX2(c, returnExpected = F)
Matrix of observed genotype counts. Each number should be a non-negative integer, and matrix is \(k x k\).
Used in observedX2 to indicate whether a matrix of expected numbers should be returned instead.
the observed statistic
# NOT RUN { 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)) # }
Run the code above in your browser using DataLab