d_stat: Compute D-statistics

Description Usage Arguments

View source: R/d_stat.R

Description

Computes the unbiased estimative of D-statististic, also known as 4-population test, used to measure populations strutcture as described by Patterson et al. 2012. Giving 4 populations (W, X, Y, and Z), D-statistic compares the probability of a BABA event, meaning W and Y agree and X and Z agree, to the probability of a ABBA event, meaning W and Z agree. When D-statistic present positive values it favors BABA, when negative present ABBA, and zero favors AABB (W and X agree). The D-statistic describe the following equation:

D = (P(BABA) - P(ABBA)) / (P(BABA) + P(ABBA))

Usage

1
d_stat(ac, pops)

Arguments

ac

A allele count matrix including the populations to investigate.

pops

A vector of populations to compute the statistic.


andremrsantos/htspop documentation built on May 14, 2020, 11:40 a.m.