R/HW.chi.mat.R

Defines functions HW.chi.mat

HW.chi.mat <- function(X) {
  n <- rowSums(X)
  nA <- 2*X[,1] + X[,2]
  nB <- 2*X[,3] + X[,2]
  chi <- (4*X[,1]*X[,3] - X[,2]*X[,2])/(nA*nB)
  chi <- n*chi*chi
}

Try the HardyWeinberg package in your browser

Any scripts or data that you put into this service are public.

HardyWeinberg documentation built on May 29, 2024, 6:17 a.m.