geiger (version 2.0.6.4)

aov.phylo: phylogenetic ANOVA and MANOVA

Description

computing phylogenetic ANOVA or MANOVA

Usage

```aov.phylo(formula, phy, nsim = 1000,
test = c("Wilks", "Pillai", "Hotelling-Lawley", "Roy"), ...)```

Arguments

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 `print.anova`

Value

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).

Details

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`.

References

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`

Examples

Run this code
``````# 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)
# }
``````

Run the code above in your browser using DataCamp Workspace