Learn R Programming

⚠️There's a newer version (2.3.0) of this package.Take me there.

mrds - Mark-Recapture Distance Sampling

What is mrds?

This package for R analyzes single or double observer distance sampling data for line or point sampling. It is used in program DISTANCE as one of the analysis engines. Supported double observer configurations include independent, trial and removal. Not all options in mrds are fully supported via DISTANCE.

If you only wish to perform a conventional or multiple covariate distance sampling analysis (CDS/MCDS) (as opposed to a double observer analysis), you may want to try the Distance R package, which has a simplified interface and is available from https://github.com/DistanceDevelopment/Distance.

Getting mrds

The easiest way to ensure you have the latest version of mrds, is to install using the remotes package:

  install.packages("remotes")

then install mrds from github:

  library(remotes)
  install_github("DistanceDevelopment/mrds")

Otherwise:

  • One can download a Windows package binary using the "Releases" tab in github. To install in R, from the R menu, use "Packages\Install from Local Zip file" and browse to location of downloaded zip.
  • Or, download package source files.
  • Finally the current stable version of mrds is available on CRAN, though this may be up to a month out of date due to CRAN policy.

References

The following are references for the methods used in the package.

Burt, M. L., D. L. Borchers, K. J. Jenkins and T. A. Marques. (2014). "Using mark-recapture distance sampling methods on line transect surveys." Methods in Ecology and Evolution 5: 1180-1191.

Buckland, S. T., J. Laake, et al. (2010). "Double observer line transect methods: levels of independence." Biometrics 66: 169-177.

Borchers, D. L., J. L. Laake, et al. (2006). "Accommodating unmodeled heterogeneity in double-observer distance sampling surveys." Biometrics 62(2): 372-378.

Buckland, S. T., D. R. Anderson, et al., Eds. (2004). Advanced distance sampling: estimating abundance of biological populations. Oxford, UK; New York, Oxford University Press. (see chapter 6).

Copy Link

Version

Install

install.packages('mrds')

Monthly Downloads

1,385

Version

2.2.8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Laura Marshall

Last Published

November 16th, 2022

Functions in mrds (2.2.8)

AIC.ddf

Akaike's An Information Criterion for detection functions
average.line

Average detection function line for plotting
add.df.covar.line

Add covariate levels detection function plots
adj.check.order

Check order of adjustment terms
apex.gamma

Get the apex for a gamma detection function
assign.default.values

Assign default values to list elements that have not been already assigned
average.line.cond

Average conditional detection function line for plotting
NCovered

Compute estimated abundance in covered (sampled) region
DeltaMethod

Numeric Delta Method approximation for the variance-covariance matrix
assign.par

Extraction and assignment of parameters to vector
coef.ds

Extract coefficients
cdf.ds

Cumulative distribution function (cdf) for fitted distance sampling detection function
calc.se.Np

Find se of average p and N
check.bounds

Check parameters bounds during optimisations
create.bins

Create bins from a set of binned distances and a set of cutpoints.
cds

CDS function definition
covered.region.dht

Covered region estimate of abundance from Horvitz-Thompson-like estimator
check.mono

Check that a detection function is monotone
book.tee.data

Golf tee data used in chapter 6 of Advanced Distance Sampling examples
compute.Nht

Horvitz-Thompson estimates 1/p_i or s_i/p_i
ddf.gof

Goodness of fit tests for distance sampling models
create.model.frame

Create a model frame for ddf fitting
create.varstructure

Creates structures needed to compute abundance and variance
ddf.ds

CDS/MCDS Distance Detection Function Fitting
ddf.io

Mark-Recapture Distance Sampling (MRDS) IO - PI
ddf.rem

Mark-Recapture Distance Sampling (MRDS) Removal - PI
ddf.io.fi

Mark-Recapture Distance Sampling (MRDS) IO - FI
create.ddfobj

Create detection function object
ddf.rem.fi

Mark-Recapture Distance Sampling (MRDS) Removal - FI
ddf

Distance Detection Function Fitting
dht.deriv

Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator
det.tables

Observation detection tables
distpdf

Detection functions
dht.se

Variance and confidence intervals for density and abundance estimates
dht

Density and abundance estimates and variances
ds.function

Distance Sampling Functions
detfct.fit.opt

Fit detection function using key-adjustment functions
detfct.fit

Fit detection function using key-adjustment functions
ddf.trial

Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI
integratelogistic.analytic

Analytically integrate logistic detection function
ddf.trial.fi

Mark-Recapture Analysis of Trial Configuration - FI
histline

Plot histogram line
integratedetfct.logistic

Integrate a logistic detection function
gof.ds

Compute chi-square goodness-of-fit test for ds models
g0

Compute value of p(0) using a logit formulation
gstdint

Integral of pdf of distances
flt.var

Hessian computation for fitted distance detection function model parameters
flnl

Log-likelihood computation for distance sampling data
getpar

Extraction and assignment of parameters to vector
integratepdf

Numerically integrate pdf of observed distances over specified ranges
lfgcwa

Golden-cheeked warbler mark-recapture distance sampling analysis
logisticbyx

Logistic as a function of covariates
logLik.ddf

log-likelihood value for a fitted detection function
keyfct.th2

Threshold key function
keyfct.tpn

Two-part normal key function
keyfct.th1

Threshold key function
is.logistic.constant

Is a logit model constant for all observations?
lfbcvi

Black-capped vireo mark-recapture distance sampling analysis
io.glm

Iterative offset GLM/GAM for fitting detection function
is.linear.logistic

Collection of functions for logistic detection functions
p.det

Double-platform detection probability
logisticdupbyx_fast

Logistic for duplicates as a function of covariates (fast)
mrds-opt

Tips on optimisation issues in mrds models
logisticdupbyx

Logistic for duplicates as a function of covariates
logisticdetfct

Logistic detection function
nlminb_wrapper

Wrapper around nlminb
mcds

MCDS function definition
logit

Logit function
logisticbyz

Logistic as a function of distance
mrds-package

Mark-Recapture Distance Sampling (mrds)
parse.optimx

Parse optimx results and present a nice object
plot.ds

Plot fit of detection functions and histograms of data from distance sampling model
p.dist.table

Distribution of probabilities of detection
pdot.dsr.integrate.logistic

Compute probability that a object was detected by at least one observer
plot.det.tables

Observation detection tables
plot.io.fi

Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi)
plot.io

Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model
plot.rem

Plot fit of detection functions and histograms of data from removal distance sampling model
plot.layout

Layout for plot methods in mrds
plot.rem.fi

Plot fit of detection functions and histograms of data from removal distance sampling model
print.ddf

Simple pretty printer for distance sampling analyses
print.dht

Prints density and abundance estimates
print.p_dist_table

Print distribution of probabilities of detection
plot.trial.fi

Plot fit of detection functions and histograms of data from distance sampling trial observer model
predict.ds

Predictions from mrds models
plot.trial

Plot fit of detection functions and histograms of data from distance sampling trial observer model
print.ddf.gof

Prints results of goodness of fit tests for detection functions
plot_uncond

Plot unconditional detection function from distance sampling model
plot_cond

Plot conditional detection function from distance sampling model
print.det.tables

Print results of observer detection tables
prob.deriv

Derivatives for variance of average p and average p(0) variance
print.summary.rem.fi

Print summary of distance detection function model object
process.data

Process data for fitting distance sampling detection function
print.summary.io

Print summary of distance detection function model object
print.summary.rem

Print summary of distance detection function model object
print.summary.trial.fi

Print summary of distance detection function model object
print.summary.io.fi

Print summary of distance detection function model object
prob.se

Average p and average p(0) variance
print.summary.ds

Print summary of distance detection function model object
print.summary.trial

Print summary of distance detection function model object
ptdata.single

Simulated single observer point count data
rem.glm

Iterative offset model fitting of mark-recapture with removal model
rescale_pars

Calculate the parameter rescaling for parameters associated with covariates
sample_ddf

Generate data from a fitted detection function and refit the model
qqplot.ddf

Quantile-quantile plot and goodness of fit tests for detection functions
ptdata.dual

Simulated dual observer point count data
ptdata.distance

Single observer point count data example from Distance
pronghorn

Pronghorn aerial survey data from Wyoming
setbounds

Set parameter bounds
ptdata.removal

Simulated removal observer point count data
sim.mix

Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions.
summary.io

Summary of distance detection function model object
setinitial.ds

Set initial values for detection function based on distance sampling
solvecov

Invert of covariance matrices
stake77

Wooden stake data from 1977 survey
summary.io.fi

Summary of distance detection function model object
summary.rem

Summary of distance detection function model object
stake78

Wooden stake data from 1978 survey
summary.ds

Summary of distance detection function model object
setcov

Creates design matrix for covariates in detection function
test.breaks

Test validity for histogram breaks(cutpoints)
summary.trial

Summary of distance detection function model object
summary.rem.fi

Summary of distance detection function model object
varn

Compute empirical variance of encounter rate
survey.region.dht

Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region
summary.trial.fi

Summary of distance detection function model object