Learn R Programming

strataG (version 2.0.2)

mRatio: M ratio

Description

Calculate Garza-Williamson M ratio (bottleneck) statistic for microsattelite data.

Usage

mRatio(g, by.strata = TRUE, rpt.size = 8:2)

Arguments

g

a '>gtypes object.

by.strata

calculate ratio for each stratum separately?

rpt.size

set of values to check for allele repeat size. Function will use the largest common denominator found in this vector or return NA.

Value

If by.strata = TRUE, a matrix with loci as rows and strata as columns, otherwise a vector with the statistic for each locus over all samples.

References

Garza, J.C. and E.G. Williamson. 2001. Detection of reduction in population size using data form microsatellite loci. Molecular Ecology 10(2):305-318.

Examples

Run this code
# NOT RUN {
data(msats.g)

m.by.strata <- mRatio(msats.g, TRUE)
m.by.strata

m.overall <- mRatio(msats.g, FALSE)
m.overall

# }

Run the code above in your browser using DataLab