I’m writing with an issue using the chronos function in ape:

I have a rooted supertree of 186 taxa (genetic & linguistic data), and am 
trying to time-calibrate with a set of divergence dates (genetic & linguistic; 
available for about 1/3 of nodes). 

I’m using chronos and calling agemin and agemax from a table of dates: 

tree.dated <- chronos(tree, calibration = makeChronosCalib(tree, node=dat$node, 
age.min=dat$agemin, age.max=dat$agemax))

I have the following error:

Setting initial dates...
Fitting in progress... get a first set of estimates

Error in nlminb(start.para, f, g, control = opt.ctrl, lower = LOW, upper = UP) 
  gradient function must return a numeric vector of length 161
In addition: Warning message:
In nlminb(start.para, f, g, control = opt.ctrl, lower = LOW, upper = UP) :
  NA/NaN function evaluation

I have had a brief look at the chronos function, and cannot determine where the 
error is generated. The error message is slightly different if I alter the 
substitution model, and seems to trip up at a different point. I’m not sure if 
it begins in setting “ini.rate” as this appears to be where the error appears 
for model = “discrete”. 

I have tried updating ape, altering my set of dates to a few nodes, removing 
the date for the root, listing node numbers and ages rather than calling it 
from the table, and reading my tree with read.nexus and in parenthetic format 
in case the tree object was problematic. I’ve noticed that the vector length 
the gradient function must generate varies depending on the number of known 
node ages provided - but I can’t figure out much more than that.

I was hoping someone had some suggestion on how I can deal with this error - 
essentially where the source of the error might be so I can adjust my input 
accordingly! Or, alternatively if anyone has a suggestion for different ways to 
time-calibrate the tree (other than chronos).

Thank you!



R-sig-phylo mailing list - R-sig-phylo@r-project.org
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to