Skip to contents

Add an RTMB parameter map

Usage

sbt_add_map(fit, map = NULL)

Arguments

fit

An sbt_fit() object.

map

Optional named list of factor maps. If omitted, the package default from get_map() is resolved from the fit parameters.

Value

The updated sbt_fit, with the parameter map stored in fit$map. Downstream fitted state is invalidated if the map changes.

Examples

fit <- sbt_fit(sbt_example_data())
fit <- sbt_add_map(fit)
names(fit$map)
#>  [1] "par_log_psi"          "par_mc"               "par_log_h"           
#>  [4] "par_log_sigma_r"      "par_log_cpue_sigma"   "par_log_cpue_omega"  
#>  [7] "par_cpue_creep"       "par_log_aerial_tau"   "par_log_aerial_sel"  
#> [10] "par_log_troll_tau"    "par_log_gt_q"         "par_log_hsp_q"       
#> [13] "pop_od"               "hsp_od"               "gt_od"               
#> [16] "par_log_tag_H_factor" "par_log_af_alpha"     "par_log_lf_alpha"    
#> [19] "par_sel_rho_y"        "par_sel_rho_a"        "par_log_sel_sigma"