phylANOVA: Phylogenetic ANOVA and post-hoc tests
Description
This function performs the phylogenetic ANOVA of Garland et al. (1993) and (optionally) conducts all posthoc comparisons of means among groups (also obtaining the P-values by phylogenetic simulation).Usage
phylANOVA(tree, x, y, nsim=1000, posthoc=TRUE, p.adj="holm")
Arguments
tree
a phylogenetic tree in "phylo"
format.
x
a vector containing the groups.
y
a vector containing the response variable (continuously valued).
nsim
an integer specifying the number of simulations (including the observed data).
posthoc
a logical value indicating whether or not to conduct posthoc tests to compare the mean among groups.
p.adj
method to adjust P-values for the posthoc tests to account for multiple testing. Options same as p.adjust
. Value
- a list containing the following elements:
- FF from observed data.
- PfP-value for F from simulation.
- Tmatrix of t-values.
- Ptmatrix of multiple test corrected P-values from posthoc t-tests.
Details
Uses a little bit of code from phy.anova
in the "geiger" package as well as pairwise.t.test
.References
Garland, T., Jr., A. W. Dickerman, C. M. Janis, & J. A. Jones. 1993. Phylogenetic analysis of covariance by computer simulation. Systematic Biology, 42, 265-292.