Add optimizer bounds
Arguments
- fit
An
sbt_fit()object.- bounds
A bounds data frame or list containing
lowerandupper.
Value
The updated sbt_fit, with aligned lower and upper bounds stored in
fit$bounds. Any existing optimisation or posterior is invalidated.
See also
Other fit workflow:
check_mcmc(),
check_mle(),
sbt_add_map(),
sbt_add_msy(),
sbt_add_parameters(),
sbt_add_priors(),
sbt_build_object(),
sbt_example_fit(),
sbt_fit(),
sbt_fit_compatibility(),
sbt_fit_io,
sbt_fit_rebuild(),
sbt_fit_report(),
sbt_fit_validate(),
sbt_fit_validation(),
sbt_mcmc(),
sbt_obj(),
sbt_optimise()
Examples
fit <- sbt_example_fit(rebuild = FALSE)
#> Warning: Dependency versions differ: RTMBdist, TMB
fit <- sbt_add_bounds(fit, fit$bounds)
head(data.frame(lower = fit$bounds$lower, upper = fit$bounds$upper))
#> lower upper
#> par_log_B0 11.512925 20.7232658
#> par_log_m10 -3.540459 -1.5606477
#> par_log_m30 -1.609438 -0.3566749
#> par_log_cpue_q -9.210340 9.2103404
#> par_log_sel_1[1] -Inf Inf
#> par_log_sel_1[2] -Inf Inf
