# Example 1: Variable follow-up design and solve for follow-up time
nbsamplesizeequiv(beta = 0.1, kMax = 2, informationRates = c(0.5, 1),
alpha = 0.05, typeAlphaSpending = "sfOF",
rateRatioLower = 2/3, rateRatioUpper = 3/2,
accrualIntensity = 1956/1.25,
stratumFraction = c(0.2, 0.8),
kappa1 = c(3, 5),
kappa2 = c(2, 3),
lambda1 = c(0.125, 0.165),
lambda2 = c(0.135, 0.175),
gamma1 = -log(1-0.05),
gamma2 = -log(1-0.10),
accrualDuration = 1.25,
followupTime = NA, fixedFollowup = FALSE)
# Example 2: Fixed follow-up design and solve for accrual duration
nbsamplesizeequiv(beta = 0.2, kMax = 2, informationRates = c(0.5, 1),
alpha = 0.05, typeAlphaSpending = "sfOF",
rateRatioLower = 0.5, rateRatioUpper = 2,
accrualIntensity = 220/1.5,
kappa1 = 3, kappa2 = 3,
lambda1 = 8.4, lambda2 = 8.4,
gamma1 = 0, gamma2 = 0,
accrualDuration = NA,
followupTime = 0.5, fixedFollowup = TRUE)
Run the code above in your browser using DataLab