Learn R Programming

poppr (version 1.0.5)

ia: Index of Association

Description

Calculate the Index of Association and Standardized Index of Association. Obtain p-values from one-sided permutation tests.

Usage

ia(pop, sample = 0, method = 1, quiet = FALSE, missing = "ignore",
  hist = TRUE)

Arguments

pop
a genind object OR any fstat, structure, genetix, genpop, or genalex formatted files.
sample
an integer indicating the number of permutations desired (eg 999).
method
an integer from 1 to 4 indicating the sampling method desired. see shufflepop for details.
quiet
Should the function print anything to the screen while it is performing calculations?

TRUE prints nothing.

FALSE (defualt) will print the population name and progress bar.

missing
a character string. see missingno for details.
hist
logical if TRUE, a histogram will be printed for each population if there is sampling.

Value

  • If no sampling has occured:

    A named number vector of length 2 giving the Index of Association, "Ia"; and the Standardized Index of Association, "rbarD"

    If there is sampling:

    A a named number vector of length 4 with the following values:

  • Ianumeric. The index of association.
  • p.IaA number indicating the p-value resulting from a one-sided permutation test based on the number of samples indicated in the original call.
  • rbarDnumeric. The standardized index of association.
  • p.rDA factor indicating the p-value resutling from a one-sided permutation test based on the number of samples indicated in the original call.

References

Paul-Michael Agapow and Austin Burt. Indices of multilocus linkage disequilibrium. Molecular Ecology Notes, 1(1-2):101-102, 2001

A.H.D. Brown, M.W. Feldman, and E. Nevo. Multilocus structure of natural populations of hordeum spontaneum. Genetics, 96(2):523-536, 1980.

J M Smith, N H Smith, M O'Rourke, and B G Spratt. How clonal are bacteria? Proceedings of the National Academy of Sciences, 90(10):4384-4388, 1993.

See Also

poppr, missingno, import2genind, read.genalex, clonecorrect

Examples

Run this code
data(nancycats)
ia(nancycats)

# Get the index for each population.
lapply(seppop(nancycats), ia)
# With sampling
lapply(seppop(nancycats), ia, sample=999)

Run the code above in your browser using DataLab