params_grad_var: this calculates the gradient with respect to the params being...

Description Usage Arguments

View source: R/gradient_negllh_var.R

Description

this is not intended for direct user-level use, but it is exported to allow the user to optionally specify it as a argument to pass to optim when using MLEwrapper. I recommend using it unless you have a specific reason not to.

Usage

1
params_grad_var(params, nPBT, nGSI, ohnc, t, 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)

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


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