This page distributes two groups of programs: those for estimating **selection surfaces** using the cubic spline, and that for **estimating ancestor states** on a phylogeny using maximum likelihood.

## Cubic Spline Programs

This section explains how to get the programs for calculating fitness functions, fitness surfaces, and other regression surfaces using nonparametric regression (the cubic spline).

These programs estimate fitness surfaces and other regression surfaces. The true surface, f, is assumed to be a function of the independent variable *z*, i.e.,

*Y = f(z)* + random error.

*Y* can be survival, reproductive success, or any other measure having a binomial, poisson, or normal distribution for each *z*. The goal is to estimate the surface *f* without making any prior assumptions about its shape. To do this we use a cubic spline approximation. The programs include bootstrap routines to generate standard errors of the predicted regression surfaces.

Two programs are provided below. The first is for estimating univariate functions, i.e., where *z* is a single continuous variable such as beak size. Version 4.0 can simultaneously fit a single covariate as well, whether continuous (e.g., body size) or category (e.g., year of study). The covariate is fitted with an ordinary linear regression or anova. The second program is for approximating multivariate surfaces, i.e., where **z** is a multivariate vector of measures,

**z** = [*z*_{1}, *z*_{2}, *z*_{3}, …. *z _{k}*].

In the latter case the entire surface is not estimated. Rather, we use projection pursuit to seek combinations of the z-variables that best predict variation in Y. References for these methods are the two below, plus other references contained therein:

Schluter, D. 1988. Estimating the form of natural selection on a quantitative trait. Evolution 42:849-861 (reprint )

Schluter, D. and D. Nychka. 1994. Exploring fitness surfaces. American Naturalist 143: 597-616 (reprint)

### Univariate program version 4.0 for Windows

glms40.zip Includes **glms40** and **glmswin10**, a Windows interface that takes user settings from the screen, runs **glms40**, and displays output graphically on the screen. Version 4.0 also allows simultaneous fitting of a single covariate (linear or category). ZIP file contains compiled programs, source code, user manual and example data files. Download file and save in a new directory. Open this directory in Windows and then extract the contents. See user manual for help running the program, and to see changes from previous versions.

### Note to R users:

Note that it is possible to carry out virtually the identical univariate analysis in **R**, which runs on Mac and Unix as well as Windows. Instructions to get you started are here. Some differences: Bayesian methods (rather than the bootstrap) are used to generate standard errors for predicted values. The smoothing parameter (lambda) is scaled slightly differently from that used here. The commands in **R** automatically choose the value of the smoothing parameter that minimizes the GCV score (it doesn’t compute the OCV score).

### Multivariate program version 1.3 for Windows

pp13-self-extract.exe This version is recompiled for Windows, and so overcomes the memory restrictions of the DOS version 1.2. Self-extracting ZIP file contains compiled programs, source code, user manual and example data file. Download file and save in a new directory. Open this directory in Windows and then double-click on file to extract contents automatically. See the user manual for help running the program, and to see changes from previous versions.

### Univariate program (old version)

glms.zip PC-DOS version. Contains fortran source code plus compiled program for PC-compatibles running DOS. Format is binary zip file.

glms.tar.Z Unix version. Contains fortran source code plus compiled program for Sun workstation. Format is binary compressed tar file. Once received, use “uncompress glms.tar.Z” to expand, and “tar xvf glms.tar” to extract contents.

### Multivariate program (old version 1.2)

pp.tar.Z Unix version. Contains fortran source code plus compiled program for Sun workstation. Format is binary compressed tar file. Once received, use “uncompress pp.tar.Z” to expand, and “tar xvf pp.tar” to extract contents.

pp.zip PC-DOS version. Contains fortran source code plus compiled program for PC-compatibles running DOS. Format is binary zip file.

## ANCML Program

This page explains how to get the program for estimating ancestor states of a continuous trait on a phylogeny using maximum likelihood.

The program ANCML estimates ancestor states for a continuous trait, and provides a “standard error” for the marginal distribution of each estimate. The method is described in

Schluter, D., T. Price, A. Ø. Mooers and D. Ludwig. 1998. Likelihood of ancestor states in adaptive radiation. Evolution 51: 1699-1711.

The method assumes a Brownian motion model for the evolution of the trait. This model and its limitations are described in

Felsenstein, J. 1985. Phylogenies and the comparative method. American Naturalist 125: 1-12.

The program ANCML was written by modifying the program CONTRAST in Phylip version 3.5, and it uses similar input conventions. Further information on these conventions can be found in Phylip’s documentation. For a copy of Phylip see Joe Felsenstein’s web site. The documentation for Phylip is available online here, and gives more detailed explanations of the input and tree files. Other routines needed were taken from the MESCHACH library, and are included with the source code.

### Programs

ancml.zip PC-DOS version. Contains C source code plus compiled program for PC-compatibles running DOS. Format is binary zip file.

ancml-OSX.zip A Mac OS X build, courtesy of Cam Webb. Format is binary zip file.

ancml.tar.Z Unix version. Contains C source code plus compiled program for SunOS. Format is binary compressed tar file. Once received, use “uncompress ancml.tar.Z” to expand, and “tar xvf ancml.tar” to extract contents.