# Example 1: Targeted therapy with hepatotoxicity grading
# Scenario: Kinase inhibitor with dose-dependent liver toxicity
n.dose <- 5
start.dose <- 1
size.cohort <- 4 # Slightly larger for ordinal information
n.cohort <- 12
# Hepatotoxicity categories: Normal, Grade 1, Grade 2, Grade 3+
# Progressive increase in severe hepatotoxicity with dose
toxprob <- rbind(
c(0.85, 0.70, 0.50, 0.35, 0.20), # Normal LFTs
c(0.12, 0.20, 0.25, 0.25, 0.20), # Grade 1 elevation
c(0.02, 0.08, 0.20, 0.30, 0.40), # Grade 2 elevation
c(0.01, 0.02, 0.05, 0.10, 0.20) # Grade 3+ hepatotoxicity
)
# Response categories: PD, SD, PR, CR
# Plateau in efficacy at higher doses
effprob <- rbind(
c(0.70, 0.50, 0.30, 0.25, 0.30), # Progressive disease
c(0.25, 0.35, 0.40, 0.35, 0.35), # Stable disease
c(0.04, 0.12, 0.25, 0.30, 0.25), # Partial response
c(0.01, 0.03, 0.05, 0.10, 0.10) # Complete response
)
# Hepatotoxicity severity weights (clinical practice-based)
sev.weight <- c(0.0, 0.3, 1.0, 3.0) # Strong penalty for Grade 3+
res.weight <- c(0.0, 0.2, 1.5, 3.5) # Preference for objective responses
# Moderate toxicity tolerance for targeted therapy
phi <- 0.60 # Accept moderate weighted hepatotoxicity
delta <- 0.80 # Target meaningful weighted efficacy
# Standard assessment windows for targeted therapy
tau.T <- 42 # 6 weeks for LFT monitoring
tau.E <- 56 # 8 weeks for response assessment
accrual <- 7 # Weekly enrollment
results_tki <- gboinet(
n.dose = n.dose, start.dose = start.dose,
size.cohort = size.cohort, n.cohort = n.cohort,
toxprob = toxprob, effprob = effprob,
sev.weight = sev.weight, res.weight = res.weight,
phi = phi, delta = delta,
tau.T = tau.T, tau.E = tau.E, accrual = accrual,
estpt.method = "obs.prob",
obd.method = "utility.weighted",
w1 = 0.4, w2 = 1.2,
n.sim = 100
)
# Display normalized equivalent scores (true values)
cat("True Normalized Equivalent Scores:\\n")
cat("nETS (Toxicity):", round(results_tki$nETS, 2), "\\n")
cat("nEES (Efficacy):", round(results_tki$nEES, 2), "\\n")
# Example 2: Chemotherapy with neuropathy grading
# Scenario: Taxane with cumulative peripheral neuropathy
n.dose <- 4
size.cohort <- 6 # Larger cohorts for safety
n.cohort <- 8
# Neuropathy categories: None, Mild, Moderate, Severe
# Cumulative dose-dependent neuropathy
toxprob <- rbind(
c(0.75, 0.55, 0.35, 0.20), # No neuropathy
c(0.20, 0.30, 0.35, 0.30), # Mild neuropathy
c(0.04, 0.12, 0.25, 0.35), # Moderate neuropathy
c(0.01, 0.03, 0.05, 0.15) # Severe neuropathy
)
# Response categories: No response, Minor, Major, Complete
effprob <- rbind(
c(0.60, 0.40, 0.25, 0.20), # No response
c(0.30, 0.35, 0.35, 0.30), # Minor response
c(0.08, 0.20, 0.30, 0.35), # Major response
c(0.02, 0.05, 0.10, 0.15) # Complete response
)
# Neuropathy-specific weights (functional impact)
sev.weight <- c(0.0, 0.4, 1.2, 2.8) # Severe neuropathy major QoL impact
res.weight <- c(0.0, 0.3, 1.8, 3.2) # Complete response highly valued
phi <- 0.50 # Moderate neuropathy tolerance
delta <- 0.80 # Target substantial response
tau.T <- 84 # 12 weeks for neuropathy development
tau.E <- 56 # 8 weeks for response assessment
accrual <- 14 # Bi-weekly enrollment
results_chemo <- gboinet(
n.dose = n.dose, start.dose = start.dose,
size.cohort = size.cohort, n.cohort = n.cohort,
toxprob = toxprob, effprob = effprob,
sev.weight = sev.weight, res.weight = res.weight,
phi = phi, delta = delta,
tau.T = tau.T, tau.E = tau.E, accrual = accrual,
estpt.method = "obs.prob",
obd.method = "utility.truncated.linear",
n.sim = 100
)
# Compare with binary approximation
binary_tox <- 1 - toxprob[1,] # Any neuropathy
binary_eff <- effprob[3,] + effprob[4,] # Major + Complete response
cat("Ordinal vs Binary Information:\\n")
cat("Binary toxicity rates:", round(binary_tox, 2), "\\n")
cat("Ordinal nETS scores:", round(results_chemo$nETS, 2), "\\n")
cat("Binary efficacy rates:", round(binary_eff, 2), "\\n")
cat("Ordinal nEES scores:", round(results_chemo$nEES, 2), "\\n")
Run the code above in your browser using DataLab