Dear Ting-Wen. Yes, if "R thinks optimization may have not converged" you should run optimization again. Indeed, it may be wise to do this /even if/ R thinks optimization _has_ converged (R can be wrong).
If you are using /fitMk/ in /phytools/, you must set the argument /rand_start=TRUE/ to ensure that each optimization is starting from a different set of initial values. There are lot of examples of how to do this efficiently available online. For example: 1. Running multiple optimization iterations of /fitMk/ in parallel using the /foreach/ package: http://blog.phytools.org/2024/04/another-post-about-running-multiple.html. 2. Running multiple parallelized optimizations (in series) using /fitMk.parallel/: http://www.phytools.org/Rbook/6/corrections.html. (There are lots of other examples on my blog: http://blog.phytools.org/.) Best wishes, Liam Liam J. Revell Professor of Biology, University of Massachusetts Boston Web: http://faculty.umb.edu/liam.revell/ Book: Phylogenetic Comparative Methods in R <https://press.princeton.edu/books/phylogenetic-comparative-methods-in-r> (/Princeton University Press/, 2022) On 11/11/2024 6:28 AM, Chen, Ting-Wen wrote: > CAUTION: EXTERNAL SENDER > > Dear experts in phylogenetic comparative methods, > > When I ran the fitMk function from phytools (actually the fitMk.parallel I > was using), I got a message saying "R thinks optimization may not have > converged”. > > Would this be a problem if I continue to use the Qmatrix generated by fitMk > for downstream analysis such as simmap? Or how can I fix this by letting the > function run longer until it finds a better solution? > > Thank you very much in advance! > > > Kind regards > Ting-Wen > > -- > Ph.D. Ting-Wen Chen > Animal Ecology (AG Scheu) > J.F. Blumenbach Institute of Zoology and Anthropology > Georg August Universität Göttingen > Untere Karspüle 2 > D-37073 Göttingen, Germany > https://www.uni-goettingen.de/en/348915.html > > > [[alternative HTML version deleted]] > > _______________________________________________ > R-sig-phylo mailing list [email protected] > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive athttp://www.mail-archive.com/[email protected]/ [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/[email protected]/
