accessors: Accessor functions for FLSAM

accessorsR Documentation

Accessor functions for FLSAM

Description

Returns results from the FLSAM asessment model

Usage

catchabilities(object)
power.law.exps(object)

obs.var(object)

ssb(object)
tsb(object)

n(object)
rec(object)

f(object)
fbar(object)

catch(object)

Arguments

object

An FLSAM or FLSAMs :object.

Details

Extracting many of the fitted values directly from the parameter slot of an FLSAM object can lead to difficulties in interpretation, due to the binding of parameters (i.e. fitting one parameter to multiple time series) and the fitting of parameters in log-space. These accessor functions provide easy access to these key results, correcting for these issues and providing both estimates of the parameter concerned and the associated confidence intervals.

The following accessor functions are currently supported:

  • catchabilities - linear proportionality parameter relating the observations (e.g. survey indices) to the modelled values (e.g. numbers at age, SSB)

  • power.law.exps in cases where the relationship between the observations and the modelled values is modelled as being a power-law, this function returns the associated coefficients

  • obs.var - the variances estimated internally within the model that are associated with each individual time series. These variances are mathematically analogous to weighting factors

  • ssb - the spawning stock biomass estimated internally within the model

  • tsb - the total stock biomass estimated internally within the model

  • n - the estimate number of individuals at a given age in a given year

  • rec - the estimated recruitment of fish at the youngest modelled age

  • f - the fishing mortality on a given age in a given year

  • fbar - the mean fishing mortality in a given year

  • catch - the (modelled) total catch of fish (in weight) in a given year

Accessor functions are provided for both FLSAM and FLSAMs objects.

Value

The accessor functions return a data.frame whoose structure is dependent on the function called. Generally the data.frame can be considered to have two parts.

The first part is the meta-data part, which gives context-specific information about the contents of each row. Possible columns returned are

  • name - In cases where an FLSAMs object is supplied, the name of the corresponding object is stored in this column. There is no requirement that FLSAMs object have unique names - however, extracting and processing data can be challenging if they do not!

  • fleet - The name of the fleet that the parameter corresponds to

  • year - The year that the parameter corresponds to

  • age - The age that the parameter corresponds to. In the case of biomass (or other non-age-based observations), age is NA.

The second part of the data-frame is common and constant to all accessor functions, and contains the actual parameters and their uncertainties

  • value - The value of the parameter

  • CV - The coefficient of variation for the parameter estimate i.e. standard deviation of the log-transformed parameter

  • ubnd - The upper bound (95% confidence limit) for the parameter estimate

  • lbnd - The lower bound (95% confidence limit) for the parameter estimate

Note

The ssb, tsb, fbar and catch accessor functions read the values estimated directly within the model. However, the estimation of these parameters is dependent on the calculation of the hessian: when the FLSAM control object has the nohess option set to true, however, the hessian will not be estimated. In these cases, these function calls will fail with a warning. If you still want to calculate the values in this case, update the corresponding stock object: see the examples.

Author(s)

Mark R. Payne

See Also

FLSAM, params, coef, coefficients

Examples

#Load data
library(FLSAM)
data(NSH.sam)
#Extract parameter
catchabilities(NSH.sam)
obs.var(NSH.sam)
ssb(NSH.sam)
fbar(NSH.sam)
rec(NSH.sam)
#Power law parameters could be extracted as follows, but this will
#return an error in this case, as there are no power-law exponents in the model
#power.law.exps(NSH.sam) 

#And for FLSAMs
data(HERAS.sams)
ssb(HERAS.sams)
rec(HERAS.sams)
fbar(HERAS.sams)


flr/FLSAM documentation built on April 13, 2024, 1:26 p.m.