Description Usage Arguments Details Value References See Also Examples
Returns Strobeck's S statistic.
1 | hstrobecks(n, k, theta)
|
n |
The number of total sequences/individuals |
k |
The number of unique alleles |
theta |
The average pairwise nucleotide divergence |
Strobeck's S is a population genetics statistic that is used to detect population structure. It is related conceptually (and computationally) to Fu's Fs, which has been argued to be a more appropriate statistic due to it's higher dynamic range, owing to the use of a logit transformation for Fu's Fs. In cases where Fu's Fs becomes more negative, Strobeck's S approaches 1.
Computationally, Strobeck's S and Fu's Fs can be defined in terms of Stirling numbers of the first kind. These numbers can grow large very quickly.
‘hstrobecks' calculates Strobeck’s S directly using Stirling numbers, switching to a logarithmic esimator for Stirling numbers (implemented in the lstirling function) when needed to avoid overflow errors.
Strobeck's S
Fu, Y.X. (1996) New statistical tests of neutrality for DNA samples from a population. Genetics 143:557-70 Strobeck, C. (1987) Average number of nucleotide differences in a sample from a single subpopulation: a test for population subdivision. Genetics 117:149-53
‘hfufs' for a Fu’s Fs calculator and 'lstirling' for the Stirling number estimator
1 2 3 4 5 | n <- 100
k <- 30
theta <- 12.345
hstrobecks(n, k, theta)
# 0.7576966
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.