Jason Matthiopoulos, Mark Hebblewhite, Geert Aarts, and John Fieberg. 2011. Generalized functional responses for species distributions. Ecology 92:583–589.


Supplement 2

R code used for wolf analysis.
Ecological Archives
E092-051-S2
.

Copyright


Authors
File list (downloads)
Description


Author(s)

Jason Matthiopoulos
Scottish Oceans Institute
School of Biology
University of St. Andrews
East Sands, St. Andrews, Fife, KY16 8LB, Scotland, UK
E-mail: jm37@st-andrews.ac.uk


File list

Wolf code.r – Source code to run wolf analysis

Description

This is provided for illustration only, the wolf data are not offered online. The code operates on a data frame in which rows correspond to points in space. The data frame contains a column for use (1 for a telemetry observation, 0 for a control point selected from the wolf’s home range). It also contains columns for x and y coordinates of the point, environmental covariates at that location, wolf ID and wolf pack membership.

1. Data frame preparation

The data set is first thinned, for computational expediency, the covariates are standardized to improve convergence and the data frame is augmented with columns for wolf-pack-level covariate expectations (required by the GFR approach).

2. Leave-one-out validation

The code allows the removal of a single wolf from the data set. Two models (one with just random effects, the second with GFR interactions) are fit to the data and predictions are made for the missing wolf. The function gof() generates goodness-of-fit diagnostics.



ESA Publications | Ecological Archives | Permissions | Citation | Contacts