HNC_expand_unkGSI: Estimates the composition of ascensions and incorporates...

HNC_expand_unkGSIR Documentation

Estimates the composition of ascensions and incorporates uncertainty in GSI assignments

Description

Estimates the composition of ascensions and incorporates uncertainty in GSI assignments

Usage

HNC_expand_unkGSI(
  trap,
  stratAssign_comp,
  boots = 2000,
  pbt_var,
  timestep_var,
  physTag_var,
  adclip_var,
  sampID,
  tagRates,
  H_vars,
  HNC_vars,
  W_vars,
  wc_binom,
  GSI_draws,
  n_point = 100,
  GSI_var,
  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

GSI_draws

a tibble with the first column individuals names, the rest GSI values fro draws from the posterior (each column a draw). Used in order.

n_point

number of iterations in the bootstrap loop (only resampling GSI values) for calculating point estimates

GSI_var

the column name in trap that has the GSI values.

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.