aspmSSQ: aspmSSQ sum-of-squared residuals for the ASPM.

View source: R/aspm.r

aspmSSQR Documentation

aspmSSQ sum-of-squared residuals for the ASPM.

Description

aspmLL calculates the sum-of-squared residuals, set-up for use with the ASPM model fitting. It requires the use of functions from datalowSA for fitting of ASPM (see example below). It first identifies which of the CPUE column in 'fishery' are numeric (not NA) and then calculates the sum-of-squared residuals after log-transforming both the CPUE and PredCE columns.

Usage

aspmSSQ(par, infish, inglb, inprops)

Arguments

par

a single number that is the hypothesized inR0, which is the only parameter.

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 single value that is the sum-of-squared residuals.

Examples

## Not run: 
data(fishdat)
fish <- fishdat$fish
glb <- fishdat$glb
props <- fishdat$props
pars <- c(14)
aspmSSQ(pars,infish=fish,inglb=glb,inprops=props)
pars <- c(13.75)  # note the presence of the maximum harvest rate of 0.85
dynamics(pars,infish=fish,inglb=glb,inprops=props) # leads to a large increase 
aspmSSQ(pars,infish=fish,inglb=glb,inprops=props) #because of penalty incurred 

## End(Not run)

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