HWf: Computation of inbreeding coefficient

View source: R/HWf.R

HWfR 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

HWChisq

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)

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