Skip to main content
`Ctrl`+`K`

# Analysis of rate heterogeneity

Section author: Gavin Huttley

A simple example for analyses involving rate heterogeneity among sites. In this case we will simulate an alignment with two rate categories and then try to recover the rates from the alignment.

Make an alignment with equal split between rates 0.6 and 0.2, and then concatenate them to create a new alignment.

Start from scratch, optimising only rates and the rate probability ratio.

We want to know the bin probabilities and the posterior probabilities.

We’ll now use a gamma distribution on the sample alignment, specifying the number of bins as 4. We specify that the bins have equal density using the `lf.set_param_rule('bprobs', is_constant=True)` command.