Skip to contents

Applies an observed age-length key to the length samples of each year, \(\hat n_{a,y} = \sum_l n_{l,y} P(a \mid l)\). Length bins without aged fish cannot be assigned an age and are dropped (their share is reported). With raise = "catch" the numbers are raised so that their weight (\(W = a L^b\), g) equals the observed catch of the source (t).

Usage

caa_obs(
  data,
  species,
  source,
  iter = 1,
  years = NULL,
  alk = c("pooled", "annual"),
  raise = c("none", "catch")
)

Arguments

data

a floss_data (or a list with a bio and lfd data frame, e.g. from read_dataset()).

species

species name.

source

one fleet (or "survey").

iter

iteration(s); several are pooled.

years

years to pool; default all.

alk

"pooled" (one key over all years of the selection) or "annual" (a key per year).

raise

"none" (sample numbers) or "catch".

Value

a data frame with species, iter, year, source, age, n, and attribute unassigned (share of measured fish per year in length bins without aged fish).