simpspm | R Documentation |
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.
simpspm(par, indat, schaefer = TRUE)
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 |
a vector of nyrs of the predicted CPUE
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.