Cycles in finite populations: A reproducible seminar in three acts

For this years Halloween I presented the mathematical biology seminar at the Centre for Mathematical Biology. Here is the title and the abstract…

Cycles in finite populations: a reproducible seminar in three acts

Many natural populations exhibit cyclic fluctuations. Explaining the underlying mechanisms of such cycles is a central problem in ecology and has preoccupied population ecologists ever since Elton’s classical work in 1924. Over the years, a wide range of mathematical models have been explored in an attempt to gain understanding of the conditions giving rise to or inhibiting population cycles. Many of these models, however, rely on the assumption that population sizes are infinite, and hence implicitly assume that the effects of demographic stochasticity are negligible.

Here I will show how demographic stochasticity can give rise to regular and persistent population cycles, so-called quasi-cycles, in simple finite consumer-resource models that are deterministically stable. The existence of such quasi-cycles expand the scope of population cycles caused by ecological interactions, thereby complicating the conclusive interpretation of such patterns. I will discuss how quasi-cycles dovetail with existing theory and will also illustrate the feasibility of accurately identifying such cycles by systematically applying a series of simple analyses to simulated data and data from natural populations.

I will be using this presentation to illustrate how reproducible computational science can be practiced.

Regarding the final statement about reproducible computational science… In the name of transparency and executability (if you look at the slides you will understand why this is important) I am making all the information necessary to reproduce this work available here, i.e. slides, source for slides (Sweave code), simulation code (in C), almost all of the data, figures, etc.

The woeful state of affairs of transparency in computational sciences.

While I had (and still have) the intentions of making all the data available the sheer size of the data in this case (60000 files totalling around 18GB) is problematic in terms of sharing. At this point I am simply not able to post this amount of data online. This is clearly going to be an issues in similar future projects so I need to find a solution. The good news is that you are able to recreate the data by running the simulation code (but it takes a while). If you really want to original data I would be happy to provide it but you will probably have to mail me (mail like in envelope and stamp mail) a sizeable memory stick. Please contact me first to make arrangements. Of course, I would also be interested in hearing any possible alternative solutions to this conundrum.

A few words about reproducing this research. The slides (and hence all the research) is done using Sweave with Beamer so you will need to have R (2.13.1) and LaTeX installed. The code for the stochastic simulations is in C (based on the code here) so you’ll need to have an appropriate compiler (i.e. gcc), unless you are running OS X Lion in which case you might be able to use the included binaries.

The whole package (sans data) is available here (6MB) and if you prefer only the PDF slides (5.5 MB) you can get them here.

This is from the “Mario’s Entangled Bank” blog ( http://pineda-krch.com ) of Mario Pineda-Krch, a theoretical biologist at the University of Alberta.

About Mario Pineda-Krch

I am a quantitative evolutionary ecologist. My research focuses on fundamental questions at the interface of ecology and evolution using a combination of theoretical, statistical and computational approaches.
This entry was posted in LaTeX, Open Notebook science, open science, predator-prey model, presentation, programing, R, Sweave. Bookmark the permalink.

11 Responses to Cycles in finite populations: A reproducible seminar in three acts

  1. Tal Galili says:

    Hi Mario,
    Great post.

    Question – do you have the copyrights for the pictures you are using?
    (because if not, we should probably take it off R-bloggers so no problems will come later in the years).

    Cheers,
    Tal

  2. David Gonzales says:

    If you generate the simulation data with a deterministic random-number generator. You need only to supply the seed and the whole 18GB will be recreated. Haven’t looked at the data/code yet, so perhaps you have already done this.

    • You are right David. I expect the qualitative results to be robust however. In other words, one should get the same qualitative results for a different set of realizations. If it turns out not the be the case then I am in trouble.

  3. Josh O'B says:

    Hi Mario,

    Very impressive.

    I love the slides in that first third of the talk — especially your observation that quantitative biologists currently get away with acting like Fermat. (Or, more precisely, like he did when he scrawled in that famous margin).

    - Josh

    • Hi Josh,
      nice to ‘see’ you here. I am glad you liked it. Fermat lived about 400 years ago so you think we (i.e. we scientists) would have learned a thing or two about the importance of reproducibility since then.

  4. reader says:

    Is it just me, or does the tar.gz file refuse to open?

  5. Pingback: To Sweave, or not to Sweave, that is the question | Mario's Entangled Bank

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s