strat_means: Calculate stratified means, variances and confidence...

Description Usage Arguments Details

View source: R/run_strat.R

Description

Calculate stratified means, variances and confidence intervals across groups

Usage

1
2
3
4
5
6
7
strat_means(
  data = NULL,
  metric = NULL,
  strat_groups = NULL,
  survey_groups = NULL,
  confidence = 95
)

Arguments

data

Expects data.table with all grouping variables in stacked format (must include strat_area and tow_area for scaling values)

metric

Variable in specificed data.table. e.g. "number", "mass"

strat_groups

Grouping variables for calculations of the fine-scale strat-level means (strat and strat_area are required). e.g. c("year", "species", "shiptrip", "NAFOdiv", "strat", "strat_area","age")

survey_groups

Grouping variables for large-scale summary calculations. e.g. ("year","species")

confidence

Percent for confidence limits

Details

Function was mainly created for use in the run_strat function. It first calculates strat-level statistics and then the larger-scale statistics like total abundance


SimSurvey documentation built on Jan. 16, 2021, 5:31 p.m.