# 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,digits=5,title="negLLM example") #optimum solution
answer <- plotspmmod(bestSP$estimate,indat=fish,
plotprod=TRUE,maxy=3.4)
# }
Run the code above in your browser using DataLab