Integral Projection Model

R script files for the general Integral Projection Model (S.P. Ellner and M. Rees 2006, American Naturalist ). There is a readme.pdf file, but most explanation is in the form of comments within the script files.  

Matlab and R/Splus code for a basic Integral Projection Model with one individual-state variable (Easterling, Ellner, and Dixon 2000). Zip file including script files and a manual (MS Word and PostScript). This is mostly for archival purposes; the scripts are not guaranteed to work and the methods are outdated.     

LENNS and nnreg: Lyapunov exponents and neural network time series models

The LENNS package ('Lyapunov Exponents for Noisy Nonlinear Systems') was originally standalone f77 but then was merged into the FUNFITS package for S-plus. FUNFITS is defunct but most of its functionality has been moved into the fields package for R, which you can get from CRAN ( The rest -- neural networks, global and local Lyapunov exponents -- is here. LENNS and nnreg for R/Windows. This is not really a package, and it only works under Windows. Create a folder c:\lenns and then extract the contents of into the lenns folder, using folder names. This will create a folder tree c:\lenns\chtml,c:\lenns\exec, etc. It cannot be installed from within R (that used to work, but not since the rules changed with R 2.0).  Instead, you need to source() the lenns.R scripts from within a running R session. The file readme.lenns tells you what to do, and help can be accessed by opening lenns/html/00Index.html with a browsers. If you have trouble getting it to run, let me know. 

The rest of the FUNFITS package (i.e., everything but neural nets) is supplanted by the fields package for R (available at CRAN .      

Gradfit: Gradient matching and monotone regression splines

This is the set of R functions for nonparametric (regression spline) fitting of delay differential equations associated with S.P. Ellner, Y. Seifu and R.H. Smith (2002) "Fitting population dynamic models to time series data by gradient matching" (Ecology 83: 2256–2270). It includes functions for functions for smoothing a time series to estimate its gradient, and support routines for fitting monotone spline regression and bivariate additive spline regression models with sign constraints, with smoothing parameter selection by GCV. - Zip archive of all files
Readme.txt - Readme file for the Zip archive
GradFuncs.R - R source code for the fitting functions. Requires the MASS and quadprog libraries and version 1.1 or higher of R
TestGradFuncs.R - Examples of using the main fitting functions, extensively commented. Requires the mgcv library.
GradFuncs.doc - Documentation in MS Word for Windows format
GradFuncs.pdf - Documentation in PDF format
Nichadults.txt - Data file used by the examples: every-other-day count of adult numbers in series "I" from Nicholson (1957). The example code assumes that this file is sitting in C:\GradFuncs; if you put it anywhere else you need to edit the example code appropriately

The examples file TestGradFuncs.R illustrates how the functions are used, including an example of a SIMEX bias-correction for measurement errors. Please note that this is not a library; the script file GradFuncs.R must be source'd to make the functions available in the current session. There is also no online help provided. Adapting the functions to work in Splus should be fairly easy. The main R-specific feature is the use of optim() with method = "Nelder-Mead" to optimize the smoothing parameters in additive models; a call to nlmin() could be substituted. Also, one commented-out line near the top of GradFuncs.R needs to uncommented so that the Splus solve.matrix() is called in place of solve(). Several of the examples use R-specific plotting parameters.     

Other Software

STAGECOACH (Cochran and Ellner 1992). As a Zip file. Contains f77 source code (we wrote this in 1990, when C still looked like it might be the next Pascal) and a standalone executable that runs in a Windows command window. This code corresponds to the formulas in Cochran and Ellner (1992). Caswell's 2nd edition (2001) describes how to get the same results using Matlab rather than do-loops. STAGECOACH defines lifespan as ‘maximum lifespan consistent with how often an individual was censused’, so an annual has a lifespan of 2 and a generation time of 2. In retrospect that was not the best possible idea, but it is easy to fix by subtracting 1 from the affected life history attributes.  

Simulation model of recirculating mariculture system (Ellner et al. 1996, Aquaculture) As a zip file.