expectedHomozygosity: Expected homozygosity and heterozygosity
Description
Computes the expected homozygosity and heterozygosity for a marker from its
allele frequencies. The homozygosity is \(\sum_i p_i^2\) and the
heterozygosity is one minus this.
Usage
expectedHomozygosity(p)
expectedHeterozygosity(p)
Value
A numeric value giving the expected homozygosity or heterozygosity.
Arguments
p
A numeric vector of allele frequencies, or a marker object (from
which the frequencies are extracted with afreq()).