Learn R Programming

Rdistance (version 2.1.3)

abundEstim: Estimate abundance from distance-sampling data

Description

Estimate abundance (or density) given an estimated detection function and supplemental information on observed group sizes, transect lengths, area surveyed, etc. Also computes confidence intervals of abundance (or density) using the bias corrected bootstrap method.

Usage

abundEstim(dfunc, detectionData, siteData, area = 1, ci = 0.95,
  R = 500, plot.bs = FALSE, bySite = FALSE, showProgress = TRUE)

Arguments

dfunc

An estimated 'dfunc' object produced by dfuncEstim.

detectionData

A data.frame with each row representing one detection (see example dataset, sparrowDetectionData) and with at least the following three columns:

  • siteID = ID of the transect or point.

  • groupsize = the number of individuals in the detected group.

  • dist = the perpendicular, off-transect distance or radial off-point distance to the detected group.

siteData

A data.frame with each row representing one site (transect or point) (see example dataset, sparrowSiteData). If the data in detectionData is from line transects, siteData must have at least the following two columns:

  • siteID = ID of the transect or point. This vector is used during bootstrapping to resample sites.

  • length = the length of the transect.

If the data in detectionData is from point transects, siteData must have a siteID column only. For both data types, siteID is used during bootstrapping to resample sites.

area

Total study area size. If area = 1, density is estimated. Density has units (number of animals) per (squared units of the distance measurements). For example, if distance values fitted in dfunc are meters, density is number of individuals per square meter. If distances are miles, density is number of individuals per square mile. If area > 1, total abundance on the study area is estimated and units are (number of animals). This can also be used to convert units for density. For example, if distance values fitted in dfunc are meters, and area is set to 10,000, density is number of individuals per hectare (ha; 1 ha = 10,000 square meters). square meter.

ci

A scalar indicating the confidence level of confidence intervals. Confidence intervals are computed using the bias corrected bootstrap method. If ci = NULL, confidence intervals are not computed.

R

The number of bootstrap iterations to conduct when ci is not NULL.

plot.bs

A logical scalar indicating whether to plot individual bootstrap iterations.

bySite

A logical scalar indicating whether to compute site-level estimates of abundance. The default (bySite=FALSE) returns only one overall abundance estimate. This routine does not calculate confidence intervals for these site-level abundance estimates, so ci is set to NULL if bySite = TRUE. See estimateN.

showProgress

A logical indicating whether to show a text-based progress bar during bootstrapping. Default is TRUE. It is handy to shut off the progress bar if running this within another function. Otherwise, it is handy to see progress of the bootstrap iterations.

Value

If bySite is FALSE, an 'abundance estimate' object, a list of class c("abund", "dfunc"), containing all the components of a "dfunc" object (see dfuncEstim), plus the following:

abundance

Estimated abundance in the study area (if area > 1) or estimated density in the study area (if area = 1).

n

The number of detections (not individuals, unless all group sizes = 1) used in the estimate of abundance.

area

Total area of inference. Study area size

esw

Effective strip width for line-transects, effective radius for point-transects. Both derived from dfunc. See ESW

or EDR for formulas.
n.sites

Total number of transects for line-transects, total number of points for point-transects.

tran.len

Total transect length. NULL for point-transects.

avg.group.size

Average group size

ci

The bias corrected bootstrap confidence interval for n.hat. The names of this component give the quantiles of the bootstrap distribution used to compute the bias corrected interval.

B

A vector or length R containing all bootstrap estimated population sizes. If a particular iteration did not converge, the corresponding entry in B will be NA. The bootstrap distribution of n.hat can be plotted with hist(x$B), where x is an 'abundance estimate' object. The confidence interval in ci can be reproduced with quantile(x$B[!is.na(x$B)], p=names(x$ci) ).

alpha

The (scalar) confidence level of the confidence interval for n.hat.

If bySite is TRUE, a data frame containing site-level estimated abundance. The data frame is an exact copy of siteData with the following columns tacked onto the end:
effDist

The effective sampling distance at the site. For line- transects, this is ESW at the site. For points, this is EDR.

pDetection

Average probability of detection at the site. If only site-level covariates appear in the distance function, pDetection is constant within a site. When detection-level covariates are present, pDetection is the average at the site.

observedCount

The total number of individuals detected at a site.

abundance

Estimated abundance at the site. This is the sum of inflated group sizes at the site. i.e., each group size at the site is divided by its pDetection, and then summed.

density

Estimated density at the site. This is abundance at the site divided by the sampled area at the site. E.g., for line transects, this is abundance divided by \(2*w*length\). For points, this is abundance divided by \(pi*w^2\).

effArea

The effective area sampled at the site. This could be used as an offset in a subsequent linear model. For line transects, this is \(2*ESW*length\). For points, this is \(pi*EDR^2\).

Details

The abundance estimate for line transect surveys (if no covariates are included in the detection function) is $$N = \frac{n.indiv(area)}{2(ESW)(tot.trans.len)}$$ where n.indiv is either avg.group.size * n or sum(group.sizes), and ESW is the effective strip width computed from the estimated distance function (i.e., ESW(dfunc)).

The confidence interval for abundance assumes that the fundamental units of replication (lines or points, hereafter "sites") are independent. The bias corrected bootstrap method used here resamples the units of replication (sites) and recalculates the model's parameter estimates. If a double-observer data frame is included in dfunc, rows of the double-observer data frame are re-sampled each bootstrap iteration. No model selection is performed. By default, R = 500 iterations are performed, after which the bias corrected confidence intervals are computed using the method given in Manly (1997, section 3.4).

Setting plot.bs=FALSE and showProgress=FALSE suppresses all intermediate output. This is good when calling abundEstim from within other functions or during simulations.

References

Manly, B.F.J. (1997) Randomization, bootstrap, and monte-carlo methods in biology, London: Chapman and Hall.

Buckland, S.T., D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. (2001) Introduction to distance sampling: estimating abundance of biological populations. Oxford University Press, Oxford, UK.

See Also

dfuncEstim, autoDistSamp.

Examples

Run this code
# NOT RUN {
# Load example sparrow data (line transect survey type)
data(sparrowDetectionData)
data(sparrowSiteData)

# Fit half-normal detection function
dfunc <- dfuncEstim(formula=dist~1,
                    detectionData=sparrowDetectionData,
                    likelihood="halfnorm", w.hi=100, pointSurvey=FALSE)

# Estimate abundance given a detection function
# Note, area=10000 converts to density per hectare (for distances measured in meters)
# Note, a person should do more than R=20 iterations
fit <- abundEstim(dfunc, detectionData=sparrowDetectionData,
                  siteData=sparrowSiteData, area=10000, R=20, ci=0.95,
                  plot.bs=TRUE, bySite=FALSE)

# Print results
fit
         
# }

Run the code above in your browser using DataLab