autoDistSamp | R Documentation |
Perform automated classical detection function selection and estimation of abundance.
autoDistSamp(
formula,
detectionData,
siteData,
w.lo = 0,
w.hi = NULL,
likelihoods = c("halfnorm", "hazrate", "uniform", "negexp", "Gamma"),
series = c("cosine", "hermite", "simple"),
expansions = 0:3,
pointSurvey = FALSE,
warn = TRUE,
area = NULL,
ci = 0.95,
R = 500,
plot.bs = FALSE,
showProgress = TRUE,
plot = TRUE,
criterion = "AICc",
...
)
formula |
This parameter is passed to |
detectionData |
This parameter is passed to |
siteData |
This parameter is passed to |
w.lo |
This parameter is passed to |
w.hi |
This parameter is passed to |
likelihoods |
Vector of strings specifying the likelihoods to consider during model selection. Valid values at present are "uniform", "halfnorm", "hazrate", "negexp", and "Gamma". See Details for the models this routine considers. |
series |
Vector of series types to consider during model selection. Valid values are 'simple', 'hermite', and 'cosine'. See Details for the models this routine considers. |
expansions |
Vector of the number of expansion terms to consider during model selection. Valid values are 0 through 3. See Details for the models this routine considers. Note, expansion terms are not currently allowed in models with covariates. |
pointSurvey |
This parameter is passed to |
warn |
This parameter is passed to |
area |
This parameter is passed to |
ci |
This parameter is passed to |
R |
This parameter is passed to |
plot.bs |
Logical for whether to plot bootstrap
iterations after the top model has been selected and
during final estimation of confidence intervals.
This parameter is passed unchanged to |
showProgress |
Logical for whether to
suppress intermediate output. If |
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 from this routine is the one with lowest value
of this fit criterion. This must be one of "AICc" (the default),
"AIC", or "BIC". See |
... |
Additional parameters passed to |
During model selection, each series and number of expansions is crossed with
each of the likelihoods. For example, if likelihoods
has 3 elements,
series
has 2 elements, and expansions
has 4 elements,
the total number of models fitted is 3 (likelihoods) * 2 (series) * 4 (expansions)
= 24 models. The default specification fits 41 detection functions
from the "halfnorm", "hazrate", "uniform", "negexp", and "Gamma" likelihoods
(note that Gamma does not currently implement expansions, see
Gamma.like
). Note, expansion terms are not currently
allowed in models with covariates. The model with lowest AIC is selected
as 'best', and estimation of abundance proceeds using that model.
Suppress all intermediate output using plot.bs=FALSE
,
showProgress=FALSE
, and plot=FALSE
.
If bySite==FALSE
, an 'abundance estimate' object is returned.
See abundEstim
and dfuncEstim
for an explanation of components.
Returned abundance estimates are based
on the best fitting distance function among those fitted.
A fit table, sorted by the criterion, is returned as component
$fitTable
. The fit table component contains columns
like
(likelihood), series
, expansions
,
converge
(0=converged,1=not), scale
(1=passed scale
check,0=did not pass), and
aic
(the criterion used).
If bySite==TRUE
, a data frame containing site-level
abundance based on the best-fitting detection function is returned.
See abundEstim
for description of columns in
the data frame. The best-fitting likelihood form, series,
and number of expansions are returned as attributes of the
data frame (e.g., best-fitting likelihood is attr(out,"like.form")
).
dfuncEstim
, abundEstim
.
# Load example sparrow data (line transect survey type)
data(sparrowDetectionData)
data(sparrowSiteData)
# Automate fitting multiple detection functions, and estimate abundance
# (density per ha in this case), given the 'best' detection function
autoDistSamp(formula = dist ~ groupsize(groupsize)
, detectionData = sparrowDetectionData
, siteData = sparrowSiteData
, likelihood = c("halfnorm", "hazrate")
, w.hi = units::set_units(100, "m")
, expansions = 0
, area = units::set_units( 4105, "km^2" )
, ci = NULL
, plot = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.