Package: mrds 3.0.0

Laura Marshall

mrds: Mark-Recapture Distance Sampling

Animal abundance estimation via conventional, multiple covariate and mark-recapture distance sampling (CDS/MCDS/MRDS). Detection function fitting is performed via maximum likelihood. Also included are diagnostics and plotting for fitted detection functions. Abundance estimation is via a Horvitz-Thompson-like estimator.

Authors:Laura Marshall [cre], Jeff Laake [aut], David Miller [aut], Felix Petersma [aut], Len Thomas [ctb], David Borchers [ctb], Jon Bishop [ctb], Jonah McArthur [ctb], Eric Rexstad [rev]

mrds_3.0.0.tar.gz
mrds_3.0.0.tar.gz(r-4.5-noble)mrds_3.0.0.tar.gz(r-4.4-noble)
mrds_3.0.0.tgz(r-4.4-emscripten)mrds_3.0.0.tgz(r-4.3-emscripten)
mrds.pdf |mrds.html
mrds/json (API)
NEWS

# Install 'mrds' in R:
install.packages('mrds', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/distancedevelopment/mrds/issues

Datasets:
  • book.tee.data - Golf tee data used in chapter 6 of Advanced Distance Sampling examples
  • lfbcvi - Black-capped vireo mark-recapture distance sampling analysis
  • lfgcwa - Golden-cheeked warbler mark-recapture distance sampling analysis
  • pronghorn - Pronghorn aerial survey data from Wyoming
  • ptdata.distance - Single observer point count data example from Distance
  • ptdata.dual - Simulated dual observer point count data
  • ptdata.removal - Simulated removal observer point count data
  • ptdata.single - Simulated single observer point count data
  • stake77 - Wooden stake data from 1977 survey
  • stake78 - Wooden stake data from 1978 survey

5.30 score 6 packages 77 scripts 1.4k downloads 12 mentions 18 exports 10 dependencies

Last updated 6 days agofrom:55b6b455ee. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 24 2024
R-4.5-linuxOKOct 24 2024

Exports:add_df_covar_lineadd.df.covar.lineassign.parcheck.monocreate.binscreate.ddfobjddfddf.gofDeltaMethoddet.tablesdetfctdhtdht.sep_dist_tablep.dist.tableqqplot.ddfsolvecovvarn

Dependencies:latticeMatrixmgcvnlmenloptrnumDerivoptimxpracmaRsolnptruncnorm

Readme and manuals

Help Manual

Help pageTopics
Mark-Recapture Distance Sampling (mrds)mrds-package mrds
Add covariate levels detection function plotsadd.df.covar.line add_df_covar_line
Check order of adjustment termsadj.check.order
Cosine adjustment term, not the series.adj.cos
Hermite polynomial adjustment term, not the series.adj.herm
Simple polynomial adjustment term, not the series.adj.poly
Series of the gradient of the cosine adjustment series w.r.t. the scaled distance.adj.series.grad.cos
Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance.adj.series.grad.herm
Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance.adj.series.grad.poly
Akaike's An Information Criterion for detection functionsAIC.ddf AIC.ds AIC.io AIC.io.fi AIC.rem AIC.rem.fi AIC.trial AIC.trial.fi
Get the apex for a gamma detection functionapex.gamma
Assign default values to list elements that have not been already assignedassign.default.values
Average detection function line for plottingaverage.line
Average conditional detection function line for plottingaverage.line.cond
Golf tee data used in chapter 6 of Advanced Distance Sampling examplesbook.tee.data
Find se of average p and Ncalc.se.Np
Cumulative distribution function (cdf) for fitted distance sampling detection functioncdf.ds
CDS function definitioncds
Check parameters bounds during optimisationscheck.bounds
Check that a detection function is monotonecheck.mono
Extract coefficientscoef.ds coef.io coef.io.fi coef.rem coef.rem.fi coef.trial coef.trial.fi coefficients
Horvitz-Thompson estimates 1/p_i or s_i/p_icompute.Nht
Covered region estimate of abundance from Horvitz-Thompson-like estimatorcovered.region.dht
Create bins from a set of binned distances and a set of cutpoints.create.bins
create.command.filecreate.command.file
Create a model frame for ddf fittingcreate.model.frame
Creates structures needed to compute abundance and variancecreate.varstructure
Distance Detection Function Fittingddf
CDS/MCDS Distance Detection Function Fittingddf.ds
Goodness of fit tests for distance sampling modelsddf.gof gof.io gof.io.fi gof.rem gof.rem.fi gof.trial gof.trial.fi
Mark-Recapture Distance Sampling (MRDS) IO - PIddf.io
Mark-Recapture Distance Sampling (MRDS) IO - FIddf.io.fi
Mark-Recapture Distance Sampling (MRDS) Removal - PIddf.rem
Mark-Recapture Distance Sampling (MRDS) Removal - FIddf.rem.fi
Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PIddf.trial
Mark-Recapture Analysis of Trial Configuration - FIddf.trial.fi
Numeric Delta Method approximation for the variance-covariance matrixDeltaMethod
Observation detection tablesdet.tables
Fit detection function using key-adjustment functionsdetfct.fit
Fit detection function using key-adjustment functionsdetfct.fit.opt
Density and abundance estimates and variancesdht
Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimatordht.deriv
Variance and confidence intervals for density and abundance estimatesdht.se
Gradient of the non-normalised pdf of distances or the detection function for the distances.distpdf.grad
Distance Sampling Functionsds.function
Log-likelihood computation for distance sampling dataflnl flpt.lnl
(Negative) gradients of constraint functionflnl.constr.grad.neg
This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the 'mrds' and 'Distance' packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet.flnl.grad
Hessian computation for fitted distance detection function model parametersflt.var
Compute value of p(0) using a logit formulationg0
Extraction and assignment of parameters to vectorgetpar
Compute chi-square goodness-of-fit test for ds modelsgof.ds
Integral of pdf of distancesgstdint
Plot histogram linehistline
Integrate a logistic detection functionintegratedetfct.logistic
Analytically integrate logistic detection functionintegratelogistic.analytic
Numerically integrate pdf of observed distances over specified rangesintegratepdf
Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges.integratepdf.grad
Iterative offset GLM/GAM for fitting detection functionio.glm
Collection of functions for logistic detection functionsis.linear.logistic
Is a logit model constant for all observations?is.logistic.constant
The gradient of the half-normal key functionkeyfct.grad.hn
The gradient of the hazard-rate key functionkeyfct.grad.hz
Threshold key functionkeyfct.th1
Threshold key functionkeyfct.th2
Two-part normal key functionkeyfct.tpn two-part-normal
Black-capped vireo mark-recapture distance sampling analysislfbcvi
Golden-cheeked warbler mark-recapture distance sampling analysislfgcwa
Logistic as a function of covariateslogisticbyx
Logistic as a function of distancelogisticbyz
Logistic detection functionlogisticdetfct
Logistic for duplicates as a function of covariateslogisticdupbyx
Logistic for duplicates as a function of covariates (fast)logisticdupbyx_fast
Logit functionlogit
log-likelihood value for a fitted detection functionlogLik.ddf logLik.ds logLik.io logLik.io.fi logLik.rem logLik.rem.fi logLik.trial logLik.trial.fi
MCDS function definitionmcds
Run MCDS.exe as a backend for mrdsMCDS MCDS.exe mcds_dot_exe
Tips on optimisation issues in 'mrds' modelsmrds_opt
Compute estimated abundance in covered (sampled) regionNCovered NCovered.ds NCovered.io NCovered.io.fi NCovered.rem NCovered.rem.fi NCovered.trial NCovered.trial.fi
Wrapper around 'nlminb'nlminb_wrapper
Double-platform detection probabilityp.det
Distribution of probabilities of detectionp.dist.table p_dist_table
Parse optimx results and present a nice objectparse.optimx
Compute probability that a object was detected by at least one observerpdot.dsr.integrate.logistic
Plot conditional detection function from distance sampling modelplot_cond
Layout for plot methods in mrdsplot_layout
Plot unconditional detection function from distance sampling modelplot_uncond
Observation detection tablesplot.det.tables
Plot fit of detection functions and histograms of data from distance sampling modelplot.ds
Plot fit of detection functions and histograms of data from distance sampling independent observer ('io') modelplot.io
Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence ('io.fi')plot.io.fi
Plot fit of detection functions and histograms of data from removal distance sampling modelplot.rem
Plot fit of detection functions and histograms of data from removal distance sampling modelplot.rem.fi
Plot fit of detection functions and histograms of data from distance sampling trial observer modelplot.trial
Plot fit of detection functions and histograms of data from distance sampling trial observer modelplot.trial.fi
Predictions from 'mrds' modelspredict predict.ddf predict.ds predict.io predict.io.fi predict.rem predict.rem.fi predict.trial predict.trial.fi
Simple pretty printer for distance sampling analysesprint.ddf
Prints results of goodness of fit tests for detection functionsprint.ddf.gof
Print results of observer detection tablesprint.det.tables
Prints density and abundance estimatesprint.dht
Print distribution of probabilities of detectionprint.p_dist_table
Print summary of distance detection function model objectprint.summary.ds
Print summary of distance detection function model objectprint.summary.io
Print summary of distance detection function model objectprint.summary.io.fi
Print summary of distance detection function model objectprint.summary.rem
Print summary of distance detection function model objectprint.summary.rem.fi
Print summary of distance detection function model objectprint.summary.trial
Print summary of distance detection function model objectprint.summary.trial.fi
Derivatives for variance of average p and average p(0) varianceprob.deriv
Average p and average p(0) varianceprob.se
Process data for fitting distance sampling detection functionprocess.data
Pronghorn aerial survey data from Wyomingpronghorn
Single observer point count data example from Distanceptdata.distance
Simulated dual observer point count dataptdata.dual
Simulated removal observer point count dataptdata.removal
Simulated single observer point count dataptdata.single
Quantile-quantile plot and goodness of fit tests for detection functionsqqplot.ddf
Iterative offset model fitting of mark-recapture with removal modelrem.glm
Calculate the parameter rescaling for parameters associated with covariatesrescale_pars
Generate data from a fitted detection function and refit the modelsample_ddf
Set parameter boundssetbounds
Creates design matrix for covariates in detection functionsetcov
Set initial values for detection function based on distance samplingsethazard setinitial.ds
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.sim.mix
Invert of covariance matricessolvecov
Wooden stake data from 1977 surveystake77
Wooden stake data from 1978 surveystake78
Summary of distance detection function model objectsummary.ds
Summary of distance detection function model objectsummary.io
Summary of distance detection function model objectsummary.io.fi
Summary of distance detection function model objectsummary.rem
Summary of distance detection function model objectsummary.rem.fi
Summary of distance detection function model objectsummary.trial
Summary of distance detection function model objectsummary.trial.fi
Extrapolate Horvitz-Thompson abundance estimates to entire surveyed regionsurvey.region.dht
Test validity for histogram breaks(cutpoints)test.breaks
Compute empirical variance of encounter ratecovn varn