eco.association: Chi-square and Fisher's exact test for association of loci...

Description Usage Arguments Author(s) See Also Examples

Description

Chi-square and Fisher's exact test for association of loci and alleles with a factor

Usage

1
2
3
4
5
6
7
8
9
eco.association(
  eco,
  assoc = c("within", "between"),
  x,
  method = c("fisher.test", "chisq.test"),
  nrep = 99,
  adjust = "none",
  ndig = NA
)

Arguments

eco

Object of class "ecogen".

assoc

"between" if the association test should be performed between a factor and a loci, or "within" if the association test should be performed between a factor and alleles within loci. For haploid data, use option "within".

x

The name of the S slot column with the groups for the association test.

method

Test method ("chisq.test" or "fisher.test"). Default is "fisher.test".

nrep

Number of repetitions for the permutation test.

adjust

Correction method of P-values for multiple tests, passed to p.adjust. Default is "none" (no correction).

ndig

Number of digits coding each alleles (e.g. 2: xx, or 3: xxx) when assoc is "within".

Author(s)

Leandro Roser learoser@gmail.com

See Also

chisq.test fisher.test fisher.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

data(eco.test)
eco.association(eco, "within", "pop")
eco.association(eco, "within", "pop", adjust="fdr")
eco.association(eco, "within", "pop", method = "chisq.test")
eco.association(eco, "between", "pop", ndig = 1)
eco.association(eco, "between", "pop", method = "chisq.test", ndig = 1)


## End(Not run)

EcoGenetics documentation built on July 8, 2020, 5:46 p.m.