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.4

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Laura Marshall

Last Published

December 1st, 2020

Functions in mrds (2.2.4)

DeltaMethod

Numeric Delta Method approximation for the variance-covariance matrix
AIC.ddf

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

Average detection function line for plotting
average.line.cond

Average conditional detection function line for plotting
add_df_covar_line

Add covariate levels detection function plots
NCovered

Compute estimated abundance in covered (sampled) region
assign.default.values

Assign default values to list elements that have not been already assigned
compute.Nht

Horvitz-Thompson estimates 1/p_i or s_i/p_i
coef.ds

Extract coefficients
check.bounds

Check parameters bounds during optimisations
assign.par

Extraction and assignment of parameters to vector
cdf.ds

Cumulative distribution function (cdf) for fitted distance sampling detection function
ddf.io

Mark-Recapture Distance Sampling (MRDS) IO - PI
book.tee.data

Golf tee data used in chapter 6 of Advanced Distance Sampling examples
check.mono

Check that a detection function is monotone
create.varstructure

Creates structures needed to compute abundance and variance
ddf.io.fi

Mark-Recapture Distance Sampling (MRDS) IO - FI
apex.gamma

Get the apex for a gamma detection function
create.bins

Create bins from a set of binned distances and a set of cutpoints.
ddf.gof

Goodness of fit tests for distance sampling models
adj.check.order

Check order of adjustment terms
covered.region.dht

Covered region estimate of abundance from Horvitz-Thompson-like estimator
detfct.fit.opt

Fit detection function using key-adjustment functions
ddf.ds

CDS/MCDS Distance Detection Function Fitting
cds

CDS function definition
dht.deriv

Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator
ddf.rem

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

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

Distance Detection Function Fitting
logisticbyx

Logistic as a function of covariates
flnl

Log-likelihood computation for distance sampling data
ddf.trial

Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI
det.tables

Observation detection tables
ddf.trial.fi

Mark-Recapture Analysis of Trial Configuration - FI
detfct.fit

Fit detection function using key-adjustment functions
flt.var

Hessian computation for fitted distance detection function model parameters
dht.se

Variance and confidence intervals for density and abundance estimates
dht

Density and abundance estimates and variances
lfgcwa

Golden-cheeked warbler mark-recapture distance sampling analysis
calc.se.Np

Find se of average p and N
create.model.frame

Create a model frame for ddf fitting
create.ddfobj

Create detection function object
logisticbyz

Logistic as a function of distance
parse.optimx

Parse optimx results and present a nice object
logLik.ddf

log-likelihood value for a fitted detection function
plot.layout

Layout for plot methods in mrds
plot.rem

Plot fit of detection functions and histograms of data from removal distance sampling model
mrds-opt

Tips on optimisation issues in mrds models
histline

Plot histogram line
mcds

MCDS function definition
integratedetfct.logistic

Integrate a logistic detection function
p_dist_table

Distribution of probabilities of detection
p.det

Double-platform detection probability
g0

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

Plot unconditional detection function from distance sampling model
ds.function

Distance Sampling Functions
distpdf

Detection functions
predict.ds

Predictions from mrds models
integratelogistic.analytic

Analytically integrate logistic detection function
pdot.dsr.integrate.logistic

Compute probability that a object was detected by at least one observer
plot_cond

Plot conditional detection function from distance sampling model
prob.deriv

Derivatives for variance of average p and average p(0) variance
setinitial.ds

Set initial values for detection function based on distance sampling
prob.se

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

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

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

Compute chi-square goodness-of-fit test for ds models
ptdata.removal

Simulated removal observer point count data
print.summary.trial.fi

Print summary of distance detection function model object
gstdint

Integral of pdf of distances
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.
is.logistic.constant

Is a logit model constant for all observations?
getpar

Extraction and assignment of parameters to vector
print.p_dist_table

Print distribution of probabilities of detection
summary.trial.fi

Summary of distance detection function model object
summary.trial

Summary of distance detection function model object
keyfct.th1

Threshold key function
keyfct.th2

Threshold key function
io.glm

Iterative offset GLM/GAM for fitting detection function
logisticdupbyx_fast

Logistic for duplicates as a function of covariates (fast)
integratepdf

Numerically integrate pdf of observed distances over specified ranges
logisticdupbyx

Logistic for duplicates as a function of covariates
logisticdetfct

Logistic detection function
plot.det.tables

Observation detection tables
print.summary.ds

Print summary of distance detection function model object
process.data

Process data for fitting distance sampling detection function
lfbcvi

Black-capped vireo mark-recapture distance sampling analysis
is.linear.logistic

Collection of functions for logistic detection functions
mrds-package

Mark-Recapture Distance Sampling (mrds)
ptdata.single

Simulated single observer point count data
logit

Logit function
nlminb_wrapper

Wrapper around nlminb
plot.trial

Plot fit of detection functions and histograms of data from distance sampling trial observer model
setbounds

Set parameter bounds
print.dht

Prints density and abundance estimates
print.det.tables

Print results of observer detection tables
plot.rem.fi

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

Plot fit of detection functions and histograms of data from distance sampling model
print.summary.rem.fi

Print summary of distance detection function model object
setcov

Creates design matrix for covariates in detection function
plot.io

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

Print summary of distance detection function model object
solvecov

Invert of covariance matrices
rescale_pars

Calculate the parameter rescaling for parameters associated with covariates
plot.io.fi

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

Wooden stake data from 1977 survey
print.ddf

Simple pretty printer for distance sampling analyses
summary.rem

Summary of distance detection function model object
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
pronghorn

Pronghorn aerial survey data from Wyoming
stake78

Wooden stake data from 1978 survey
rem.glm

Iterative offset model fitting of mark-recapture with removal model
summary.ds

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

Summary of distance detection function model object
survey.region.dht

Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region
print.ddf.gof

Prints results of goodness of fit tests for detection functions
print.summary.io

Print summary of distance detection function model object
test.breaks

Test validity for histogram breaks(cutpoints)
ptdata.dual

Simulated dual observer point count data
ptdata.distance

Single observer point count data example from Distance
summary.io

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

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

Summary of distance detection function model object
varn

Compute empirical variance of encounter rate