fstat_varcomps | R Documentation |
Takes a list of values of allele frequencies, sample sizes, number of
populations, and heterozygosity, and returns variance components, as
per Weir & Cockerham (1984). Assumes that all values are for a single
biallelic SNP locus.
Note, this function is not exported and is an
internal function for fstat_calc
.
fstat_varcomps(pi, ni, r, hi)
pi |
Numeric: A vector of allele frequencies for each population. |
ni |
Numeric: A vector of sample sizes (number of diploid individuals) for each population. |
r |
Integer: A single value, the number of populations. |
hi |
Numeric: A vector of observed heterozygosities for each population. |
Returns a data table with three columns $A
, $B
,
$C
, which correspond to the 'a', 'b' and 'c' variance components
described in Weir & Cockheram (1984).
Weir & Cockerham (1984) Evolution. DOI: 10.1111/j.1558-5646.1984.tb05657.x Weir et al. (2002) Annals of Human Genetics. DOI: 10.1146/annurev.genet.36
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.