strat_mean: Calculate stratified mean biomass and abundance

strat_meanR Documentation

Calculate stratified mean biomass and abundance

Description

Calculates the stratified mean biomass and abundance. Also calculates the associated variance and standard error.

Usage

strat_mean(
  prepData,
  groupDescription = "SVSPP",
  filterByGroup = "all",
  mergesexFlag = T,
  seasonFlag,
  areaDescription,
  poststratFlag
)

Arguments

prepData

Data table. NEFSC survey data generated by get_survdat_data and modified by strat_prep.

groupDescription

Character string. Column of prepData which contains the groups (e.g. "SVSPP") on which the means are based.

filterByGroup

Character or numeric vector. Set of groups to subset from groupDescription. The default "all" will calculate means for all groups.

mergesexFlag

Boolean. Logical value to merge sexed species such as dogfish.

seasonFlag

Boolean. Logical value to merge seasons (F) or keep them separate (T).

areaDescription

Character String. Column name from areaPolygon that contains the strata designations.

poststratFlag

Boolean. Logical value indicating whether the original strata design was used or not. Changes the calculation for the variance for post-stratified uses of survey data.

Value

Returns a table with stratified mean biomass and abundance for each group indicated by the groupDescription. In addition, the variance and standard error for both means are provided.

See Also

Other survdat: calc_stratified_mean(), calc_swept_area(), get_area(), get_length_weight(), get_survdat_clam_data(), get_survdat_data(), get_survdat_scallop_data(), post_strat(), swept_area()

Examples

## Not run: 
# Called internally

## End(Not run)


andybeet/survdat documentation built on Nov. 9, 2023, 10:11 a.m.