HyPhy message board | |
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> likelihood per position/partition http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1092349408 Message started by gustavo on Aug 12th, 2004 at 3:23pm |
Title: likelihood per position/partition Post by gustavo on Aug 12th, 2004 at 3:23pm
How can I print the likelihood for each position of the alignment or for each partition?
Thanks very much in advance, gustavo |
Title: Re: likelihood per position/partition Post by Sergei on May 3rd, 2006 at 1:19pm
In case there are rate categories...
Assume for a second that you have a single category variable 'c' with D classes. If you call ConstructCategoryMatrix on a likelihood function with 'c' in the model and N sites, you'll get an DxN matrix, where the entry in row i and column j tells you the likelihood of site j, given that 'c' takes value from its i-th class. To compute the likelihood of a site then is simply a matter of computing expected values. You can do this as follows (replace variables as appropriate). Code (] /* this needs HyPhy from 2006 for row indexing tricks */ GetInformation (catInfo, c); ConstructCategoryMatrix (cmx, lf, COMPLETE); /* extract the second row from catInfo - the weights for each class */ weights = catInfo[1):
|
HyPhy message board » Powered by YaBB 2.5.2! YaBB Forum Software © 2000-2024. All Rights Reserved. |