diff_test {mmod}R Documentation

An exact test of population differentiation for genind objects

Description

This function uses Fisher's exact test to determine if alleles in sub-populations are drawn randomly from a larger population (i.e. a significance test for allelic differentiation among sub-populations).

Usage

diff_test(x, sim = TRUE, nreps = 2000)

Arguments

x

a genind object (from package adegenet)

sim

boolean: if TRUE simulate p-value by using an MCMC sample of those tables that have the same marginal totals as the observed data (required for all but the smallest datasets)

nreps

number of steps used to simulate p-value (default 2000)

Details

Note, this test returns p-values for each locus in a dataset _not_ estimates of effect size. Since most populations have some degree of population differentiation, very large samples are almost guaranteed to return significant results. Refer to estimates of the various differentiation statistics (D, G”ST and Phi'ST)to ascertain how meaningful such results might be.

Value

named vector of p-values testing the null hypothesis these samples where drawn from a panmictic population.

See Also

fisher.test, which this function wraps

Examples


data(nancycats)
diff_test(seploc(nancycats)[[2]], nreps=100)


[Package mmod version 1.3.3 Index]