HWf | R Documentation |
HWf
computes the inbreeding coefficient for sample
of genotype counts, or a matrix of genotype counts.
HWf(X)
X |
a vector or matrix of genotype counts (AA, AB, BB) |
For monomorphic markers a warning is issued, and the estimate for the inbreeding coefficient is NaN.
Returns a single inbreeding coefficient (intraclass correlation coefficient), if X
is a single sample, or a vector of inbreeding coefficients, if X
is a matrix with genotype counts.
Jan Graffelman jan.graffelman@upc.edu
Crow, J. F. and Kimura, M. (1970) An introduction to population genetics theory. Harper & Row, publishers, New York
HWChisq
#
# A single sample
#
x <- c(MM=298,MN=489,NN=213)
fhat <- HWf(x)
fhat
#
# Multiple samples
#
set.seed(123)
X <- HWData(nm=100,n=1000)
fhat <- HWf(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.