A general non-homogeneous model with one path that allows all combinations vs. a one_per_branch model

11 views
Skip to first unread message

Keren Halabi

unread,
Jul 27, 2020, 10:28:25 AM7/27/20
to Bio++ Usage Help Forum
Hi dear Bio++ team,

I wish to implement a branch-site model which uses a random-effects likelihood computation approach.
The model consists of 2 site models A and B, each correspond to a different branch category. A and B each have 2 categories and share all of their parameters but one, which is fixed in A but free to vary in B.

I see two options to implement this is Bio++, the latter of which is more convenient for me.

1) use a "one_per_branch" with just one model while setting two types of aliases:
1a. shared parameters across all branches
1b. one parameter that is shared across two complementary sets of branches.
I am not sure how to do this.

2) use a "general" non homogeneous model with the two above copies, while using a path to enable all possible transitions:
model1=MixedModel(model=YN98(omega=Simple(values=(0.1,1,2,4),probas=(0.5,0.4,0.05, 0.05))))
model2=MixedModel(model=YN98(omega=Simple(values=(0.2,0.8,1.6,3),probas=(0.5,0.4,0.05,0.05))))
site.path1 = model1[YN98_omega1]&model1[YN98_omega2]&model1[YN98_omega3]&model2[YN98_omega1]&model2[YN98_omega2]&model2[YN98_omega3]
This seemed more intuitive to me but surprisingly yielded the same likelihood value as if I didn't set any paths at all.

Could you please explain to me what I did wrong in the implementation of option 2 and if it is equivalent to option 1?

Many thanks!
Keren

Laurent Guéguen

unread,
Aug 12, 2020, 10:49:14 AM8/12/20
to Bio++ Usage Help Forum
Hi Keren,

I agree that the 1st implementation is not easy, since you would have to alias all omegas numbered with a set of
branches, and alias all omegas with the complementary set of branches.

Apparently, your description of the path should be as you expect it to be, I do not see why it yields the same likelihood,
or perhaps it is because the part of the mixture that is separated (if 4th values of omegas) is so unlikely & with small
probability that it does not induce much difference.

Perhaps you could try with a simpler model (ie only 2 values for the distributuion), and the values of omegas that are separated
bring a higher likelihood (and/or have a higher probability)?

Cheers,
Laurent

Reply all
Reply to author
Forward
0 new messages