This function returns a list of expected counts of itons up to n-1, or a plot if specified. It builds the site frequency spectrum using Kingman's coalescent. It works for different values of `theta` (population mutation parameter).

sfs(n, theta = 2, plot = FALSE)

Arguments

n

sample size

theta

population mutation parameter

plot

logical

Details

By default, a list of expected values for each i-ton and its variance is returned. If plot=TRUE, then a plot is returned.

Examples

sfs(n = 5, theta = 3)
#> $E_ksi #> [1] 3.00 1.50 1.00 0.75 #> #> $Var_ksi #> [1] 6.6250 4.2500 2.7500 2.4375 #>