# Clock models¶

The branch lengths of trees in BEAST need to be converted to some measure of evolutionary time in order to compute transition probabilities. For example, if you have provided calibration dates, then the branch lengths of your tree are in the same units as your calibration data (typically years or kiloyears), but they need to be in units of expected substitutions in order to assess how well the tree fits the data. This conversion is performed by a clock model. Clock models may be very simple, such as specifying a single, unchanging expected number of substitutions per unit of branch length (e.g. substitutions per year) which is valid all over the tree, or more complex, with each branch on the tree having a different conversion rate, corresponding to changes in the rate of evolution over time and/or space.

When configuring a BEASTling analysis, each substitution model you configure in a `model`

section must be associated with a clock model (via a `clock`

section), and there are several clock models to choose from. The following clock models are currently supported:

## Strict¶

(set `type=strict`

in config file)

A strict clock is the simplest clock model available in BEASTling. It is basically a single value which represents a conversion rate between branch lengths and evolutionary time. This same value is valid over all branches on the tree. Strict clocks are simple and result in fast-running analyses, but they represent an assumption about language change which most linguists do not believe is plausible for most situations, i.e. that the rate at which a particular feature changes is fixed at all points in time and all subfamilies in a tree.

## Random Local Clock¶

(set `type=random`

in config file)

Random local clocks permit an amount of variation in clock rate across a tree which is more than the strict clock (which has no variation) but less than the relaxed clock (which has a different rate for each branch). They work by permiting the clock rate to change a fixed number of times at certain locations on the tree. The number of changes may be zero (in which case the resulting clock is a strict clock), or it may be equal to the number of branches (in which case the resulting clock is a relaxed clock), or it may be somewhere in between. The MCMC chain samples over both the number of changes and their locations on the tree. A Poisson prior is placed on the number of changes.

The various rates are sampled from a Gamma distribution. The random local clock can be configured in uncorrelated mode (`correlated=false`

, the default), where each rate is sampled independently from the Gamma distribution, and in correlated mode (`correlated=true`

), where what are sampled from the Gamma distribution are *multipliers*, with each new rate being a scaling of the rate before the change point.