flex_negllh_var: calculate the negative log-likelihood with PBT, GSI...

Description Usage Arguments Details

View source: R/flex_negllh_var.R

Description

more here...

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
flex_negllh_var(
  params,
  nPBT,
  nGSI,
  ohnc,
  t,
  utGSI,
  ohnc_gsi,
  utVar,
  ohnc_var,
  nCat
)

Arguments

params

vector of paramaters to optimize

nPBT

number of pbt groups to estimate

nGSI

number of GSI groups to estimate

ohnc

vector of number of observed (PBT assigned) hatchery fish in each PBT and GSI group (gsi groups should be 0)

t

vector of tag rates for all PBT and GSI groups (gsi groups should be 0)

utGSI

vector of number of un-PBT assigned fish in each GSI group

ohnc_gsi

matrix of counts of fish GSI assigned to various groups

utVar

matrix of numbers of un-PBT assigned fish in each GSI group (row) x category of the variable (column)

ohnc_var

matrix of counts of PBT-assigned fish in each category (rows are PBT groups)

nCat

the numbers of categories in the variable

Details

I expect that most users interested in MLE of composition will be best served by using MLEwrapper, which preps data, calls this function, and then returns the results in a nice format. This function calculates the likelihood for a given set of parameters, and may be useful to users who want MLE but want more control over how the data is used and/or the optimization procedure. This calculates a simplified version of the negative log-likelihood (constants removed) for computational efficiency.


delomast/fishCompTools documentation built on Jan. 11, 2021, 1:51 a.m.