Hello, I am trying to run the rateshift function from phytools on a rather large phylogeny (500 species). With nrates=1 (null model) everything works fine. Using nrates=2 also completed successfully, but did not reach convergence: > bm_multi = rateshift(tree, data, nrates=2) > bm_multi$convergence 0
I therefore tried to increase to niter=100, but then I got the following error: Optimization progress: |........Error in solve.default(model2$hessian) : Lapack routine dgesv: system is exactly singular: U[3,3] = 0 Calls: rateshift Execution halted I also tried changing to method='REML' and got a slightly different error: Optimization progress: |............................................................................Error in optimHess(sig2, lik2, tree = tree, x = x) : non-finite finite-difference value [2] Calls: rateshift Execution halted I saw in an old post <http://blog.phytools.org/2017/10/fix-to-optimization-routine-for-non.html> that a similar issue was fixed in fit.bd. Is there any fix for rateshit? Alternatively, has anything similar been implemented in another function/package? Or any other suggestion on how to go around this? Thanks!
rateshift.RData
Description: Binary data
_______________________________________________ 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/