Skip to contents

Add optimizer bounds

Usage

sbt_add_bounds(fit, bounds)

Arguments

fit

An sbt_fit() object.

bounds

A bounds data frame or list containing lower and upper.

Value

The updated sbt_fit, with aligned lower and upper bounds stored in fit$bounds. Any existing optimisation or posterior is invalidated.

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