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

Description Usage Arguments Value Author(s) References Examples

View source: R/LongX2.R

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

1
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

Author(s)

Ben Fitzpatrick

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

1
longX2(c(0.95,rbeta(20,2,5)))

Example output

Loading required package: nnet
$test
     chisq df        p.val
1 68.80828 20 2.847336e-07

$chisq.res
 [1]  6.7709125 -1.2625182  0.4752645  0.7317250 -1.8854291 -2.8114001
 [7] -0.2096671 -0.7384007  0.6141498  0.1706518 -0.4810714  0.2414883
[13] -2.3528665  0.6463965 -0.9151246 -0.4062407  0.3003851  0.6023712
[19] -0.4662021  0.4400319  0.2082467

Warning message:
In Freqs * (1 - Freqs) * MSE :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

HIest documentation built on May 2, 2019, 10:21 a.m.