status | R Documentation |
These functions can be used to extract output values following a model fit.
The status
function will look for and return model elements current_biomass
, current_depletion
and current_harvest_rate
.
The refpoints
function will look for and return model elements msy
, depletion_at_msy
, biomass_at_msy
and harvest_rate_at_msy
.
These are returned by the default bdm model, but the function will also work if a user-specified model contains potentially different elements in the 'generated quantities {}'
block of the code, as long as they are specified in the pars
argument.
status(object, ...) ## S4 method for signature 'bdm' status(object, pars) refpoints(object, ...) ## S4 method for signature 'bdm' refpoints(object, pars)
object |
a |
... |
additional arguments to the generic function |
pars |
a |
Returns a list
containing the specified elements, each of which is a vector equal to the number of posterior samples.
data(albio) dat <- bdmData(harvest = albio$catch, index = albio$cpue, time = rownames(albio)) ## Not run: # initialize and fit default model mdl <- bdm() mdl <- compiler(mdl) mdl <- sampler(mdl, dat) # get median status estimates lapply(status(mdl), median) # get median reference point estimates lapply(refpoints(mdl), median) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.