# Example 1: Obtains follow-up duration given power, accrual intensity,
# and accrual duration for variable follow-up
nbsamplesize1s(beta = 0.2, kMax = 2,
informationRates = c(0.5, 1),
alpha = 0.025, typeAlphaSpending = "sfOF",
lambdaH0 = 0.125, accrualIntensity = 500,
stratumFraction = c(0.2, 0.8),
kappa = c(3, 5), lambda = c(0.0875, 0.085),
gamma = 0, accrualDuration = 1.25,
followupTime = NA, fixedFollowup = FALSE)
# Example 2: Obtains accrual intensity given power, accrual duration, and
# follow-up duration for variable follow-up
nbsamplesize1s(beta = 0.2, kMax = 2,
informationRates = c(0.5, 1),
alpha = 0.025, typeAlphaSpending = "sfOF",
lambdaH0 = 0.125, accrualIntensity = 100,
kappa = 5, lambda = 0.0875,
gamma = 0, accrualDuration = 1.25,
followupTime = 2.25, fixedFollowup = FALSE)
# Example 3: Obtains accrual duration given power, accrual intensity, and
# follow-up duration for fixed follow-up
nbsamplesize1s(beta = 0.2, kMax = 2,
informationRates = c(0.5, 1),
alpha = 0.025, typeAlphaSpending = "sfOF",
lambdaH0 = 8.4, accrualIntensity = 40,
kappa = 3, lambda = 4.2,
gamma = 0, accrualDuration = NA,
followupTime = 0.5, fixedFollowup = TRUE)
Run the code above in your browser using DataLab