Ceftolozane-Tazobactam NONMEM Model Diagnostic

Author

Paulina Okunska

Published

February 21, 2026

1 Set-up Environment

1.0.1 Script Parameters

Code
set.seed(5238974)
model_run <- 102
spec_name <- "lookup.yml"
dat.name <- "RawData.csv"                   
thisScript <- "model_diagnostic_2cmt.qmd"

etas <- c("ETA-V1C", "ETA-CLC", "ETA-V2C", "ETA-QC", "ETA-V1T", "ETA-CLT", "ETA-V2T", "ETA-QT")    
etas_est  <- c("ETA2//ETA-CLC", "ETA5//ETA-V1T", "ETA6//ETA-CLT")

#Directories
spec_dir <- here::here("data/derived")
derDir <- here::here("data/derived")
model_dir <- here::here("model/nonmem/basic")
scripts <- here::here("scripts/Model_Development")
tab_dir <- here::here("deliv/tables/Diagnostic")

outDir <- paste0("model/nonmem/basic/", model_run)
options(scipen = 999)

##Continuous Covariates
contcov_labels <-c("BW//Body Weight (kg)", "AGE//Age (years)", 
                   "SOFA//Sequential Organ Failure Assessment", "PCT//Procalcitonin (ng/mL)", 
                   "ELWI//Extravascular lung water index", "CI//Cardiac Index (L/min/m2)", 
                   "CRE//Creatinine Concentration (mg/dL)", "ALB//Albumin Concentration (g/dL)", 
                   "PROTEIN//Protein Concentration  (mg/mL)") #"HEIGHT//Height (cm)",
contcov_vars <- c("BW", "AGE", "SOFA", "PCT", "ELWI", "CI", "CRE", "ALB", "PROTEIN") #"HEIGHT",

##Categorical Covariates
catcov_labels <- c( "SEX_f//Gender", "ECMO_f//ExtraCorporeal Membrane Oxygenation", "CRRT_f//Continuous Renal Replacement Therapy") 
catcov_vars <- c("SEX_f", "ECMO_f", "CRRT_f") 
Code
options(bbr.bbi_exe_path = "C:/Users/pauoku/AppData/Roaming/bbi/bbi.exe")

bbr::use_bbi()
Installing bbi on a windows system
────────────────────────────────────────────────────────────────────────────────
 - Installed Version: 3.4.0  - Current release: 3.4.0
Code
bbi_init(.dir = model_dir,             # the directory to create the bbi.yaml in
         .nonmem_dir = "C:/",          # location of NONMEM installation
         .nonmem_version = "nm75g64",  # default NONMEM version to use
.bbi_args = list(
     mpi_exec_path ="C:/nm74g64/run/psexec",
      parafile = "C:/nm74g64/run/fpiwini8.pnm",
      parallel = FALSE,
      threads = 1))

2 Read Inputs

3 Parameters

4 Model Summary

Dataset: ..\..\..\..\data\derived\RawData.csv

Records: 3376    Observations: 191   Subjects: 13

Objective Function Value (final est. method): 877.838

Estimation Method(s):

– First Order Conditional Estimation with Interaction 

**Heuristic Problem(s) Detected:**

– hessian_reset 
|parameter_names |estimate |stderr |shrinkage |
|:---------------|:--------|:------|:---------|
|THETA1          |25.3     |3.38   |          |
|THETA2          |4.25     |0.958  |          |
|THETA3          |45       |13.8   |          |
|THETA4          |2.89     |0.585  |          |
|THETA5          |36       |19.9   |          |
|THETA6          |15.9     |1.90   |          |
|THETA7          |21.1     |14.6   |          |
|THETA8          |103      |78.5   |          |
|OMEGA(2,2)      |0.447    |0.184  |4.29      |
|OMEGA(5,5)      |0.507    |0.451  |13        |
|OMEGA(6,6)      |0.164    |0.0783 |2.75      |
|SIGMA(1,1)      |0.0678   |0.0133 |4.58      |
|SIGMA(2,2)      |0.0713   |0.0106 |10.9      |
[[1]]
[[1]]$method
[1] "First Order Conditional Estimation with Interaction"

[[1]]$ofv_no_constant
[1] 877.838

[[1]]$constant_to_ofv
[1] 351.0345

[[1]]$ofv_with_constant
[1] 1228.872
[[1]]
[[1]]$method
[1] "First Order Conditional Estimation with Interaction"

[[1]]$condition_number
[1] NA

Name

Description

Estimate

95% CI

RSE (%)

Shrinkage (%)

V1C (L)

Ceftolozane: Central volume of distribution

25.3

18.7, 32.0

13.3

-

CLC (L/h)

Ceftolozane: Clearance

4.25

2.37, 6.13

22.6

-

V2C (L/h)

Ceftolozane: Peripheral volume of distribution

45.0

17.9, 72.1

30.8

-

QC (L)

Ceftolozane: Intercompartmental Clearance

2.89

1.74, 4.04

20.3

-

V1T (L)

Tazobactam: Central volume of distribution

36.0

-3.07, 75.0

55.4

-

CLT (L/h)

Tazobactam: Clearance

15.9

12.1, 19.6

11.9

-

V2T (L/h)

Tazobactam: Peripheral volume of distribution

21.1

-7.41, 49.7

68.9

-

QT (L)

Tazobactam: Intercompartmental Clearance

103

-51.0, 257

76.3

-

IIV-CLC

Variance for CLC

0.447 [CV\%=75.1]

0.0859, 0.808

41.2

4.29

IIV-V1T

Variance for V1T

0.507 [CV\%=81.3]

-0.376, 1.39

88.9

13.0

IIV-CLT

Variance for CLT

0.164 [CV\%=42.3]

0.0108, 0.318

47.7

2.75

ResC

Ceftolozane: Proportional

0.0678 [CV\%=6.78]

0.0418, 0.0938

19.6

4.58

ResT

Tazobaktam: Proportional

0.0713 [CV\%=7.13]

0.0505, 0.0922

14.9

10.9

5 Concordance Plots

5.1 IPRED/PRED vs DV

5.2 All

5.3 Ceftolozane

5.4 Tazobactam

6 Residual Plots

7 Histogram Plots and Q-Q Plots

8 GOF Plots

8.1 GeoMean

8.1.1 Linear

[[1]]


[[2]]

8.1.2 Semi-log

[[1]]


[[2]]

8.2 Median

8.2.1 Linear

[[1]]


[[2]]

8.2.2 Semi-log

[[1]]


[[2]]

8.3 Semi-log individual

[[1]]


[[2]]


[[3]]


[[4]]


[[5]]


[[6]]


[[7]]


[[8]]


[[9]]


[[10]]


[[11]]


[[12]]


[[13]]

9 ETA Plots

9.1 ETA Correlations

9.2 Categorical ETA plots

[[1]]


[[2]]


[[3]]

9.3 Continuous ETA plots

Code
path_1cmt <- "D:/PROJECTS/ceftolozane-tazobactam/model/nonmem/basic/100/model_diagnostic_1cmt_files/figure-html"
path_2cmt <- "D:/PROJECTS/ceftolozane-tazobactam/model/nonmem/basic/102/model_diagnostic_2cmt_files/figure-html"

img1_path <- list.files(path_1cmt, pattern = "gof semilog-3.*\\.png$", full.names = TRUE)
img2_path <- list.files(path_2cmt, pattern = "gof semilog-3.*\\.png$", full.names = TRUE)

img1 <- image_read(img1_path)
img2 <- image_read(img2_path)


width <- min(image_info(img1)$width, image_info(img2)$width)
img1 <- image_resize(img1, paste0(width))
img2 <- image_resize(img2, paste0(width))

spacer <- image_blank(width = width, height = 120, color = "white")

combined_img <- image_append(c(img1, spacer, img2), stack = TRUE)


out_path <- "D:/PROJECTS/ceftolozane-tazobactam/scripts/Model_Diagnostic_NONMEM/combined_diagnostics.png"
image_write(combined_img, out_path)


height <- min(image_info(img1)$height, image_info(img2)$height)
img1 <- image_resize(img1, paste0("x", height))
img2 <- image_resize(img2, paste0("x", height))

spacer <- image_blank(width = 120, height = height, color = "white")

combined_img <- image_append(c(img1, spacer, img2), stack = FALSE)

# out_path <- "D:/PROJECTS/ceftaz/scripts/Model_Diagnostic/combined_diagnostics_2.png"
# image_write(combined_img, out_path)

combined_img

10 Sesion info

R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 26200)

Matrix products: default


locale:
[1] LC_COLLATE=Polish_Poland.utf8  LC_CTYPE=Polish_Poland.utf8   
[3] LC_MONETARY=Polish_Poland.utf8 LC_NUMERIC=C                  
[5] LC_TIME=Polish_Poland.utf8    

time zone: Europe/Warsaw
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] magick_2.8.5        ggpubr_0.6.0        PKNCA_0.11.0       
 [4] yspec_0.6.1.9000    yaml_2.3.8          flextable_0.9.7    
 [7] magrittr_2.0.3      nonmem2R_0.2.5      patchwork_1.3.0    
[10] gridExtra_2.3       bbr_1.10.0          GGally_2.2.1       
[13] pmtables_0.6.0.9000 pmplots_0.4.0.9001  skimr_2.1.5        
[16] rmarkdown_2.29      lubridate_1.9.3     forcats_1.0.0      
[19] stringr_1.5.1       dplyr_1.1.4         purrr_1.0.2        
[22] readr_2.1.5         tidyr_1.3.1         tibble_3.2.1       
[25] ggplot2_3.5.1       tidyverse_2.0.0     here_1.0.1         

loaded via a namespace (and not attached):
 [1] deldir_2.0-4            rlang_1.1.4             compiler_4.3.2         
 [4] mgcv_1.9-1              png_0.1-8               systemfonts_1.1.0      
 [7] vctrs_0.6.5             reshape2_1.4.4          pkgconfig_2.0.3        
[10] crayon_1.5.3            fastmap_1.2.0           backports_1.4.1        
[13] labeling_0.4.3          nmrec_0.4.0             tzdb_0.4.0             
[16] ps_1.7.6                ragg_1.3.3              bit_4.5.0.1            
[19] xfun_0.49               jsonlite_1.8.8          splines2_0.5.3         
[22] uuid_1.2-1              jpeg_0.1-10             parallel_4.3.2         
[25] broom_1.0.7             R6_2.6.1                stringi_1.8.4          
[28] RColorBrewer_1.1-3      car_3.1-3               Rcpp_1.0.12            
[31] assertthat_0.2.1        knitr_1.49              base64enc_0.1-3        
[34] Matrix_1.6-1.1          splines_4.3.2           timechange_0.3.0       
[37] tidyselect_1.2.1        rstudioapi_0.17.1       abind_1.4-8            
[40] processx_3.8.4          qpdf_1.3.4              lattice_0.22-6         
[43] plyr_1.8.9              withr_3.0.2             askpass_1.2.1          
[46] evaluate_1.0.1          ggstats_0.7.0           zip_2.3.1              
[49] xml2_1.3.6              pillar_1.10.2           carData_3.0-5          
[52] corrplot_0.95           renv_1.0.7              checkmate_2.3.1        
[55] generics_0.1.3          vroom_1.6.5             rprojroot_2.0.4        
[58] hms_1.1.3               munsell_0.5.1           scales_1.3.0           
[61] xtable_1.8-4            glue_1.7.0              gdtools_0.4.1          
[64] tools_4.3.2             diffobj_0.3.5           interp_1.1-6           
[67] data.table_1.16.2       ggsignif_0.6.4          pdftools_3.4.1         
[70] fs_1.6.4                mvtnorm_1.3-2           cowplot_1.1.3          
[73] grid_4.3.2              latticeExtra_0.6-30     colorspace_2.1-0       
[76] nlme_3.1-164            repr_1.1.7              Formula_1.2-5          
[79] cli_3.6.3               kableExtra_1.4.0        textshaping_0.4.0      
[82] officer_0.6.7           fontBitstreamVera_0.1.1 viridisLite_0.4.2      
[85] svglite_2.1.3           gtable_0.3.6            rstatix_0.7.2          
[88] digest_0.6.37           fontquiver_0.2.1        htmlwidgets_1.6.4      
[91] farver_2.1.2            htmltools_0.5.8.1       lifecycle_1.0.4        
[94] bit64_4.5.2             fontLiberation_0.1.0    openssl_2.2.2          
[97] MASS_7.3-60