SURFACE is a method for inferring the macroevolutionary adaptive landscape of a clade given only trait data and a phylogenetic tree. The name is a recursive acronym for “SURFACE Uses Regime Fitting and AIC to model Convergent Evolution”, and the method is implemented in the R package surface.


SURFACE builds on the OUCH set of methods (Butler and King, 2004, Am. Nat.), which fits Ornstein-Uhlenbeck stabilizing selection models given a hypothesized history of evolutionary regime shifts in a clade. The novel feature of SURFACE is that it constructs such a “Hansen” model using stepwise AIC, without any a priori specification of which taxa are thought to be convergent. This allows for an objective search for adaptive peak shifts, and for tests of whether a clade is characterized by exceptional phenotypic convergence.


These methods were developed in collaboration with Luke Mahler, and are described in detail here and implemented in a study of Anolis lizard convergence here. The R package “surface” that implements this method is available from CRAN as either source files or Windows or Mac binaries. The surface package includes a vignette, produced using Sweave, which explains and demonstrates its most important functions; package source and vignette can also be downloaded from the links below. You can also watch a ~8 minute video tutorial about SURFACE on the Methods in Ecology and Evoluion YouTube channel. If you have any questions about the methods or discover any bugs or problems, please send me an e-mail.

Updates in surface_0.4:


This update is mainly intended to get surface back on CRAN, after it was archived a few months ago due to dependency conflicts with geiger and igraph (“pmcSurface” is temporarily removed until pmc is available again, but pmcSurface.R should still work if you have pmc installed). There are a few other minor updates, listed here. We hope to get a proper update with some new functionality submitted in the near future.



Updates in version 0.3:


Some of the functions were buggy when settings other than the defaults were used. Specifically, the “aic_threshold” wasn’t used correctly when set to a value other than zero, and the “sample_shifts” option wasn’t correctly excluding shifts that didn’t improve the model, leading to truncated runs. This update also includes a new function, “surfaceAICMultiPlot” for visualizing the results of multiple runs, and new features in several other functions (see this list of updates for details).