Learn R Programming

HardyWeinberg (version 1.6.1)

HWf: Computation of inbreeding coefficient

Description

HWf computes the inbreeding coefficient for a sample of genotypes.

Usage

HWf(X)

Arguments

X

a vector of genotype counts (AA, AB, BB)

Value

Returns the inbreeding coefficient (intraclass correlation coefficient)

Details

For monomorphic markers a warning is issued, and the estimate for the inbreeding coefficient is set to zero.

References

Crow, J. F. and Kimura, M. (1970) An introduction to population genetics theory. Harper \& Row, publishers, New York

See Also

HWChisq

Examples

Run this code
# NOT RUN {
x <- c(MM=298,MN=489,NN=213)
f <- HWf(x)
cat("Inbreeding coefficient: ",f,"\n")
# }

Run the code above in your browser using DataLab