Published by the Foundation for Open Access Statistics
Editors-in-chief: Bettina Grün, Torsten Hothorn, Edzer Pebesma, Achim Zeileis    ISSN 1548-7660; CODEN JSSOBK
GillespieSSA: Implementing the Gillespie Stochastic Simulation Algorithm in R | Pineda-Krch | Journal of Statistical Software
Authors: Mario Pineda-Krch
Title: GillespieSSA: Implementing the Gillespie Stochastic Simulation Algorithm in R
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.

Page views:: 10867. Submitted: 2007-10-19. Published: 2008-04-30.
Paper: GillespieSSA: Implementing the Gillespie Stochastic Simulation Algorithm in R     Download PDF (Downloads: 10992)
GillespieSSA_0.5-3.tar.gz: R source package Download (Downloads: 1283; 36KB)
v25i12.R: R example code from the paper Download (Downloads: 2297; 21KB)

DOI: 10.18637/jss.v025.i12

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) or a GPL-compatible license.