HNC_expand: Estimates the composition of ascensions and treats GSI as...

View source: R/wrappers_HNC_expand.R

HNC_expandR Documentation

Estimates the composition of ascensions and treats GSI as known

Description

Estimates the composition of ascensions and treats GSI as known

Usage

HNC_expand(
  trap,
  stratAssign_comp,
  boots = 2000,
  pbt_var,
  timestep_var,
  physTag_var,
  adclip_var,
  tagRates,
  H_vars,
  HNC_vars,
  W_vars,
  wc_binom,
  method = c("Account", "MLE")
)

Arguments

trap

a tibble with data about the trapped fish

stratAssign_comp

tibble with sWeek, stratum showing what stratum each sWeek corresponds to for composition estimation using the trap data

boots

The number of bootstap iterations to run

pbt_var

The column name of the PBT group variable (tag rates are defined for these groups)

timestep_var

The column name of the timestep variable (corresponds to sWeek in stratAssign_comp)

physTag_var

The column name of a logical variable defining whether or not a sample had a physical tag (e.g. CWT) identifying it as hatchery origin with 100% certainty

adclip_var

The column name of the variable defining ad-fin status (values are "AD" or "AI")

tagRates

A tibble with two columns, the first listing PBT groups and the second giving their tag rates

H_vars

A character vector defining one or two variables to estimate composition of the H group

HNC_vars

A character vector defining one or two variables to estimate composition of the HNC group. If method is "MLE" and two variables are defined, the first must be the pbt_var.

W_vars

A character vector defining one or two variables to estimate composition of the W group

wc_binom

The output of expand_wc_binom_night

method

Either "Account" to use the accounting style estimator or "MLE" to use the maximum likelihood estimator


delomast/escapeLGD documentation built on June 9, 2025, 10:52 p.m.