HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> Model comparison issue
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1289051523

Message started by Miguel Lacerda on Nov 6th, 2010 at 6:51am

Title: Model comparison issue
Post by Miguel Lacerda on Nov 6th, 2010 at 6:51am
Hi Sergei,

I am trying to compare to simple models but am getting some strange results. Was wondering if you could suggest why...

The null model is a standard GY94 model - all parameters except omega are estimated once-off over the entire alignment and omega is optimised separately at each site, holding the other parameters fixed. The alternative model defines omega = omega1*f[i] + omega2*(1-f[i]), where f[i] is a weight specific to branch i, and optimises omega1 and omega2 separately at each site. For each site, I compute the null and alternative likelihoods and perform a LRT.

I would expect omega (under the null model) to lie somewhere in between omega1 and omega2 (under the alt model); however, I am not getting this. I typically get omega < omega1 < omega2. (e.g. site 9) Surely a larger omega would then produce a better likelihood under the null model? I've tried larger starting values for omega, but seem to always end up with the same estimate.

I also get some sites where the likelihood actually gets worse under the alt model! At site 45, for example, I start the optimisation with omega1=omega2=0.7515262 (the value of omega under the null model) which has a likelihood of -88.87692. After optimising the alt model, I get omega1=408.816, omega2=2596.717 and a likelihood of -1e+100.  

Any suggestions? I've attached my code and data.

Thanks!
Miguel



http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?action=downloadfile;file=ModelCompare.zip (113 KB | )

Title: Re: Model comparison issue
Post by Sergei on Nov 7th, 2010 at 9:51pm
Hi Miguel,

There seems to be an issue with negative values in the rate matrix. If you look at the 'f' vector in the alt.bf example, some values exceed one. However, these values are then used as convex combination coefficients with omega1 and omega2. For example, in model q358 there are (1-2.x)*omega2 values in the rate matrix:


Code (]
Q384={61,61};
Q384[0):

[1]:=(2.68515*omega1+(1-2.68515)*omega2)*t;


Hyphy will silently enforce the zero lower bound on most parameter values, but it does not check the lower bound condition for rate matrices. Consequently, the odd results may be due to poorly formed rate matrices.

Sergei

Title: Re: Model comparison issue
Post by Miguel Lacerda on Nov 9th, 2010 at 12:05am
Thanks Sergei! I should have picked that up [smiley=embarassed.gif]

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.