[R-sig-phylo] problem to fit a Brownian motion with a trend using fitContinuous (geiger)

Sebastien Lavergne sebastien.lavergne at ujf-grenoble.fr
Fri Jan 16 17:53:41 CET 2009

Dear all,

I am trying to fit a number of different evolutionary models to a data 
set of continuous traits using the functions fitContinuous (from library 
geiger), but I am having trouble to have the function fit a model of 
Brownian motion with a trend (see example code below). I get an error 
message and I am not even sure to fully understand it. Does anybody have 
an idea of where this comes from? or is this simply a bug of the function ?
Any help appreciated.


PS- Here is a sample code with simulated tree and data :
 > library(ape) ; library(geiger) ; library(picante)
 > tree <- rcoal(250)
 > traits <- evolve.brownian(tree, value=2, var=0.5)
 > try.fit<- fitContinuous(tree, traits, model="trend")
Fitting  trend model:
Erreur dans optim(p0, fn = lnl.BMtrend, vcv = vcv, x = y, se = meserr, 
lower = lower,  :
  valeur non-finie fournie par optim
Translation for the error message:
Error in optim(...), no value provided by optim

 Sébastien Lavergne
 Laboratoire d'Ecologie Alpine, UMR-CNRS 5553
 Université Joseph Fourier
 BP 53, 38041 Grenoble Cedex 9, France
 tel +33 (0)4 76 63 54 50

More information about the R-sig-phylo mailing list