spmCE {MQMF}R Documentation

spmCE - calculates the dynamics for multiple cpue time-series

Description

spmCE calculates the full dynamics using a Schaefer of Fox model and is used instead of spm when there are multiple index vectors. The outputs include predicted Biomass, year, catch, cpue, predicted cpue, contributions to q, ssq, and depletion levels. Generally it would be more sensible to use simpspmM when fitting a Schaefer or Fox model as that function is designed to generate only the predicted cpue vectors required by the function negLLM, nevertheless, the example shows how it could be used.

Usage

spmCE(
  inp,
  indat,
  schaefer = TRUE,
  year = "year",
  cats = "catch",
  index = "cpue"
)

Arguments

inp

a vector of 2 or 3 model parameters (r,K) or (r,K,Binit), you would use the latter if it was suspected that the fishery data started after some initial depletion had occurred. In addition, there should then be the same number of sigma values as there are cpue time-series. For two cpue series with an initial depletion we would expect to have r, K, Binit, sigma1 and sigma2

indat

a matrix with at least columns '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

year

column name within indat containing the years, default='year'

cats

column name within indat containing the catches, default='catch'

index

column name within indat containing the prefix for cpue, default='cpue'

Value

a list of five objects; outmat the matrix with the dynamics results, q catchability, msy the maximum sustainable yield, the parameter values, and sumout, which contains r, K, B0, msy, p, q, Depl, FinalB, and InitDepl

Examples

 data(twoindex)
 fish <- as.matrix(twoindex)
 pars <- log(c(0.04,155000,0.4,0.3))
 bestSP <- nlm(f=negLLM,p=pars,funk=simpspmM,indat=fish,
             schaefer=TRUE,logobs=log(fish[,c("cpue1","cpue2")]),
             steptol=1e-06,harvpen=TRUE)
 outfit(bestSP)  # best fitting estimates
 getMSY(exp(bestSP$estimate))

[Package MQMF version 0.1.5 Index]