You are here

Available data files, software, and code (2nd edition)

Printer-friendly version

N.J. Gotelli & A.M. Ellison (2012) A primer of ecological statistics, 2nd edition. Sinauer Associates, Sunderland, Massachusetts.

Data files, software and code


Update history:

  • 1 December 2012 - created (AME)

Notes:

  1. The book can be ordered directly from Sinauer Associates.
  2. The S-plus code from the first edition of the Primer is no longer being maintained, but can be found here.
  3. Data are in space-delimited ASCII text, and code is provided either as "script" files (.R) that will run in R or ASCII text files that can be imported into and run with WinBUGS version 1.4. The code files (.txt or .R) can be opened and read with any text editor (e.g., NotePad, WordPad, Emacs, VI).
  4. Errata are also available.

 


Please let us know if you are using the Primer or these data for teaching purposes!


Chapter 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Literature Cited

Chapter 3

  • Tibial spine data (Table 3.1). These are simulated, not actual, data.
  • R script for illustrating the Law of Large Numbers and frequentist confidence intervals. The code is modified from that provided by Blume & Royall (2003). The modifications simply make it "generic"; their published code was specific to their published example.

 [Back to Top]

Chapter 4

 [Back to Top]

Chapter 5

 [Back to Top]

Chapter 8

  • Morphological measurements of 25 Darlingtonia californica pitchers with three added outliers (Table 8.1). These unpublished data were collected by Aaron Ellison, Rebecca Emerson, and Hedda Steinhoff in July 2000, and should not be used in a publication without permission.
  • Plant species richness and island area for 17 Galápagos Islands (Table 8.2). The data provided here were originally published in Preston (1962). We retain the island names given by Preston, but have converted island area from square miles to square kilometers.

 [Back to Top]

Chapter 9

 [Back to Top]

Chapter 10

 [Back to Top]

Chapter 11

 [Back to Top]

Chapter 12

 [Back to Top]

Chapter 13

  • Basic rarefaction functions. NOTE: This file needs to be "sourced" in R before running additional R scripts for this chapter.
  • Spider diversity data and analysis (Tables 13.1, 13.2, 13.4; Figures 13.1 - 13.3, 13.7). Additional analyses of these data can be found in Sackett et al. (2011).
    • Complete spider diversity dataset, as illustrated in Table 13.1. This file is in "long" form, with each row being a single observation on a specific date.
    • Spider data in matrix format - species [rows] x treatments [columns] - for use with rarefaction script. You can also generate this file by running this R script to convert the long-form data to the matrix format.
    • R script for plotting individual-based rarefaction curves. This script will generate an example column for a random subsample (as in Table 13.2); the asymptotic species-richness estimators and their confidence intervals (Table 13.4); Figure 13.1 (histogram of species richness counts for 1000 random subsamples); Figure 13.2 (individual-based rarefaction curve for the logged treatment); and Figure 13.3 (individual-based rarefaction curves for all treatments).
    • Individual-based rarefaction plots of spider data in the hardwood treatment for Hill numbers q = {1, 1, 2, 3} (Figure 13.7):
      • R script to calculate values for different Hill numbers (be aware of hard-coding for q in the code!);
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for q = 0;
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for q = 1;
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for q = 2;
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for q = 3;
      • R script to plot Figure 13.7.
  • Ant diversity data and analysis (Table 13.3, 13.5; Figures 13.4 - 13.6).
    • Complete ant diversity dataset, in "long" form. This file includes abundances of ants collected in multiple sites within three habitats in Massachusetts: cultural grasslands, oak-hickory-white pine forests, and successional shrublands.
    • Species (rows) x sites (columns) of each habitat (you can also generate these three files by running this R script to convert the long-form data to the matrix format):
    • R script for plotting sample-based rarefaction curves. This script calls the three species x sites matrices and generates: a single sample-based rarefaction curve (Figure 13.4); the three sample-based rarefaction curves rescaled to the number of incividual ant nests per sample (Figure 13.5); and the data needed to recreate Table 13.5 (asymptotic species-richness estimators and their confidence intervals).
    • Input files for Figure 13.6:
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for Cultural grassland data;
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for Oak-hickory-white pine data;
      • Expected number of species, for different samples (i.e., species accumulation curve), with confidence bounds, for Successional shrubland data.
    • R script for plotting interpolated and extrapolated sample-based rarefaction curves of the ant data.
    • An alternative set of scripts for Figure 13.6:

 [Back to Top]

Chapter 14

  • Analysis of bog ant species abundances (Tables 14.1 - 14.6; Figures 14.2 - 14.5)
    • Collection histories of Dolichoderus pustulatus
    • R script for analysis of occurrence data for estimates of occupancy and detection probability (Table 14.2)
    • Complete dataset of ant species in New England bogs (as described in Table 14.3)
    • R script for calculating asymptotic Chao2 estimators and confidence intervals of bog ant data (plotted in Figure 14.3)
    • Hierarchical model (Tables 14.3 - 14.6) :
    • Occupancy modeling of hemlock woolly adelgid populations in central and western Massachusetts (Tables 14.7 - 14.8; Figure 14.7)
      • Complete data file (extracted in Table 14.7);
      • R script for multi-season occupancy model of hemlock woolly adelgid data (Table 14.8, Figure 14.7).
    • Mark-recapture modeling of Lady's slipper orchids at the Harvard Forest (Tables 14.9 - 14.12; Figure 14.8)

 [Back to Top]

Literature Cited

  1. Blume, J. D., and R. M. Royall. 2003. Illustrating the Law of Large Numbers (and confidence intervals). American Statistician 57: 51-57.
  2. Cade, B. S., J. W. Terrell, and R. L. Schroeder. 1999. Estimating effects of limiting factors with regression quantiles. Ecology 80: 311-323.
  3. Dixon, P. M., A. M. Ellison, and N. J. Gotelli. 2005. Improving the precision of estimates of the frequency of rare events. Ecology 86: 1114-1123.
  4. Dorazio, R. M., N. J. Gotelli, and A. M. Ellison. 2011. Modern methods of estimating biodiversity from presence-absence surveys. Pages 277-302 in: G. Venora, O. Grillo, and J Lopez-Pujol, editors. Biodiversity loss in a changing planet. InTech - Open Access Publisher, Croatia.
  5. Doornik, J. A., and H. Hansen. 1994. An omnibus test for univariate and multivariate normality. Working paper, Nuffield College, Oxford University.
  6. Doornik, J. A. and H. Hansen. 2008. An omnibus test for univariate and multivariate normality. Oxford Bulletin of Economics and Statistics 70 (s1): 927-939.
  7. Ellison, A. M., and E. J. Farnsworth. 2005. The cost of carnivory for Darlingtonia californica (Sarraceniaceae): evidence from relationships among leaf traits. American Journal of Botany 92: 1085-1093.
  8. Ellison, A. M., E. J. Farnsworth & N. J. Gotelli. 2002. Ant diversity in pitcher-plant bogs of Massachusetts. Northeastern Naturalist 9: 267-284.
  9. Ellison, A. M., E. J. Farnsworth, and R. R. Twilley. 1996. Facultative mutualism between red mangroves and root-fouling sponges in Belizean mangal. Ecology 77: 2431-2444.
  10. Farnsworth, E. J. 2004. Patterns of plant invasion at sites with rare plant species throughout New England. Rhodora 106: 97-117.
  11. Farnsworth, E. J., and A. M. Ellison. 1996. Sun-shade adaptability of the red mangrove, Rhizophora mangle (Rhizophoraceae): changes through ontogeny at several levels of biological organization. American Journal of Botany 83: 1131-1143.
  12. Gotelli, N. J., and A. M. Ellison. 2002. Biogeography at a regional scale: determinants of ant species density in New England bogs and forest. Ecology 83: 1604-1609.
  13. Gotelli, N.J., and A.M. Ellison. 2006. Food-web models predict species abundance in response to habitat change. PLoS Biology 44(10): e324.
  14. Merkt, R. E. & A. M. Ellison. 1998. Geographic and habitat-specific morphological variation of Littoraria (Littorinopsis) angulifera (Lamarck, 1822). Malacologia 40: 279-295.
  15. Preston, F. W. 1962. The canonical distribution of commonness and rarity: Part I. Ecology 43: 185-215.
  16. Sackett, T. E., S. Record, S. Bewick, B. Baiser, N. J. Sanders, and A. M. Ellison. 2011. Response of macroarthropod assemblages to the loss of hemlock (Tsuga canadensis), a foundation species. Ecosphere 2: art74.
  17. Schroeder, R.L., and L.D. Vangilder. 1997. Tests of wildlife habitat models to evaluate oak mast production. Wildlife Society Bulletin 25: 639-646.
  18. Venables, W. N., and B. D. Ripley. 2002. Modern applied statistics with S, 4th edition. Springer-Verlag, New York.

 [Back to Top]