altnegLL {MQMF}R Documentation

altnegLL calculate the Normal negative log-likelihood

Description

altnegLL calculates negLLM using the simplification from Haddon (2011) using the ssq calculated within the function spm

Usage

altnegLL(inp, indat)

Arguments

inp

a vector of model parameters (r,K,Binit)

indat

a matrix with at least columns 'year', 'catch', and 'cpue'

Value

a single value, the negative log-likelihood

Examples

 data(dataspm)
 pars <- log(c(r=0.2,K=6000,Binit=2800,sigma=0.2))
 ans <- fitSPM(pars,fish=dataspm,schaefer=TRUE,maxiter=1000)
 outfit(ans)
 altnegLL(ans$estimate,dataspm) # should be -12.12879

[Package MQMF version 0.1.5 Index]