# Modeling efficacy probabilities in a dose-escalation study
dose_levels <- c(25, 50, 100, 200, 400) # mg doses
efficacy_responses <- c(1, 3, 8, 12, 10) # patients with efficacy
total_patients <- c(6, 6, 12, 15, 12) # total patients per dose
# Fit fractional polynomial model
efficacy_probs <- fp.logit(obs = efficacy_responses,
n = total_patients,
dose = dose_levels)
# Display results
results <- data.frame(
Dose = dose_levels,
Observed_Rate = efficacy_responses / total_patients,
FP_Predicted = round(efficacy_probs, 3)
)
print(results)
Run the code above in your browser using DataLab