tag:blogger.com,1999:blog-8499895524521663926.post4147876488825445452..comments2020-02-22T06:38:36.470-05:00Comments on Phylogenetic Tools for Comparative Biology: New version of evol.vcv()Liam Revellhttp://www.blogger.com/profile/04314686830842384151noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-8499895524521663926.post-16212043713389766272012-03-13T13:30:21.044-04:002012-03-13T13:30:21.044-04:00Hi.
I'm a little unclear on your question. In...Hi.<br /><br />I'm a little unclear on your question. In the one VCV matrix case, the evolutionary rates for individual characters, their covariances, & the vector of ancestral states at the root are optimized. Actually, we have an analytic solution for these. In the multiple VCV case we lack an analytic solution & simultaneously optimize the rates, covariances, and ancestral states.<br /><br />dim(C)[3] is supposed to give the number of different rate matrices. Do you have a set of regimes mapped on the tree? See my article with Dave Collar (Revell & Collar <a href="http://anolis.oeb.harvard.edu/~liam/pdfs/Revell_and_Collar_2009.Evol.pdf" rel="nofollow">2009</a>) for more details on this method.<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-62282422746721801982012-03-09T15:50:07.847-05:002012-03-09T15:50:07.847-05:00This might be a silly question, but under the 1 vc...This might be a silly question, but under the 1 vcv matrix case what exactly is being optimized? When going through the code it seems that the vcv matrix is calculated in the "Compute the MLE of R" step. I can't seem to compute the log-likelihood (from the cholesky matrices) because p <- dim(C)[3] gives NA, in my case C is a 5X5 matrix.<br /><br />Thank you for your help!pearsyhttps://www.blogger.com/profile/06230181517634542239noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-27948853090505706002011-09-03T09:41:03.365-04:002011-09-03T09:41:03.365-04:00Hi Dave. That sounds like a good guess. I will t...Hi Dave. That sounds like a good guess. I will try different starting values and see if the optimization "converges" to a different optimum. - LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-86649044635623382542011-09-02T12:11:11.785-04:002011-09-02T12:11:11.785-04:00I have noticed an association between negative var...I have noticed an association between negative variances and unusually large magnitude parameter estimates. (By unusually large, I mean relative to estimates for that parameter on trees/stochastic character maps). Could a flat likelihood curve also explain these extreme parameter values?<br /><br />I should also note, though, that for each case, evol.vcv tells me that the "Optimization has converged."<br /><br />Thanks for your help, Liam!David Collarhttps://www.blogger.com/profile/14782903993294306396noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-29087309702547419952011-09-01T12:37:17.494-04:002011-09-01T12:37:17.494-04:00Hi Dave. Thanks for sending me your data & tr...Hi Dave. Thanks for sending me your data & tree for this.<br /><br />I have been working on this all morning & there is no clear "bug" (in the traditional sense), in that everything seems to be computing correctly. However, the negative variance implies positive curvature of the likelihood surface at the optimum. (This is concerning since at the optimum curvature should be negative.)<br /><br />In your example, it is possible that the curvature is just very flat for the parameter in question and thus the optimizer effectively ends up in a very slightly positively curved location on the likelihood surface in that dimension. I will try different starting values to suss this out.<br /><br />- LiamLiam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-89099375214848288542011-08-31T18:42:07.940-04:002011-08-31T18:42:07.940-04:00Hey Liam, I am running this function for a set of ...Hey Liam, I am running this function for a set of stochastic character histories obtained from SIMMAP, and I occasionally get negative variances for the parameter estimates. I am fitting one and two rate matrix models for three traits and two phylogenetic partitions. Any idea why this is happening?David Collarhttps://www.blogger.com/profile/14782903993294306396noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-86560842944376542582011-08-30T13:46:05.377-04:002011-08-30T13:46:05.377-04:00Thanks Dave. I still want to subject this to more...Thanks Dave. I still want to subject this to more testing - just to make sure that it is doing what it is supposed to be doing - but thanks for the report!Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-20568677817214216832011-08-30T12:08:49.846-04:002011-08-30T12:08:49.846-04:00Liam, It works! This is a nice addition to the fun...Liam, It works! This is a nice addition to the function.David Collarhttps://www.blogger.com/profile/14782903993294306396noreply@blogger.comtag:blogger.com,1999:blog-8499895524521663926.post-47429650551481130752011-08-30T09:29:12.201-04:002011-08-30T09:29:12.201-04:00Note that it is also necessary to install the &quo...Note that it is also necessary to install the "numDeriv" library.Liam Revellhttps://www.blogger.com/profile/04314686830842384151noreply@blogger.com