Learn R Programming

HIest (version 2.0)

longX2: Longs heterogeneity test for admixture proportions in a single population.

Description

For hybrid individuals genotyped with diagnostic markers (one allele fixed in each parental lineage), the null hypothesis that variation in allele frequencies is explained by sampling and drift (no selection) is evaluated with a chi-squared test statistic.

Usage

longX2(Freqs)

Arguments

Freqs
A vector of allele frequencies (one estimate per locus in a single population).

Value

A list with the following items is returned.
test
a list including the global test statistic, degrees of freedom, and p-value.
chisq.res
Chi-squared residuals for each marker

References

Long, J. C. (1991). The genetic structure of admixed populations. Genetics, 127:417-428. Fitzpatrick, B. M., Johnson, J. R., Kump, D. K., Shaffer, H. B., Smith, J. J., and Voss, S. R. (2009). Rapid fixation of non-native alleles revealed by genome-wide snp analysis of hybrid tiger salamanders. BMC Evolutionary Biology, 9:176.

Examples

Run this code
longX2(c(0.95,rbeta(20,2,5)))

Run the code above in your browser using DataLab