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)
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 |
ndig | Number of digits coding each alleles (e.g. 2: xx, or 3: xxx) when assoc is "within". |
chisq.test
fisher.test
fisher.test
# 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) # }