Distance Sampling Examples
Here you can find a set of worked examples (“vignettes”) demonstrating various aspects of distance sampling design and analysis using free software tools we have created and maintain. At present they focus on R packages; for examples using Distance for Windows see Chapter 3 (“Getting started”) of the Distance manual.
Examples below are based upon data sets available in the R packages
dssd (for survey design),
Distance (for analysis of distance sampling surveys),
mrds for double observer methods and
dsm for spatial models. Data for the example of spatial models for point transect are described below the table; data for model-based inference is linked to the HTML description. All examples are provided as Rmarkdown documents. For information about using Rmarkdown files, consult this RStudio website.
Examples with R packages
|Getting started with survey design using
|Use of the package
dssd to create a survey design within a study-area, and examine properties of the design such as how well it covers the study area and average transect lengths. The example uses a parallel line transects; other designs available in the
dssd package follow from this example.
|line transect, design,
|Multiple strata in
|An example of how to create a design in
dssd that contains multiple strata, with different design characteristics in each stratum.
|line transect, design,
|Analysis of line transect data (Rmd)
|Line transect data of winter wrens in Scotland. An example of model fitting, model selection, goodness of fit assessment. Basic analysis skills required for any distance sampling analysis.
|Line transect, songbirds
|Analysis of point transect data (Rmd)
|Point transect analysis of savannah sparrow data set from Knopf et al. (1988)
|point transects, songbirds
|Variance estimation (Rmd)
|Variance estimation examining three approaches: delta-method, bootstrap and bootstrap incorporating model uncertainty. Based on line transect data of winter wrens from Buckland (2006).
|Analysis of stratified survey design, including model selection to determine whether stratum-specific detection functions are necessary. Uses point transect analysis of savannah sparrow data set from Knopf et al. (1988).
|stratification, point transects
|Covariates in detection function (Rmd)
|Bringing covariates into detection function, using amakihi data from Marques et al. (2007).
|point transects, songbirds, covariates
|Multi-species surveys (Rmd)
|Use of species covariate to produce species-specific density estimates when number of detections for some species is small.
|Size bias adjustment (Rmd)
|Because of the detection process, average group size in sample is a positively biased estimate of average group size in population. This bias can be compensated by employing group size as a covariate in the detection function.
|Cue counts (Rmd)
|Cue counting example based on line transect data of winter wrens from Buckland (2006). Incorporating song rate in analysis.
|Cue counts, line transects
|Indirect survey methods (Rmd)
|Estimation of Sika deer density based upon deer pellet distance sampling data. Includes estimation of decay rate using logistic regression and multiplier based on dung production rates. Using data from Marques et al. (2001).
|multipliers, line transects
|Double observer methods (Rmd)
|Full independence and point independence analysis of golf tee data from multiple observers.
|mark-recapture distance sampling
|Density surface modelling - lines (Rmd)
|Line transect survey of pantropical spotted dolphins in the Gulf of Mexico.
|spatial model, dolphins, line transect
|Density surface modelling - points (Rmd)
|Point transect survey of hares in France. Simple density surface model with (x,y) predictor; thanks to Guillaume Souchay, French National Hunting and Wildlife Agency for data and analysis.
|point transect, spatial modelling
|Simulation truncation decisions (Rmd)
|Simulate distance sampling surveys examining the effect of truncation distance and pooling robustness upon estimates of animal density (when true density is known).
|Grouped Strata Simulation (Rmd)
|Simulations using grouped strata for analysis when the region has been divided into sub-strata for design optimisation.
|simulation, grouped strata
|Model-based inference (Rmd)
|Model-based inference combining detection function and density modelling in a single step. Demonstrates both likelihood-based and Bayesian approaches.
|model-based, point transects
|Lure surveys (Rmd)
|Point counts supplemented by trials to assess birds’ response to lures. Combined analysis adjusts counts to adjust for probability of responding to lure.
|survey design, point transects
|Simulation design contrasts (Rmd)
|Simulation package evaluates randomised and non-randomised surveys designs when animals avoid human trails.
|Density surface modelling data formatting (Rmd)
|How to format line transect data for the
|spatial model, line transect
|Camera trap analysis with distance sampling (Rmd)
|Replicates analyses of duiker data presented by Howe et al. (2017) including model selection methods in presence of overdispersion (Howe et al. 2019)
|camera traps, point transects
|Inference regarding density estimate differences (Rmd)
|Statistical comparison of density estimates between strata. Uses formulation provided in Buckland et al. (2001) Sect. 3.6.5
|Caution when analysing multi-species surveys (Rmd)
|Adding additional information to flatfiles when subsetting analysis by species
|multi-species, line transect
|Alternative optimization engine for fitting detection functions (Rmd)
|Demonstrating the mcds.exe alternative optimization engine for fitting single platform detection functions in the
|line transect, camera traps