%0 Generic %A Matthiopoulos, Jason %A Hebblewhite, Mark %A Aarts, Geert %A Fieberg, John %D 2016 %T Supplement 2. R code used for wolf analysis. %U https://wiley.figshare.com/articles/dataset/Supplement_2_R_code_used_for_wolf_analysis_/3550839 %R 10.6084/m9.figshare.3550839.v1 %2 https://wiley.figshare.com/ndownloader/files/5618262 %2 https://wiley.figshare.com/ndownloader/files/5618265 %K space-use %K predictive models %K climate change %K utilization distribution %K home range %K habitat preference %K simulation study %K Canis lupis %K wolf %K species distributions %K generalized linear mixed model %K spatial ecology %K Environmental Science %K Ecology %X

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.

%I Wiley