HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> HyPhy feedback >> non-global category variables
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1131965351

Message started by konrad on Nov 14th, 2005 at 2:49am

Title: non-global category variables
Post by konrad on Nov 14th, 2005 at 2:49am
Hi Sergei,

It looks like category variables are automatically global, i.e. every instance drawn from the distribution applies to all branches of the tree. Is it possible to have a non-global category variable? For example this might lead to a type of branch-sites model where each branch at each site has its own omega parameter, yet the number of estimable parameters is the same as for the corresponding sites model. Is there a reason why this would be a bad idea? (This would not give informative estimates at individual sites, but would give a better overall fit if omega really varies across the tree.)

regards,
Konrad

Title: Re: non-global category variables
Post by Sergei on Nov 14th, 2005 at 3:57am
Dear Konrad,

Categories are indeed constrained to be global, partly by technical reasons, but partly for computational practicality.

Indeed, imagine that you have a 5 sequence tree (with 7 branches) and you you let each branch have it's own omega (or any other category variable). Further suppose, that each category is discretized into 4 rate classes. In order to compute the likelihood of this tree, one needs to compute the expected value of the likelihood function over all omegas. But even in this simple case, the computation involves 4^7=16384 likelihood evaluations, i.e. it very quickly becomes impratical.

I could be misunderstanding what you are proposing though :P

What you can do instead, is assign one category to some branches and another to others (e.g. internal versus terminal branches) etc.

The way to do this in HyPhy is as follows:

(1). Define two category variables (c_1 and c_2)
(2). Define two models (say, M_1 which depends on 'c_1' and M_2 which depends on 'c_2')
(3). Build a tree with explicit model assignments

[code]
Tree t = (a{M_1},b{M_1},c{M_2});
[/code]

Cheers,
Sergei

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