# NOT RUN {
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))
# }
Run the code above in your browser using DataLab