autoDistSamp | R Documentation |
Perform automated likelihood, expansion, and series selection for a classic distance sampling analysis. Estimate abundance using the best fitting likelihood, expansion, and series.
autoDistSamp(
data,
formula,
likelihoods = c("halfnorm", "hazrate", "negexp"),
w.lo = units::set_units(0, "m"),
w.hi = NULL,
expansions = 0:3,
series = c("cosine"),
x.scl = w.lo,
g.x.scl = 1,
warn = TRUE,
outputUnits = NULL,
area = NULL,
propUnitSurveyed = 1,
ci = 0.95,
R = 500,
plot.bs = FALSE,
showProgress = TRUE,
plot = TRUE,
criterion = "AICc"
)
data |
An |
formula |
A standard formula object. For example, |
likelihoods |
String vector specifying the likelihoods to fit.
See 'likelihood' parameter of |
w.lo |
Lower or left-truncation limit of the distances in distance data.
This is the minimum possible off-transect distance. Default is 0. If
|
w.hi |
Upper or right-truncation limit of the distances
in |
expansions |
A scalar specifying the number of terms
in |
series |
If |
x.scl |
The x coordinate (a distance) at which the
detection function will be scaled. |
g.x.scl |
Height of the distance function at coordinate |
warn |
A logical scalar specifying whether to issue
an R warning if the estimation did not converge or if one
or more parameter estimates are at their boundaries.
For estimation, |
outputUnits |
A string specifying the symbolic measurement
units for results. Valid units are listed in |
area |
A scalar containing the total area of inference. Usually, this is
study area size. If |
propUnitSurveyed |
A scalar or vector of real numbers between 0 and 1.
The proportion of the default sampling unit that
was surveyed. If both sides of line transects were observed,
|
ci |
A scalar indicating the confidence level of confidence intervals.
Confidence intervals are computed using a bias corrected bootstrap
method. If |
R |
The number of bootstrap iterations to conduct when |
plot.bs |
A logical scalar indicating whether to plot individual bootstrap iterations. |
showProgress |
A logical indicating whether to show a text-based
progress bar during bootstrapping. Default is |
plot |
Logical scalar specifying whether to plot models during model selection.
If |
criterion |
A string specifying the criterion to use when assessing model fit.
The best fitting model, as defined by this routine, has the lowest value
of this criterion. This must be one of "AICc" (the default),
"AIC", or "BIC". See |
During distance function selection, all combinations of likelihoods, series, and
number of expansions is fitted. For example, if likelihoods
has 3 elements,
series
has 2 elements, and expansions
has 4 elements,
this routine fits a total of 3 (likelihoods) * 2 (series) * 4 (expansions)
= 24 models. Default parameters fit 9 detection functions, i.e.,
all combinations of "halfnorm", "hazrate", and "negexp" likelihoods
and 0 through 3 expansions. Other combinations are specified through
values of likelihoods
, series
, and expansions
.
Suppress all intermediate output using plot.bs=FALSE
,
showProgress=FALSE
, and plot=FALSE
.
The returned abundance estimate object contains
an additional component, the fitting table (a list of models fitted and
criterion values) in component $fitTable
.
An Rdistance 'abundance estimate' object, which is a list of
class c("abund", "dfunc")
, containing all the components of a "dfunc"
object (see dfuncEstim
), plus the following:
estimates |
A tibble containing fitted coefficients in the distance function, density in the area(s) surveyed, abundance on the study area, the number of groups seen between w.lo and w.hi, the number of individuals seen between w.lo and w.hi, study area size, surveyed area, average group size, and average effective detection distance. |
B |
If confidence intervals were requested, a tibble
containing all bootstrap values of coefficients,
density, abundance, groups seen, individuals seen,
study area size, surveyed area size, average group size,
and average effective detection distance. The number of rows is always
|
ci |
Confidence level of the confidence intervals |
dfuncEstim
, abundEstim
.
# Load example sparrow data (line transect survey type)
data(sparrowDf)
autoDistSamp(data = sparrowDf
, formula = dist ~ groupsize(groupsize)
, likelihoods = c("halfnorm","negexp")
, expansions = 0
, plot = FALSE
, ci = NULL
, area = units::set_units(1, "hectare")
)
## Not run:
autoDistSamp(data = sparrowDf
, formula = dist ~ 1 + groupsize(groupsize)
, ci = 0.95
, area = units::set_units(1, "hectare")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.