Current Volume | Browse | Search | RSSHome | Instructions for Authors | JSS Style Guide | Editorial Board

Authors: Mario Pineda-Krch
Title: [download]
(8422)
GillespieSSA: Implementing the Gillespie Stochastic Simulation Algorithm in R
Reference: Vol. 25, Issue 12, Apr 2008
Submitted 2007-10-19, Accepted 2008-02-01
Type: Article
Abstract:

The deterministic dynamics of populations in continuous time are traditionally described using coupled, first-order ordinary differential equations. While this approach is accurate for large systems, it is often inadequate for small systems where key species may be present in small numbers or where key reactions occur at a low rate. The Gillespie stochastic simulation algorithm (SSA) is a procedure for generating time-evolution trajectories of finite populations in continuous time and has become the standard algorithm for these types of stochastic models. This article presents a simple-to-use and flexible framework for implementing the SSA using the high-level statistical computing language R and the package GillespieSSA. Using three ecological models as examples (logistic growth, Rosenzweig-MacArthur predator-prey model, and Kermack-McKendrick SIRS metapopulation model), this paper shows how a deterministic model can be formulated as a finite-population stochastic model within the framework of SSA theory and how it can be implemented in R. Simulations of the stochastic models are performed using four different SSA Monte Carlo methods: one exact method (Gillespie's direct method); and three approximate methods (explicit, binomial, and optimized tau-leap methods). Comparison of simulation results confirms that while the time-evolution trajectories obtained from the different SSA methods are indistinguishable, the approximate methods are up to four orders of magnitude faster than the exact methods.

Paper: [download]
(8422)
GillespieSSA: Implementing the Gillespie Stochastic Simulation Algorithm in R
(application/pdf, 1.3 MB)
Supplements: [download]
(1153)
GillespieSSA_0.5-3.tar.gz: R source package
(application/x-gzip, 36.8 KB)
[download]
(1971)
v25i12.R: R example code from the paper
(text/plain, 21.1 KB)
Resources: BibTeX | OAI
Creative Commons License
This work is licensed under the licenses
Paper: Creative Commons Attribution 3.0 Unported License
Code: GNU General Public License (at least one of version 2 or version 3)
Current Volume | Browse | Search | RSSHome | Instructions for Authors | JSS Style Guide | Editorial Board