Learn R Programming

geiger (version 0.2-5)

phy.anova: Phylogenetic ANOVA and MANOVA

Description

Calculates ANOVA or MANOVA, and returns p-value based on Brownian motion simulations

Usage

phy.anova(y, factor, phy, nsim=1000)
phy.manova(y, factor, phy, nsim=1000, test="Wilks")

Arguments

y
Independent variable(s) - continuous
factor
Dependent variable - factor
phy
Phylogenetic tree
nsim
Number of simulations for calculating p-value
test
The name of the test statistic to be used. Partial matching is used so the name can be abbreviated.

Value

  • Standard ANOVA or MANOVA table and p-value based on simulations

Details

Simulations are run under a Brownian motion model. For MANOVA the estimates vcv matrix from ic.sigma is used as a model.

You can specify the test statistic for the summary table. Wilks' statistic is most popular in the literature.

References

Garland

Examples

Run this code
data(geospiza)
attach(geospiza)

drop.tip(geospiza.tree, "olivacea")->g.tree

f<-as.factor(c(rep(0, 7), rep(1, 6)))


phy.manova(geospiza.data, f, g.tree)

x<-geospiza.data[,1]
names(x)<-rownames(geospiza.data)


phy.anova(x, f, g.tree)

Run the code above in your browser using DataLab