
Create a portable Opal assessment object
opal_obj.RdCreates an S3 object before fitting. Configuration, fitted results, and
posterior samples remain ordinary R data. RTMB objectives are cached only
within the current session. Explicit inputs are recommended for custom
stocks; model identifies a bundled parameter configuration when needed.
Arguments
- data
Named model data list.
- parameters
Named initial parameter list, or NULL for bundled defaults.
- map
RTMB map. NULL resolves defaults;
list()explicitly frees all parameters.- random
Names of random-effect parameters.
- bounds
A data frame with
loweranduppercolumns, or a list of numericloweranduppervectors in active RTMB parameter order. UseNULLto derive bounds withget_bounds().- control
Optimiser controls.
- model
Optional bundled configuration name for
get_parameters().- makeadfun_args
Additional portable arguments for
RTMB::MakeADFun().- metadata
Named user metadata.
Details
Use one object throughout the workflow: construct, optionally build, fit,
sample, report, and save. summary() reports the lifecycle stage separately
from fit and MCMC checks. Results live in $fit, $mcmc, $validation, and
$derived; labels live in $provenance$metadata. Use opal_update() to
change configuration rather than assigning directly to scientific fields.
See also
Other assessment workflow:
opal_attach_fit(),
opal_attach_mcmc(),
opal_build(),
opal_check(),
opal_derived(),
opal_example_inputs(),
opal_fit(),
opal_from_fit(),
opal_io,
opal_mcmc(),
opal_posterior(),
opal_project(),
opal_report(),
opal_update()
Examples
inputs <- opaka_quickstart_inputs()
x <- opal_obj(inputs$data, inputs$parameters, inputs$map)
summary(x)
#> <opal_obj> configured
#> Active parameters: NA
#> Fit check: not run | MCMC check: not run