Learn R Programming

poppr (version 1.0.1)

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 = "minimal",
    missing = "ignore", hist = TRUE)

Arguments

pop
a genind object OR any fstat, structure, gentix, 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 popsample for details.
quiet
Should the function print anything to the screen while it is performing calculations?

TRUE prints nothing.

FALSE same as "minimal".

"minimal" (defualt) will print the population name and dots indicating

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.

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