Retrieve and format initial parameter estimates

initial_estimates(.mod, flag_fixed = FALSE)

Arguments

.mod

a bbr model object

flag_fixed

Logical (TRUE/FALSE). If TRUE, return which parameters are fixed.

Details

NA values indicate that they were not specified in the control stream file. This is true for THETA bounds and whether a given parameter is FIXED or not.

If you would like the OMEGA or SIGMA records formatted as full matrices, they are stored as attributes:

 initial_est <- initial_estimates(.mod)
 attr(initial_est, "omega_mat")
 attr(initial_est, "sigma_mat")

Examples

mod1 <- read_model(
  system.file("model", "nonmem", "basic", "1", package = "bbr")
)

initial_estimates(mod1)
#> # A tibble: 8 × 6
#>   parameter_names  init lower_bound upper_bound record_type record_number
#>   <chr>           <dbl>       <dbl>       <dbl> <chr>               <int>
#> 1 THETA(1)         2              0          NA theta                   1
#> 2 THETA(2)         3              0          NA theta                   1
#> 3 THETA(3)        10              0          NA theta                   1
#> 4 THETA(4)         0.02          NA          NA theta                   1
#> 5 THETA(5)         1             NA          NA theta                   1
#> 6 OMEGA(1,1)       0.05          NA          NA omega                   1
#> 7 OMEGA(2,2)       0.2           NA          NA omega                   1
#> 8 SIGMA(1,1)       1             NA          NA sigma                   1