Hi there,

By default, the function returns conditional likelihoods: Pr (site | rate class). In your example, the probability of observing a site given the model in class 1 is 0.1, and given the model in class 2 is 0.3

Most of the time one wants Pr (rate class | site), which can be obtained by a simple application of the Bayes rule:

**Code:**Pr (rate class | site) = Pr (site|rate class) * Pr (rate class) / Pr (site)

Pr (site) is simply the sum of all Pr (site|rate class) * Pr (rate class) (the normalization factor), and Pr (rate class) can be obtained by calling

**Code:**ConstructCategoryMatrix (priors, lfID, WEIGHTS);

HTH,

Sergei

PS I could probably give you more pointers if I had a better idea of what the final objective was.