Description Usage Arguments Details Value References Examples
Returns Fu's Fs statistic.
1 | afufs(n, k, theta)
|
n |
The number of total sequences/individuals |
k |
The number of unique alleles |
theta |
The average pairwise nucleotide divergence |
Fu's Fs is a population genetics statistic that is useful for detecting loci that are responsible for population expansion, for example. Fu's Fs can be formulated as a calculation that involves Stirling numbers of the first kind. These can get large very quickly and exceed the floating point range for modern genomic data sets.
‘afufs' calculates Fu’s Fs using a single term asymptotic approximation This contrasts with 'hfufs' which uses a Stirling number approximator for each term. 'afufs' is therefore simultaneously more accurate and faster.
Fu's Fs
Chen, S.L. and Temme, N. (2020) Computing sums of Stirling numbers of the first kind: Application to population genetics statistics. In preparation.
1 2 3 4 5 | n <- 100
k <- 30
theta <- 12.345
afufs(n, k, theta)
# -0.7368616
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.