Function to compute proportions-at-age for each length using multinomial approach From Chris Legault (which was based on code from Mike Bednarski)

get_multinomial_props(
  agedata,
  small.len = 1,
  big.len,
  small.age,
  big.age,
  ref.age,
  printConvergence = F
)

Arguments

small.len

Numeric scalar. Smallest length to be estimated (Usually based on observations for the year)

big.len

Numeric scalar. Largest length to be estimated (Usually based on observations for the year)

small.age

Numeric scalar.

big.age

Numeric scalar. Maximum age needed in the key (Usually based on observations for the year)

ref.age

Numeric scalar. Used in the GLM as the age against which all the other ages are estimated. It is typically the most abundant age.

ageData

Data frame

Value

List

converg

Indicating if the fit converged.

pred.p

Matrix. Age-length Key. Rows are lengths, columns ages