Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
non-global category variables (Read 1584 times)
konrad
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
non-global category variables
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
Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: non-global category variables
Reply #1 - 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 Tongue

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});
 



Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged