simIndices | R Documentation |
Function to generate indices of total biomass and of proportion of recruits in biomass, given information on catches at age, instantaneous rate of biomass decrease (g = M - G ) and values for the bbm parameters.
simIndices(object, ...) ## S4 method for signature 'FLQuant' simIndices(object, g, inits, findicesB = NULL, findicesP = NULL) ## S4 method for signature 'FLStock' simIndices(object, g, inits, findicesB = NULL, findicesP = NULL)
object |
An |
g |
A |
inits |
An |
findicesB |
A |
findicesP |
A |
A list with indices in biomass (Btot) and indices in proportion of recruits (Prec), both elements of the list are FLIndices.
Methods exist for various calculations based on the output class (FLPar
). For details: ?FLPar
.
Leire Ibaibarriaga & Sonia Sanchez.
bbm, FLQuant, FLQuants, FLIndices, bbmControl, FLPar, bbmFLPar
# Load data data(ane) # Case: object='FLQuant' indices1 <- simIndices( catch.ane, g=control.ane@g, inits=inits.ane, findicesB=unlist(lapply( indicesB.ane, function(x) mean(range(x)[c('startf','endf')]))), findicesP=unlist(lapply( indicesP.ane, function(x) mean(range(x)[c('startf','endf')]))) ) class(indices1) slotNames(indices1) # Case: object='FLStock' stock <- FLStock(catch.n=catch.ane, catch.wt=catch.ane*0+1) units(stock@catch.wt) <- '' stock@catch <- quantSums(stock@catch.n*stock@catch.wt) indices2 <- simIndices( stock, g=control.ane@g, inits=inits.ane, findicesB=unlist(lapply( indicesB.ane, function(x) mean(range(x)[c('startf','endf')]))), findicesP=unlist(lapply( indicesP.ane, function(x) mean(range(x)[c('startf','endf')]))) ) class(indices2) # Run assessment with the alternative indices run <- bbm(catch.ane, indicesB=indicesB.ane, indicesP=indicesP.ane, control=control.ane, inits=inits.ane) run1 <- bbm(catch.ane, indicesB=indices1$Btot, indicesP=indices1$Prec, control=control.ane, inits=inits.ane) run2 <- bbm(catch.ane, indicesB=indices2$Btot, indicesP=indices2$Prec, control=control.ane, inits=inits.ane) # Plot assessed populations plot( FLQuants( bc=quantSums(run@stock.bio)[,,,1,], alt1=quantSums(run1@stock.bio)[,,,1,], alt2=quantSums(run2@stock.bio)[,,,1,]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.