Hello, This is Elaine.
I want to calculate lambda based on a bird data and a polygeny tree, using geiger. However, an error message below jumped out. I do not understand it quite well. Please kindly help explain its meaning and advise any code modification to calculate lambda. (BTW, I found Dr. Liam's modification (trend) on fitContinuous but do not know how to apply it.)(# written by Liam J. Revell 2011) Thank you very much. Elaine Error > lambda_Mig_ML<-fitContinuous(phy= tree.pruned, data = birddata, + data.names = birddata$Family,model = "lambda") Fitting lambda model: Error in optim(foo, p = start, lower = lower, upper = upper, method = "L") : non-finite value supplied by optim In addition: Warning message: In var(ds$data) : NAs introduced by coercion Code Library(ape) birddata <- read.csv("H:/ birddata_family_20130405.csv", header = TRUE) birdtree <- read.nexus("H:/ birddata_family_20130405.nexus") setwd("H:) ## prune the phylogeny to include only species which are in the data set species.to.keep<-read.csv("H:/ birddata_family_20130405.csv", header = TRUE) tree.pruned<-drop.tip(birdtree,tree.pruned<-drop.tip(tree,** setdiff(tree$tip.label,ss)) library(geiger) # compute lambda using fitDiscrete or fitContinuous functions of geiger lambda_Mig_ML<-fitContinuous(phy= tree.pruned, data = birddata, data.names = birddata$Family,model = "lambda") lambda_GL_ML [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/