User:Carl Boettiger/Notebook/Stochastic Population Dynamics/2010/02/15

{| width="800"
 * style="background-color: #EEE"|[[Image:owwnotebook_icon.png|128px]] Stochastic Population Dynamics
 * style="background-color: #F2F2F2" align="center"|  |Main project page
 * style="background-color: #F2F2F2" align="center"|  |Main project page


 * colspan="2"|
 * colspan="2"|

Implementing warning signals metrics
The code now contains implementation of the basic warning signals metrics computed over a given window size into the past.
 * 1) mean
 * 2) variance
 * 3) skew
 * 4) lag-1 autocorrelation
 * 5) lag-n autocorrelation

These are implemented through the fixed interval sampler function. Recall that the Gillespie simulation API permits two kinds of events, random events occurring with exponential time distribution and events occurring at fixed (scheduled) times, which can be used for discretizations of deterministic continuous time dynamics (i.e. Forward/Backward Euler, Runge-Kutta), as well as scheduled events such as sampling. Just as each random event can have its own rate, fixed events can occur at different frequencies.

A sample run provided below. Note that the simulation terminates when it hits extinction, even though this zero point is not necessarily sampled on the fixed interval. Created using the parameter values and settings as found in the commit to the svn repository revision 14. The environmental degradation starts at t=5000, marked by the red line.



A python script in the code repository produces this plot. The script in the original form used to create the plot can also always be found in revision 14; meanwhile the plotting script can continue to evolve for later exploration. (Definitely one of the great strengths of version management!)