
Estimate design-weighted mean length from a creel length distribution
Source:R/creel-estimates-length.R
est_mean_length.Rdest_mean_length() computes the pressure-weighted mean fish length from a
est_length_distribution() object using the ratio estimator
\(\bar{L} = \sum_h L_h \hat{N}_h / \sum_h \hat{N}_h\), with
delta-method standard error.
Arguments
- ld
A
creel_length_distributionobject fromest_length_distribution().- conf_level
Numeric confidence level for confidence intervals. Defaults to the level stored in
ld(usually0.95).
Value
A data.frame with class c("creel_mean_length", "data.frame") and
columns: grouping columns (if any), mean_length, mean_length_se,
mean_length_ci_lower, mean_length_ci_upper. Rows where the total
estimated fish is zero or negative return NA for all numeric columns
with a warning.
Details
Bin midpoints \(L_h = (\text{bin\_lower} + \text{bin\_upper}) / 2\) serve as representative lengths. Mean length is the ratio of total length-weighted count to total count: $$\bar{L} = \frac{\sum_h L_h \hat{N}_h}{\hat{N}}$$
Variance is propagated via the delta method for a ratio estimator, using the bins' full covariance matrix \(\Sigma\): $$\widehat{\text{Var}}(\bar{L}) = \frac{1}{\hat{N}^2} w' \Sigma w, \quad w_h = L_h - \bar{L}$$ Earlier versions treated the cross-bin covariances as zero, which under-estimated the standard error. If \(\Sigma\) is unavailable the independence form is used and a warning says so.
See also
Other "Estimation":
compare_cpue_estimators(),
est_age_distribution(),
est_biomass(),
est_compliance(),
est_effort_camera_mi(),
est_length_distribution(),
est_mean_age(),
estimate_catch_rate(),
estimate_effort(),
estimate_effort_aerial_glmm(),
estimate_harvest_rate(),
estimate_release_rate(),
estimate_total_catch(),
estimate_total_harvest(),
estimate_total_release()
Examples
data(example_calendar)
data(example_interviews)
data(example_lengths)
data(example_catch)
design <- creel_design(example_calendar, date = date, strata = day_type)
design <- add_interviews(design, example_interviews,
catch = catch_total, effort = hours_fished, harvest = catch_kept,
trip_status = trip_status
)
#> Warning: ! No `n_anglers` provided — assuming 1 angler per interview.
#> ℹ Pass `n_anglers = <column>` to use actual party sizes for angler-hour
#> normalization.
#> ℹ If the interviews really are one angler each, pass `n_anglers = 1` to state
#> that and silence this warning.
#> ℹ Added 22 interviews: 17 complete (77%), 5 incomplete (23%)
# Species catch is required to group by species: the totals are scaled onto
# the reported catch, and only this table records it per species.
design <- add_catch(design, example_catch,
catch_uid = interview_id,
interview_uid = interview_id,
species = species,
count = count,
catch_type = catch_type
)
design <- add_lengths(design, example_lengths,
length_uid = interview_id,
interview_uid = interview_id,
species = species,
length = length,
length_type = length_type,
count = count,
release_format = "binned"
)
ld <- est_length_distribution(design, by = species, bin_width = 25)
#> Warning: ! Length totals were rescaled onto the reported catch.
#> ℹ Measured fish (weighted): 37; reported: 93 -- a factor of 2.51.
#> ℹ estimate, se and the confidence bounds describe the REPORTED catch, estimated
#> from the measured subsample. Shares (percent) are unaffected.
est_mean_length(ld)
#> species mean_length mean_length_se mean_length_ci_lower mean_length_ci_upper
#> 1 bass 300.9615 11.97037 277.5000 324.4230
#> 2 panfish 196.5909 9.12372 178.7087 214.4731
#> 3 walleye 431.7308 14.13632 404.0241 459.4374