simIndices: Method simIndices

simIndicesR Documentation

Method simIndices

Description

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.

Usage

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)

Arguments

object

An FLQuant with catch information (for recruits and adults).

g

A vector with information on instantaneous rate of biomass decrease, g = M - G, for recruits (rec) and adults (adult).

inits

An FLPar with initial values.

findicesB

A vector with period of the year of the different indices in total biomass. Optional parameter, if not set, then the survey is assumed to occur at the beggining of the year.

findicesP

A vector with period of the year of the different indices of proportion of recruits in mass. Optional parameter, if not set, then the survey is assumed to occur at the beggining of the year.

Value

A list with indices in biomass (Btot) and indices in proportion of recruits (Prec), both elements of the list are FLIndices.

Methods

Methods exist for various calculations based on the output class (FLPar). For details: ?FLPar.

Author(s)

Leire Ibaibarriaga & Sonia Sanchez.

See Also

bbm, FLQuant, FLQuants, FLIndices, bbmControl, FLPar, bbmFLPar

Examples


# 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,]))


flr/bbm documentation built on Sept. 6, 2022, 8:56 p.m.