altnegLL | R Documentation |
altnegLL calculates negLLM using the simplification from Haddon (2011) using the ssq calculated within the function spm
altnegLL(inp, indat)
inp |
a vector of model parameters (r,K,Binit) |
indat |
a matrix with at least columns 'year', 'catch', and 'cpue' |
a single value, the negative log-likelihood
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.