Learn R Programming

geiger (version 0.2-5)

fit.discrete: Model fitting for discrete comparative data

Description

Fits macroevolutionary models to phylogenetic trees

Usage

fit.discrete(tip.data, phy, lambda=FALSE, delta=FALSE, start=1.0)

Arguments

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

Value

  • Returns maximum likelihood value for q and selected parameters, along with the likelihood score Sometimes, parameters are confounded!

Examples

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

Run the code above in your browser using DataLab