Much of our work involves the development of new software tools. Sharing code facilitates collaboration, enforces accountability, and encourages good development practices. (And as a long-time user near-exclusively of open source software, I want to make my own small contribution to the community.)

State-Dependent Diversification


This is C code for fast simulation of phylogenetic trees under a birth-death process in which a binary character or three-state geographic character evolves and affects rates of speciation and extinction. I’ve been building on the codebase for occasional projects since 2003. Besides generating phylogenies for BiSSE-like models, we’ve compared in different contexts the “neontological ages” of species (time since most recent ancestor shared by extant species) with “paleontological ages” (time since origination under a budding model of speciation).

Goldberg, E.E. 2014. SimTreeSDD: Simulating phylogenetic trees under state-dependent diversification. DOI


This is an R package (with C components) written by Rich FitzJohn. It provides a robust implementation of BiSSE and related models, along with utilities for simulating, fitting, and plotting data. I have contributed two models, GeoSSE and ClaSSE, and miscellaneous small fixes.

Spatial Coevolution

Seasonal character displacement

Here is the code used for: Goldberg, E.E., R. Lande, and T.D. Price. 2012. Population regulation and character displacement in a seasonal environment. The American Naturalist 179:693-705.


This C codebase is for my projects involving gene flow, local adaption, and interspecific interactions. (It is currently in an awkward git-subtree state…)



This is a program for producing pictures of phylogenetic trees, particularly for the purpose of displaying ancestral state reconstructions of discrete characters. I wrote it to make figures for a paper (Goldberg & Igić 2008), but mostly to learn how Python works with the Cairo graphics library, CGI, and Sphinx documentation.


This is an R package for computing the ecological effects of habitat edges in landscapes. It extends a mathematical description of the “edge response” (how a species’ population density or other property is affected by the distance to a change in habitat type) to an arbitrarily-complex landscape of edges. This enables parameter estimation from survey data and predictions to other landscapes. I wrote it for Leslie Ries and her award-winning project.

Steppingstone sampler

Here is a bit of R code for using the steppingstone algorithm to compute marginal likelihoods, for the purpose of statistical model comparison via Bayes Factors. Nothing fancy, but several people have asked for it, so may as well post it in case it’s useful to more folks.

Goldberg, E.E. 2014. A steppingstone sampler in R. DOI