Closed bjoernholzhauer closed 3 weeks ago
Idea is correct, but the loop search is not necessary:
getSampleSizeSurvival(alpha=0.05, beta=0.1, sided=2, accrualTime = c(0, 1e-9), followUpTime = 1, dropoutRate1 = 0.025, dropoutRate2 = 0.025, lambda2 = 0.5, hazardRatio = 0.7 ) |> fetch(maxNumberOfSubjects) |> ceiling()
I'd like to calculate the sample size (or power given sample size) for a fixed duration survival study. These are pretty common in some areas such as atrial fibrillation (e.g. these two studies or this one).
Maybe I missed how to do this, but I have not found anything better than the below, where I do a search loop over sample sizes until the trial duration is as desired: