aspmPENLL: aspmPENLL penalized negative log-likelihood for the ASPM

View source: R/aspm.r

aspmPENLLR Documentation

aspmPENLL penalized negative log-likelihood for the ASPM

Description

aspmPENLL is a penalized negative log-likelihood for normally distributed data, set-up for use with the ASPM model fitting. It would be necessary to log-transform the original data to convert log-normal data to normal. The assumption is made that there will be three parameters, the unfished R0, the initial depletion in the first year. For use with initially depleted stocks

Usage

aspmPENLL(par, infish, inglb, inprops)

Arguments

par

a vector of two numbers the hypothesized inR0 and the initial depletion in the first year. (in that order).

infish

the fish data.frame from readdata or built in dataset

inglb

the glb data.frame from readdata or built in dataset

inprops

the props data.frame from readdata or built in dataset

Value

a scalar that is the negative log-likelihood using normal random errors

Examples

## Not run: 
data(dataspm)
fish <- dataspm$fish
glb <- dataspm$glb
props <- dataspm$props
pars <- c(13.53,0.190667,0.95) # assume the stock is known to have been 
aspmLL(pars,infish=fish,inglb=glb,inprops=props)   # initially depleted
aspmPENLL(pars,infish=fish,inglb=glb,inprops=props) # penalty approaching 1 
pars <- c(13.53,0.190667,0.85) # depletion away from 1.0 has almost no effect 
aspmLL(pars,infish=fish,inglb=glb,inprops=props) 
aspmPENLL(pars,infish=fish,inglb=glb,inprops=props)

## End(Not run)

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