R packages

HOME

AHMbook

The AHMbook package is now on CRAN and can be installed with install.packages("AHMbook") .

makeJAGSmask

You will need R version 3.3.0 or later, and the secr package. If necessary, do

install.packages("secr")

Then you can install makeJAGSmask with the githubinstall package. If necessary, do

install.packages("githubinstall")

Then do

githubinstall::githubinstall("makeJAGSmask")

If you need to install manually, you can download the files:

source (TAR.GZ 122Kb) , Windows binary (ZIP 145Kb) , Mac (Mavericks or later) binary (TGZ 141Kb)

wiqid

The wiqid package is now on CRAN and can be installed with install.packages("wiqid") .

Statistical modeling for ecological data relies on flexible tools that handle uncertainty and complexity in animal populations. The Bayesian framework offers a natural way to incorporate prior knowledge and produce full posterior distributions for parameters of interest, rather than simple point estimates. Packages available for R allow researchers to fit hierarchical models for capture-recapture studies, occupancy surveys, and spatial capture-recapture analyses. These methods estimate density, detection probability, and habitat use while accounting for imperfect detection. The ability to run Markov chain Monte Carlo chains in parallel makes it feasible to fit complex models with multiple random effects and spatial covariates, even on modest desktop computers.

Spatially explicit capture-recapture methods have transformed how wildlife researchers estimate population density. By combining animal detection locations with information about trap placement and movement patterns, these models produce robust density estimates without requiring a defined sampling area. The integration of habitat covariates allows for mapping predicted density across landscapes, revealing how animals use space in relation to roads, vegetation types, and other environmental features. Recent software developments have made these analyses accessible to field biologists, with packages that handle data formatting, model fitting, and output visualization through straightforward workflows.

Occupancy modeling provides a framework for understanding species distribution patterns when detection is imperfect. By revisiting sites multiple times and recording presence or absence, analysts can separate the processes of occupancy and detection. This approach has become standard for monitoring rare or cryptic species, enabling reliable estimates of range dynamics and habitat relationships. Multi-season extensions allow for estimating colonization and extinction rates, making occupancy models valuable tools for conservation planning and assessing the impacts of environmental change on species persistence across landscapes over time.

The wiqid package offers a collection of functions for quick Bayesian analysis of common ecological models, including single-season occupancy, capture-recapture, and species accumulation curves. It simplifies the process of specifying priors and running MCMC samplers, making Bayesian methods more approachable for practitioners who may not specialize in programming or statistical theory. The package emphasizes ease of use while maintaining the rigor of full posterior estimation. Users can produce summary statistics, convergence diagnostics, and graphical displays of results with minimal code, lowering the barrier to adopting Bayesian approaches in routine wildlife analysis workflows.

Installing R packages for ecological analysis has become increasingly straightforward, with most tools available directly from CRAN or through repositories like GitHub. The AHMbook package, for example, accompanies the Applied Hierarchical Modeling texts and provides data sets and helper functions for practicing the methods described in those volumes. For specialized tools like makeJAGSmask, installation via the githubinstall package handles dependencies automatically. Users working across operating systems can find precompiled binaries for Windows and Mac, while source files remain available for those who need to compile manually. This ecosystem of accessible software supports the growing community of ecologists using hierarchical models.

Updated 18 July 2017 by Mike Meredith