altnegLL: altnegLL calculate the normal negative log-likelihood

View source: R/spm.r

altnegLLR Documentation

altnegLL calculate the normal negative log-likelihood

Description

altnegLL calculates negLL 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

## Not run: 
data(dataspm)
fish <- dataspm$fish
head(fish,15)
colnames(fish) <- tolower(colnames(fish)) 
pars <- c(r=0.242,K=5170,Binit=2840) 
altnegLL(pars,fish)  # should be -12.1249

## End(Not run)

haddonm/datalowSA documentation built on Nov. 5, 2023, 6:40 p.m.