Likelihood ratio distributions not converging

132 views
Skip to first unread message

Filippo Nicolini

unread,
Apr 19, 2023, 6:34:10 AM4/19/23
to hahnlab-cafe
Hi everyone,
I'm using cafe5 to estimate the gene gain/loss patterns in a group of crustaceans and I would like to test different lambdas for different parts of the tree. Basically:
  1. I estimated the error model
  2. I estimated a model with a global lambda for the tree
  3. I estimated a model with 3 lambdas for the tree
  4. I simulated 100 datasets to generate a null distribution of likelihood ratios of globalLambda VS 3Lambdas to test the best fitting model.
However, the likelihood ratio distribution is something like bimodal (see image below; the likelihood ratio of the data is indicated top left and bby a vertical bar; the red area should be the 0.05 tail) and I guess this is because some estimations didn't converge. How can I fix the problem? Should I just rerun the not-converging simulations or maybe this is a sign that the model with 3 lambdas is not fitting the data?

Thank you all for your help!

Screenshot 2023-04-19 123208.png

Hahn, Matthew

unread,
Apr 19, 2023, 9:14:26 AM4/19/23
to Filippo Nicolini, hahnlab-cafe
Hi Filippo,

Well, this is strange behavior. I agree with your assessment that the extra mode is likely due to some runs not converging. 

But, possibly more worryingly, depending on how you’re doing your test all your likelihood ratios should be either positive or negative. (The null should look like a chi-squared distribution with two degrees of freedom.) The fact that it doesn’t look like this might suggest that most runs are not converging. Do you have a very deep tree, or lots of error?



matt

<Screenshot 2023-04-19 123208.png>

--
You received this message because you are subscribed to the Google Groups "hahnlab-cafe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hahnlabcafe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hahnlabcafe/44248615-93df-42fb-af80-ff2add01592en%40googlegroups.com.
<Screenshot 2023-04-19 123208.png>

Filippo Nicolini

unread,
Apr 19, 2023, 9:44:55 AM4/19/23
to hahnlab-cafe
Thanks for the quick response!

I was worried about the presence of both negative and positive likelihood ratios as well: that's another major issue, indeed, but I think that this is due to the presence of the extra peak.

The tree is pretty deep (350 million years at the root), while the error (epsilon) was estimated to 0.0548641.

I also run a similar analysis to compare the global lambda model with a model with 2 separate lambdas. At the very beginning, some estimations failed, but after having rerun them the values converged and I managed to obtain a good LR distribution (see below). So maybe it's just a metter of try to rerun them until convergence?Screenshot 2023-04-19 154241.png

Hahn, Matthew

unread,
Apr 19, 2023, 9:55:05 AM4/19/23
to Filippo Nicolini, hahnlab-cafe
Yes, re-running some of these should help. It’s good that the distribution with two lambdas looked better!


Matt

On Apr 19, 2023, at 9:44 AM, Filippo Nicolini <filipp...@gmail.com> wrote:

Thanks for the quick response!

I was worried about the presence of both negative and positive likelihood ratios as well: that's another major issue, indeed, but I think that this is due to the presence of the extra peak.

The tree is pretty deep (350 million years at the root), while the error (epsilon) was estimated to 0.0548641.

I also run a similar analysis to compare the global lambda model with a model with 2 separate lambdas. At the very beginning, some estimations failed, but after having rerun them the values converged and I managed to obtain a good LR distribution (see below). So maybe it's just a metter of try to rerun them until convergence?<Screenshot 2023-04-19 154241.png>

Il giorno mercoledì 19 aprile 2023 alle 15:14:26 UTC+2 m...@indiana.edu ha scritto:
Hi Filippo,

Well, this is strange behavior. I agree with your assessment that the extra mode is likely due to some runs not converging. 

But, possibly more worryingly, depending on how you’re doing your test all your likelihood ratios should be either positive or negative. (The null should look like a chi-squared distribution with two degrees of freedom.) The fact that it doesn’t look like this might suggest that most runs are not converging. Do you have a very deep tree, or lots of error?



matt

On Apr 19, 2023, at 6:34 AM, Filippo Nicolini <filipp...@gmail.com> wrote:

Hi everyone,
I'm using cafe5 to estimate the gene gain/loss patterns in a group of crustaceans and I would like to test different lambdas for different parts of the tree. Basically:
  1. I estimated the error model
  2. I estimated a model with a global lambda for the tree
  3. I estimated a model with 3 lambdas for the tree
  4. I simulated 100 datasets to generate a null distribution of likelihood ratios of globalLambda VS 3Lambdas to test the best fitting model.
However, the likelihood ratio distribution is something like bimodal (see image below; the likelihood ratio of the data is indicated top left and bby a vertical bar; the red area should be the 0.05 tail) and I guess this is because some estimations didn't converge. How can I fix the problem? Should I just rerun the not-converging simulations or maybe this is a sign that the model with 3 lambdas is not fitting the data?

Thank you all for your help!

<Screenshot 2023-04-19 123208.png>

--
You received this message because you are subscribed to the Google Groups "hahnlab-cafe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hahnlabcafe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hahnlabcafe/44248615-93df-42fb-af80-ff2add01592en%40googlegroups.com.
<Screenshot 2023-04-19 123208.png>


--
You received this message because you are subscribed to the Google Groups "hahnlab-cafe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hahnlabcafe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hahnlabcafe/3e66f6c3-82f6-422a-8e04-36b1dcd641f7n%40googlegroups.com.
<Screenshot 2023-04-19 154241.png>

Reply all
Reply to author
Forward
0 new messages