if (campsis::onCran()) { cat("This vignette was not built on CRAN. Please check out the online version [here](https://calvagone.github.io/campsis.doc/articles/v14_complex_pkpd_models.html).") knitr::knit_exit() }
library(campsis)
This vignette intends to demonstrate that CAMPSIS can be used to implement almost any PK/PD model, including complex ones.
Load the filgrastim PK/PD model from the model library as follows. Please note that this model was translated from NONMEM code. The original model file can be found here on the DDMORE repository. Eventually, this model was updated with the final parameters from the corresponding publication (Krzyzanski et al., 2010).
pkpd <- model_suite$literature$filgrastim_pkpd_krzyzanski pkpd
Let's create a simple demonstration dataset of 250 subjects:
baseDataset <- Dataset(250) %>% add(Covariate("BAS", 0.02)) %>% add(Covariate("WT", UniformDistribution(50, 100))) %>% add(DoseAdaptation("WT*AMT")) %>% # per kilo dosing add(Observations(0:216)) %>% add(Covariate("ROUT", 0)) # subcutaneous route (SC)
Assume we want to compare the following subcutaneous administrations of filgrastim:
We define the following scenarios:
scenarios <- Scenarios() %>% add(Scenario("2.5 μg/kg SC", dataset=~.x %>% add(Bolus(time=0, amount=2.5, compartment=1, ii=24, addl=6)))) %>% add(Scenario("5 μg/kg SC", dataset=~.x %>% add(Bolus(time=0, amount=5, compartment=1, ii=24, addl=6)))) %>% add(Scenario("10 μg/kg SC", dataset=~.x %>% add(Bolus(time=0, amount=10, compartment=1, ii=24, addl=6))))
A quick simulation gives us the plasma concentration of filgrastim, as well as the absolute neutrophil count (ANC):
library(ggplot2) results <- pkpd %>% simulate(dataset=baseDataset, scenarios=scenarios, seed=1) results <- results %>% dplyr::mutate(SCENARIO=factor(SCENARIO, levels=unique(SCENARIO))) p1 <- shadedPlot(results, "CP", "SCENARIO") + facet_wrap(~SCENARIO) + scale_y_log10(breaks=c(.01,.1,1,10,100)) + ylab("G-CSF Serum Concentration (ng/mL)") p2 <- shadedPlot(results, "A_14", "SCENARIO") + facet_wrap(~SCENARIO) + ylab("ANC (10^3 cells/μL)") gridExtra::grid.arrange(p1, p2, nrow=2)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.