SPLUS code for fitting Generalized Additive Models to wildlife census data

e-mail to r.fewster@auckland.ac.nz

Below are the main SPLUS functions used for the analyses in the paper Analysis of population trends for farmland birds using generalized additive models (Ecology 81, 1970-1984 (2000)), by R.M. Fewster, S.T. Buckland, G.M. Siriwardena, S.R. Baillie, and J.D. Wilson. There is lots more code available, so if you need something in the paper that you don't see here then send me a message and I'll provide an (undocumented) version. The functions below are documented fairly comprehensively, and it should be possible to use them to reproduce the analyses in the paper. All functions are written for SPLUS version 3.4 for UNIX, and have been tested in versions 3.4 and 5.1 for UNIX and 6.0 for UNIX and LINUX. They have not been tested on WINDOWS platforms but should operate without difficulty.

R versions of the functions: R is free software available for download from the R Project Site.

For data collected at irregularly spaced time points, some new functions are available here.

All comments are welcome. Please drop me a note if you use these functions.

Rachel Fewster      27th October 2000

Tar archive: all functions, example data set, and instructions for demonstration analysis

Typical output obtained from the demonstration data can be viewed here.

Note: the data used in the Ecology paper were part of the Common Birds Census coordinated by the British Trust for Ornithology (BTO). Information about other BTO surveys and availability of BTO data is here.

To avoid manipulating the tar archive, here are the individual functions one by one. They can each be downloaded into the working directory (all of them are needed), together with instructions.txt and the example data set cb from above. Then follow the instructions in instructions.txt for a demonstration analysis.

Fitting the model and extracting indices


Second derivatives

Confidence intervals

Plotting final output

Sourcing the functions

Last updated:  18th September 2002