Learn R Programming

strataG (version 1.0.5)

expectedNumAlleles: Expected Number of Alleles

Description

Calculate the expected number of alleles in a sample of a given size and value of theta.

Usage

expectedNumAlleles(n, theta, ploidy)

Arguments

n
size of sample.
theta
value of theta in population (= 2 * ploidy * Ne * mu).
ploidy
ploidy of locus.

Value

a two element vector with the expected number of alleles (num.alleles) and variance (var.num.alleles).

References

Ewens, W. 1972. The sampling theory of selectively neutral alleles. Theoretical Population Biology 3:87-112. Eqns. 11 and 24.

See Also

wrightFst, numGensEq, fstToNm

Examples

Run this code
expectedNumAlleles(20, 1, 2)

# double the samples
expectedNumAlleles(40, 1, 2)

# for a haploid locus
expectedNumAlleles(40, 1, 1)

# double theta
expectedNumAlleles(40, 2, 1)

Run the code above in your browser using DataLab