Skip to contents

Sums the stratum estimates (site type x quarter x segment) over the groups not in by, with variances added over strata (strata are sampled independently; segments within a site type and quarter share the visits, so sums over segments are approximate).

Usage

catch_by(x, by = NULL, fishery = NULL, level = 0.95)

Arguments

x

A cas_estimate or a cas_survey.

by

Grouping columns among "segment", "site_type", "quarter"; NULL for species totals.

fishery

Optional cas_fishery to add the true catch (true, rel_error, covered).

level

Confidence level.

Value

A data frame with year, the groups, species, estimate, se, cv, lower, upper (kg), and the truth if fishery is given.