R/run_strat.R
strat_means.Rd
This function is primarily designed for use within run_strat()
. It first calculates
statistics at the stratum level and then computes broader summaries like total abundance.
strat_means(
data = NULL,
metric = NULL,
strat_groups = NULL,
survey_groups = NULL,
confidence = 95
)
A data.table
with all grouping variables in stacked format. Must include
strat_area
and tow_area
for scaling values.
Name of the variable in data.table
to summarize (e.g., "number"
, "mass"
).
Grouping variables for fine-scale stratum-level means.
Must include "strat"
and "strat_area"
.
Example: c("year", "species", "shiptrip", "NAFOdiv", "strat", "strat_area", "age")
Grouping variables for large-scale summary calculations
Example: c("year", "species")
Confidence limit percentage (e.g., 95 for 95% CI).
A data.table
containing stratified estimates of abundance.