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 7, 2022, 5:05 p.m.