User:Carl Boettiger/Notebook/Stochastic Population Dynamics/2010/05/19

{| 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"|

Goals

 * individual-based simulation via my gillespie C library with 2-step transitions.
 * Integrate the function definitions from R? Use of R formula language?
 * Conversely, have the R code use the C functions?
 * Handle population-size scaling correctly
 * Methods write-up, read/compare to other examples.
 * Exploration/demonstration of the significance of two-step process vs two one-step processes. Highlight which examples will show largest differences, and in which terms (means vs variances/covariances, etc).
 * Noise response to parameter changes (a la habitat fragmentation, etc)

Merged Warning-Signals into Structured populations
The future development of the structured populations package will depend directly on the gillespie library source code in warningSignals repository. Though these two projects will have different higher level functions as they will share much of the same base C machinery it made sense at this point to merge the projects. This preserves their independent histories while avoiding the duplication of code. Will have to figure out whether or not to close down/remove the warning signals github and local repositories all together to avoid confusion (would break links to remove the github version).

Fortunately, this merger is remarkably easy on using git:

Structural modifications

 * gillespie command must now be passed functional handles to the the reset function (needed to reset loop in ensemble ) and the fixed_interval_tasks function. This makes the dependencies more explicit and also allows clean handling of having different models with different versions of these functions in the same library.  R package cannot compile with the redundant namespace otherwise.
 * Still need to figure out what to do about main function to allow modular, independent compiles and still allow R package compile...
 * UPDATE: the R package now compiles and loads. makefile is depricated currently and all main functions replaced inside a single main fn call.  General updates across code (including NAMESPACE).

Other Code Changes and notes

 * Implemented R interface for crowley individual-based model and simplified beetle individual-based model with exponential waiting times between stages (with two step process though, corresponding to the lin noise approx in this system).
 * Recall the extern "C" command when using C++ code to avoid the name mangling trouble.
 * seems openmp compiling from within R is working, at least turns both processors on full, will need more exploration. Will also have to consider storing the full ensemble of runs in C vs calculating moments on the fly (and avoiding packet collisions in parallel).

Reading
Set up Google Reader last night for ToCs via rss rather than my former system of eToCs. Convient tag/like/share options, nice to separate from the email process.


 * Came across the DensiTree paper in bioinformatics to visualize posterior tree densities that had been demonstrated in beta @ Phylogenetics workshop.
 * Rather well done if classical treatment of SIS birth death model in JMB with diffusion approximation, OU approximation and extinction times.  Seems clearly explained a makes a nice reference.


 * Interesting talk and presentation style, take this approach to the classroom? Motivating students? (Talk adapted from Dan Pink).
 * Another Richard Florida talk.


 * }