← ClaudeAtlas

pharmacokineticslisted

Pharmacokinetic and pharmacodynamic analysis in R, including NCA, compartmental modeling, and bioequivalence.
choxos/BiostatAgent · ★ 4 · AI & Automation · score 75
Install: claude install-skill choxos/BiostatAgent
# Pharmacokinetics and Pharmacodynamics in R ## Overview Comprehensive pharmacokinetic (PK) and pharmacodynamic (PD) modeling in R covering non-compartmental analysis (NCA), compartmental PK modeling, population PK with nonlinear mixed effects, bioequivalence assessment, PK/PD modeling, and drug-drug interaction evaluation. ## Non-Compartmental Analysis (NCA) ### Using PKNCA Package ```r library(PKNCA) # Prepare concentration data conc_data <- data.frame( subject = rep(1:3, each = 8), time = rep(c(0, 0.5, 1, 2, 4, 8, 12, 24), 3), concentration = c( 0, 450, 380, 290, 180, 85, 40, 12, 0, 520, 410, 320, 200, 95, 45, 15, 0, 480, 395, 305, 190, 90, 42, 13 ) ) # Prepare dose data dose_data <- data.frame( subject = 1:3, time = 0, dose = 100 # mg ) # Create PKNCA objects conc_obj <- PKNCAconc(concentration ~ time | subject, data = conc_data) dose_obj <- PKNCAdose(dose ~ time | subject, data = dose_data) # Combine into analysis object data_obj <- PKNCAdata(conc_obj, dose_obj) # Run NCA results <- pk.nca(data_obj) # View results summary(results) as.data.frame(results) ``` ### Custom NCA Parameters ```r library(PKNCA) # Specify intervals and parameters intervals <- data.frame( start = 0, end = 24, cmax = TRUE, tmax = TRUE, auclast = TRUE, aucinf.obs = TRUE, half.life = TRUE, cl.obs = TRUE, vss.obs = TRUE, mrt.last = TRUE ) # Create analysis with custom intervals data_obj <- PKNCAdata( conc_obj, dose_obj, intervals = int