F.efficiency.model | R Documentation |
Estimate the efficiency model from a data frame containing efficiency trials.
F.efficiency.model(obs.eff.df, plot = T, max.df.spline = 4, plot.file = NA)
obs.eff.df |
A data frame with at least variables |
plot |
A logical indicating if raw efficiencies and the model(s) should be plotted. |
max.df.spline |
The maximum degrees of freedom allowed for splines. |
plot.file |
The name of the file prefix under which output is to be
saved. Set to |
A data frame with all observed and imputed efficiency
values,
where variable gam.estimated
identifies days with imputed values.
Less than eff.min.spline.samp.size
trials :
A "weighted average constant model with bias correction." This model
uses constant efficiency over the season, and estimates it
using a ratio-of-means bias-corrected ("ROM+1") average. For each
trap, estimated efficiency is
\frac{(∑ nCaught) + 1}{(∑ nReleased) + 1}{(sum(nCaught) + 1) / (sum(nReleased) + 1)}
. Values
for nCaught
and nReleased
come from function
F.get.releases
.
eff.min.spline.samp.size
trials or more : A "B-spline model."
This model starts by estimating a constant logistic regression where
recaptures (i.e., nCaught
) is the number of "successes" and releases
(i.e., nReleased
) is number of "trials". Assuming this constant
model is successful, the method estimates a series of increasingly complex
b-spline logistic regression models until AIC is minimized or model
estimation fails (failure to converge or estimates at boundary). B-spline
models, in general, divide the date range into intervals by adding 'knots'.
Between 'knots', b-spline models fit cubic polynomials in a way that
connects smoothly at knots (refer to b-spline methods for details).
The first (lowest order) b-spline model fitted contains zero knots and
therefore estimates a cubic model. Assuming that model was successful and
that AIC improved relative to the constant model, the method adds one knot
at the median date and re-estimates. If that model was successful and AIC
improved relative to the previous model, the method adds another knot at
the (1/(knots+1))-th quantiles of date and re-estimates. The method
containues to add knots until one or more of the following conditions
happen: (1) AIC does not improve, (2) estimation fails somehow, or (3) the
maximum number of knots (i.e., max.df.spline-3
) is fitted.
Using the default value of max.df.spline
, the efficiency model is
either constant (intercept-only), cubic, or b-spline with one interval
knot.
When the best logistic regression model is constant (intercept-only), estimated efficiency is the ratio-of-means estimator WITHOUT the "+1" bias correction. With many efficiency trial, the "+1" bias correction is tiny and inconsequential. The exact efficiency model used at each subsite is listed in the campR log file.
The βs from the final logistic regression are saved for use in
bootstrapping by function F.boostrap.passage
. Modeled efficiencies
are used for all days, even if a particular day contained an efficiency
trial.
All dates outside the efficiency trial season use the mean of estimates within the season. This means the efficiency model can vary within a season, but is always constant before the first and after the last efficiency trial.
WEST Inc.
F.get.releases
, F.bootstrap.passage
, reMap
,
reMap2
## Not run: # ---- Fit an efficiency model for each unique trapPositionID # ---- in data frame obs.eff.df. F.efficiency.model( obs.eff.df, plot=T, max.df.spline=4, plot.file=NA) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.