Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

g.stats

Calculates likelihood-ratio G-statistic on contingency table


Description

Calculates the likelihood ratio G-statistic on a contingency table of alleles at one locus X sampling unit. The sampling unit could be any hierarchical level

Usage

g.stats(data,diploid=TRUE)

Arguments

data

a two-column data frame. The first column contains the sampling unit, the second the genotypes

diploid

Whether the data are from diploid (default) organisms

Value

obs

Observed contingency table

exp

Expected number of allelic observations

X.squared

The chi-squared statistics, Sum (O-E)^2/E

g.stats

The likelihood ratio statistics, 2 Sum(O Log(O/E))

Author(s)

Jerome Goudet, DEE, UNIL, CH-1015 Lausanne Switzerland

References

Goudet J., Raymond, M., DeMeeus, T. and Rousset F. (1996) Testing differentiation in diploid populations. Genetics. 144: 1933-1940

Goudet J. (2005). Hierfstat, a package for R to compute and test variance components and F-statistics. Molecular Ecology Notes. 5:184-186

Petit E., Balloux F. and Goudet J.(2001) Sex-biased dispersal in a migratory bat: A characterization using sex-specific demographic parameters. Evolution 55: 635-640.

See Also

Examples

data(gtrunchier)
attach(gtrunchier)
g.stats(data.frame(Patch,L21.V))

hierfstat

Estimation and Tests of Hierarchical F-Statistics

v0.5-10
GPL (>= 2)
Authors
Jerome Goudet [aut, cre], Thibaut Jombart [aut], Zhian N. Kamvar [ctb], Eric Archer [ctb], Olivier Hardy [ctb]
Initial release
2021-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.