Hi Sergei,
Please could you advise on the following problem:
I have specified a substitution model with a 3 category GDD on omega and fitted this in HyPhy (likelihood = -6772.52). I now wish to compare this null model to an alternative model which allows for the largest omega value to differ between cases and controls (different models are allocated to different branches in the tree file).
As a check, I constrained all of the parameters in the alternative model to the values obtained under the null model and computed the likelihood. However, I now get a likelihood of -6793.75 (constrained parameters, no optimising) if I specify:
Code:Model C = (SubsMatrixC, EFV, 0);
Model V = (SubsMatrixV, EFV, 0);
and set all the parameters of SubsMatrixC = SubsMatrixV. On the other hand, if I replace "SubsMatrixV" with "SubMatrixC" in the above code, I get the previous likelihood of -6772.52! What could be going wrong? And which likelihood is correct?
After optimising the unconstrained omegas with all other parameters fixed, I get a likelihood of -6793.42 for the alternative model, which is actually worse than the first likelihood I got with the omegas constrained to be equal for cases and controls!! (but very slightly better than the second likelihood I got for the null model).
I have attached my code so that you can check for any obvious errors. I recall having a similar problem previously where I got different likelihoods from the same constrained Q matrix: Multimedia File Viewing and Clickable Links are available for Registered Members only!! You need to
Thanks!
Miguel