Generates specific parameter tables by filtering and using pmtables

This function:

  1. Filters to columns needed for specific parameter tables

  2. Panels by "type"

  3. Makes "abb", "greek", "desc" blank for "full", "fixed", "structural", "covariate" parameter tables. Makes "abb" and "greek" blank for "random"

  4. Attaches notes

  5. Rename "value" to "Estimate" and "shrinkage" to "Shrinkage (\%)", if applicable

If these pmtable settings do not work for your parameter table, you can overwrite them afterwards using desired pmtables commands.

make_pmtable(.df, .pmtype = "full", .width = 1)

Arguments

.df

parameter data set output from pmparams::format_param_table or pmparams::format_boot_table.

.pmtype

parameter table type. Options include: full (all rows in .df retained in pmtable), fixed (all rows with type = "Struct" or "effect"), structural (all rows with type = "Struct"), covariate (all rows with type = "effect"), random (all rows with greek = "Omega" or type = "Resid"). Defaults to "full".

.width

notes width. Defaults to 1.

Examples


#Using output from `format_param_table` (defineOut),
paramEst <- utils::read.csv(system.file("model/nonmem/param_est.csv", package = "pmparams"))
paramKey <-  system.file("model/nonmem/pk-parameter-key-new.yaml", package = "pmparams")
defineOut <- define_param_table(.estimates = paramEst, .key = paramKey, .ci = 95, .zscore = NULL)
#> [1] "Parameter table yaml path provided: /data/pmparams/inst/model/nonmem/pk-parameter-key-new.yaml"
data <- format_param_table(.df = defineOut)

#To make random effects table:

make_pmtable(.df = data, .pmtype = "random")
#> # A tibble: 7 × 6
#>   type                                  abb     greek value `95\\% CI` shrinkage
#>   <chr>                                 <chr>   <glu> <glu> <chr>      <chr>    
#> 1 Interindividual variance parameters   IIV-KA  $\Om… 0.22… 0.117, 0.… 17.9     
#> 2 Interindividual variance parameters   IIV-V2… $\Om… 0.08… 0.0634, 0… 6.02     
#> 3 Interindividual variance parameters   IIV-CL… $\Om… 0.16… 0.130, 0.… 0.587    
#> 4 Interindividual covariance parameters V2/F-KA $\Om… 0.06… 0.0299, 0… -        
#> 5 Interindividual covariance parameters CL/F-KA $\Om… 0.13… 0.0878, 0… -        
#> 6 Interindividual covariance parameters CL/F-V… $\Om… 0.07… 0.0528, 0… -        
#> 7 Residual variance                     Propor… $\Si… 0.03… 0.0375, 0… 5.28