HWf {HardyWeinberg} | R Documentation |
Computation of inbreeding coefficient
Description
HWf
computes the inbreeding coefficient for sample
of genotype counts, or a matrix of genotype counts.
Usage
HWf(X)
Arguments
X |
a vector or matrix of genotype counts (AA, AB, BB) |
Details
For monomorphic markers a warning is issued, and the estimate for the inbreeding coefficient is NaN.
Value
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.
Author(s)
Jan Graffelman jan.graffelman@upc.edu
References
Crow, J. F. and Kimura, M. (1970) An introduction to population genetics theory. Harper & Row, publishers, New York
See Also
Examples
#
# 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)
[Package HardyWeinberg version 1.7.8 Index]