simpspm: simpspm simply calculates the predicted CE for an SPM

View source: R/spm.r

simpspmR Documentation

simpspm simply calculates the predicted CE for an SPM

Description

simpspm calculates the predicted CPUE for an SPM model. It assumes that there is a variable called 'p' in the global environment and this 'p' variable determines the asymmetry of the production curve. If p = 1.0 then the SPM is the Schaefer model, if it is 1e-8 it approximates the Fox model.

Usage

simpspm(par, indat, schaefer = TRUE)

Arguments

par

the parameters of the SPM = r, K, and Binit

indat

the data which needs to include year, catch, and CPUE

schaefer

a logical value determining whether the spm is to be a simple Schaefer model (p=1) or approximately a Fox model (p=1e-08). The default is TRUE

Value

a vector of nyrs of the predicted CPUE

Examples

## Not run: 
data(dataspm)
fish <- dataspm$fish
fish
colnames(fish) <- tolower(colnames(fish)) 
pars <- c(r=0.242,K=5170,Binit=2840) 
predCE <- simpspm(pars,fish) 
cbind(fish[,"year"],fish[,"cpue"],predCE)

## End(Not run)

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