Skip to content

Fundamentals

tgvaughan edited this page Dec 15, 2012 · 5 revisions

Basic concepts

At its heart, MASTER provides a Monte Carlo solution to a particular kind of birth-death master equation known as the Chemical (or Combinatoric) Master Equation (CME). This is simply the equation of motion for the probability distribution over the possible population-size states of a system of many interacting sub-populations of particles (animals, or viruses). The Monte Carlo solution is obtained by "simulating" population size histories: that is, drawing samples from the probability distribution over all possible such histories. These samples may be interesting in their own right, or you may be interested in estimating means and variances (etc.) of the true probability distribution, in which case you'll want to generate many such simulations.

The first stage in using MASTER is therefore to write down the master equation describing the dynamics of the system you're keen to simulate. This isn't as hard as it sounds! There is a one-to-one mapping between the CME and a set of "reactions" describing the possible interactions allowed in the model. For example, suppose you are interested in a single population containing a population of individuals of some type X. An asexual reproduction resulting in the duplication of an individual could then be expressed as the reaction

X -> 2X

This reaction should be read just as in basic Chemistry, with the elements on the left denoting reactant individuals taking part in the reaction, and those on the left denoting product individuals resulting from the reaction. The overall effect of this reaction is an increase in the total number of X individuals by 1. In combination with a rate constant R which governs the average number of times this reaction will occur per reactant per unit time, this completely specifies the stochastic process.

Populations and Population Types

In MASTER, a population refers to a group of indistinguishable individuals whose state at a particular time is to be recorded as a single integer specifying the total number of those individuals. At the most basic level, this is all you need to know. However, if you're ever going to be considering models involving more than a very small handful of such populations, please continue reading.

Fundamentally, MASTER deals with groups of populations it refers to as population types. Each type is associated with a unique name. This name can be any single-word string, but by convention is usually a single capital letter. Each population type can be associated with an arbitrary number of actual populations. These can be thought of as sub-populations or demes. MASTER allows these populations to be arranged in an n-dimensional array. A population type is completely specified by both its name and the dimension of the array of populations it contains. The featureless (or "scalar") population referred to in the previous paragraph is simply a population type containing a single deme.

Reactions and Reaction Groups

Just as populations are bundled into types, so reactions---the individual components of the stochastic models we consider---are brought together into reaction groups. Each reaction group has a unique name and may contain one or more individual reactions. The point of this is to allow large numbers of very similar reactions such as migrations between individual demes to be logically grouped together so as to make the model specification more readable.

Just as for populations, it is possible to specify a single named reaction, although internally it is represented by a reaction group containing only that reaction.

Moments and Moment Groups

In many instances, the goal of stochastic simulation is not to produce representative population size histories, but to estimate moments of the population sizes such as the means, variances and covariances. Unlike individual trajectories, these are quantities which can be directly compared with experimental data.

MASTER allows one to estimate the mean and variance of any product of population sizes. Sums of these products can also be estimated. A single product is referred to as a moment. A collection of these can be grouped together into a moment group. Elements of a group can be estimated and recorded independently, or summed together.