Abstract
1. Popular frameworks for studying habitat selection include resource-selection functions (RSFs) and step-selection functions (SSFs) estimated using logistic and conditional logistic regression, respectively. Both frameworks compare environmental covariates associated with locations animals visit with environmental covariates at a set of locations assumed available to the animal. Conceptually, random coefficients could be used to accommodate inter-individual heterogeneity with either approach, but straightforward and efficient one-step procedures for fitting SSFs with random coefficients are currently lacking.
2. We take advantage of the fact that the conditional logistic regression model (i. e., the SSF) is likelihood-equivalent to a Poisson model with stratum-specific intercepts. By interpreting the intercepts as a random effect with a large (fixed) variance, inference becomes feasible with standard Bayesian techniques, but also with frequentist methods that allow one to fix the variance of a random effect. We compare this approach to other commonly applied alternatives, including random intercept-only models, and to a two-step algorithm for fitting mixed-effects models.
3. We also reinforce the need to weight available points when fitting RSFs, since models fit using “infinitely weighted logistic regression” have been shown to be equivalent to an inhomogeneous Poisson process (IPP). We generalize this result to “infinitely weighted Poisson regression”, which converges to the same underlying IPP distribution.
4. Using data from Eurasian otters (Lutra lutra) and mountain goats (Oreamnos americanus), we illustrate that our models lead to valid and feasible inference. In addition, we conduct a simulation study to demonstrate the importance of including random slopes when estimating individual- and population-level habitat-selection parameters.
5. By providing coded examples using integrated nested Laplace approximations (INLA) and Template Model Builder (TMB) for Bayesian and frequentist analysis via the R packages R-INLA and glmmTMB, we hope to make efficient estimation of RSFs and SSFs with random effects accessible to anyone in the field. SSFs with individual-specific coefficients are particularly attractive since they can provide insights into movement and habitat-selection processes at fine-spatial and temporal scales, but these models had previously been very challenging to fit.