Distance R packages

Many of the components of the Distance Windows package are in fact R packages which can be used independently of Distance itself. These pages have resources for using the packages, including vignettes showing example analyses.

Available packages

A list of available packages is given below. Links to “CRAN” are stable versions of the package, uploaded to the Comprehensive R Archive Network, “github” links are to development versions and are recommended for advanced users only, “wiki” and “readme” links are to online additional documentation.

• mrds - fits detection functions to point and line transect distance sampling survey data (for both single and double observer surveys). Abundance can be estimated using Horvitz-Thompson-type estimators. CRAN, github.
• Distance - a simpler interface to mrds for single observer distance sampling surveys. CRAN, github, wiki, feature comparison.
• dsm - fits density surface models to spatially-referenced distance sampling data. Count data are corrected using detection function models fitted using mrds or Distance. Spatial models are constructed using generalized additive models. CRAN, github, wiki.
• dsmextra- a toolkit for quantifying and visualising extrapolation in density surface models. github, readme.
• DSsim - a package for simulating distance sampling surveys. CRAN, github.
• mads - deals with unidentified sightings, covariate uncertainty and model uncertainty in Distance sampling. CRAN, github.

Getting started

Wondering how to get started with the distance sampling R packages? We recommend our paper in the Journal of Statistical Software for getting started with Distance analyses.

We also have a page dedicated to example analyses. Examples were generated from the .Rmd files . Data files are also supplied so you can duplicate the analyses (if they are not included in packages). The examples site referenced above contains many of the vignettes formerly shown on this page, plus many more examples.

Migrating data and analyses from Distance for Windows to R environment

Analysis of distance sampling data can be performed either in the Distance for Windows graphical user interface, or with the R packages described on this page. An R package, readdst is under development for reading Distance for Windows project files into R for subsequent analysis in R. The package was written as a testing tool to compare results produced by the R routines against results produced by Distance for Windows. However, as we demonstrate in the following vignette, readdst can be used to migrate some Distance for Windows projects for analysis in R (limitations of readdst are shown in the vignette).