aov.phylo | R Documentation |
computing phylogenetic ANOVA or MANOVA
aov.phylo(formula, phy, nsim = 1000,
test = c("Wilks", "Pillai", "Hotelling-Lawley", "Roy"), ...)
formula |
a formula specifying the model (see Examples) |
phy |
a phylogenetic tree of class 'phylo' |
nsim |
number of simulations to run |
test |
test statistic to apply if MANOVA |
... |
additional arguments to be passed to |
This function performs an ANOVA or MANOVA in a phylogenetic context. First, the test statistic for ANOVA
(one dependent variable) or MANOVA (more than one dependent variable) is calculated. The null distribution
of this test statistic is then obtained by simulating new sets of dependent variables on the phylogenetic
tree. Simulations are run under a Brownian-motion model. For ANOVA, the rate parameter is estimated from
the average squared independent contrast; for MANOVA the simulations use an estimated variance-covariance
matrix from ratematrix
.
For MANOVA, you can specify the test statistic for the summary table. Wilks' statistic is most popular in the
literature and for further details, see summary.manova
.
The function prints (and returns) a standard ANOVA or MANOVA table and p-value based on simulations (from the Pr(phy)
column). For convenience, the summary table is included as an attribute of the returned object (see Examples).
JM Eastman and LJ Harmon
Garland T Jr, AW Dickerman, CM Janis, and JA Jones. 1993. Phylogenetic analysis of covariance by computer simulation. Systematic Biology 42(3):265-292.
aov
; anova
; summary.manova
; ratematrix
## Not run:
geo=get(data(geospiza))
dat=geo$dat
d1=dat[,1]
grp<-as.factor(c(rep(0, 7), rep(1, 6)))
names(grp)=rownames(dat)
## MANOVA
x=aov.phylo(dat~grp, geo$phy, nsim=50, test="Wilks")
print(attributes(x)$summary) # summary table
## ANOVA
x1=aov.phylo(d1~grp, geo$phy, nsim=50)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.