
GLMM-based aerial effort estimation with diurnal correction
Source:R/creel-estimates-aerial-glmm.R
estimate_effort_aerial_glmm.RdEstimates total angler effort from aerial creel surveys using a generalized linear mixed model (GLMM), following the approach of Askey et al. (2018). When flights occur at non-random times of day, simple scaling of instantaneous counts can over- or under-estimate daily effort. This function fits a negative-binomial GLMM (or user-specified family) to model how angler counts change through the day, then integrates the fitted diurnal curve over the fishing day to obtain a bias-corrected effort estimate.
The default model is the quadratic temporal model from Askey (2018):
count ~ poly(time_col, 2) + (1 | date), fitted via
lme4::glmer.nb(). Variance is propagated via the delta method (default) or
parametric bootstrap (lme4::bootMer()).
Usage
estimate_effort_aerial_glmm(
design,
time_col,
formula = NULL,
family = NULL,
boot = FALSE,
nboot = 500L,
conf_level = 0.95
)Arguments
- design
A
creel_design()object withdesign_type == "aerial"and counts attached viaadd_counts(). The counts data must contain the time-of-flight column specified bytime_col.- time_col
Unquoted name of the numeric column in
design$countsrecording the hour of each aerial overflight (e.g.,time_of_flight).- formula
Optional. A formula for the GLMM, passed directly to
lme4::glmer.nb()orlme4::glmer(). IfNULL(default), the Askey (2018) quadratic formula is used:count ~ poly(time_col, 2) + (1 | date).- family
Optional. A family object or character string specifying the GLM family. If
NULLor"negbin"(default),lme4::glmer.nb()is used. Otherwise,lme4::glmer()is called with the specified family.- boot
Logical. If
TRUE, uselme4::bootMer()for parametric bootstrap confidence intervals instead of the delta method. DefaultFALSE.- nboot
Integer. Number of bootstrap replicates when
boot = TRUE. Default500L.- conf_level
Numeric confidence level for the CI. Default
0.95.
Value
A creel_estimates object with:
estimate: total angler effort integrated over the fishing dayse: standard error (delta method or bootstrap SD)se_between: same asse(fixed-effect SE component)se_within: alwaysNA_real_— no Rasmussen within-day decomposition is performed for GLMM estimatesci_lower,ci_upper: confidence interval boundsn: number of count observations used to fit the modelmethod:"aerial_glmm_total"
References
Askey, P.J., et al. (2018). Correcting for non-random flight timing in aerial creel surveys using a generalized linear mixed model. North American Journal of Fisheries Management, 38, 1204-1215. doi:10.1002/nafm.10010
Examples
if (FALSE) { # \dontrun{
data(example_aerial_glmm_counts)
aerial_cal <- unique(example_aerial_glmm_counts[, c("date", "day_type")])
aerial_cal <- aerial_cal[order(aerial_cal$date), ]
design <- creel_design(
aerial_cal,
date = date,
strata = day_type,
survey_type = "aerial",
h_open = 14
)
design <- add_counts(design, example_aerial_glmm_counts)
# Default Askey quadratic model with delta-method SE
result <- estimate_effort_aerial_glmm(design, time_col = time_of_flight)
print(result)
# Bootstrap CIs (slower)
result_boot <- estimate_effort_aerial_glmm(
design,
time_col = time_of_flight,
boot = TRUE,
nboot = 100L
)
print(result_boot)
} # }