fit.discrete {geiger} | R Documentation |
Fits macroevolutionary models to phylogenetic trees
fit.discrete(tip.data, phy, lambda=FALSE, delta=FALSE, start=1.0)
tip.data |
Character states for tip data; names should match, and data should be a factor with levels |
phy |
Phylogenetic tree in ape format |
lambda |
Estimate lambda? |
delta |
Estimate delta? |
start |
Starting guess for q |
Returns maximum likelihood value for q and selected parameters, along with the likelihood score Sometimes, parameters are confounded!
Luke J. Harmon and R. E. Glor
data(geospiza) attach(geospiza) drop.tip(geospiza.tree, "olivacea")->g.tree gb<-as.factor(geospiza.data[,1]>4.2) names(gb)<-rownames(geospiza.data) fit.discrete(gb, g.tree) fit.discrete(gb, g.tree, lambda=TRUE) fit.discrete(gb, g.tree, delta=TRUE)