
Chi-square and Fisher's exact test for association of loci and alleles with a factor
eco.association(eco, assoc = c("within", "between"), x,
method = c("fisher.test", "chisq.test"), nrep = 99, adjust = "none",
ndig = NA)
Object of class "ecogen".
"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".
The name of the S slot column with the groups for the association test.
Test method ("chisq.test" or "fisher.test"). Default is "fisher.test".
Number of repetitions for the permutation test.
Correction method of P-values for multiple tests,
passed to p.adjust
. Default is "none" (no correction).
Number of digits coding each alleles (e.g. 2: xx, or 3: xxx) when assoc is "within".
# NOT RUN {
# }
# 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)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab