lrstat provides power and sample size methods for non-proportional hazards
and many other clinical trial designs.
The package is built around weighted log-rank methodology for time-to-event group sequential designs, with flexible accrual, event/dropout modeling, error-spending boundaries, and simulation support. It also includes design and inference tools for continuous, binary, count, and equivalence settings, including adaptive and multi-arm/multi-stage extensions.
Install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("kaifenglu/lrstat")
lrpower(), lrsamplesize(), getBound(), and related utilities.lrsim()) and
compare alternative design scenarios.The example below computes power for a two-look group sequential trial with a delayed treatment effect and FH(0,1) weighting.
library(lrstat)
fit <- lrpower(
kMax = 2,
informationRates = c(0.8, 1),
alpha = 0.025,
typeAlphaSpending = "sfOF",
allocationRatioPlanned = 1,
accrualTime = seq(0, 9),
accrualIntensity = c(26 / 9 * seq(1, 9), 26),
piecewiseSurvivalTime = c(0, 6),
lambda1 = c(0.0533, 0.0309),
lambda2 = c(0.0533, 0.0533),
gamma1 = -log(1 - 0.05) / 12,
gamma2 = -log(1 - 0.05) / 12,
accrualDuration = 22,
followupTime = 18,
fixedFollowup = FALSE,
rho1 = 0,
rho2 = 1
)
fit
lrstat includes broad design support beyond weighted log-rank settings,
including:
See the reference index for the full function catalog.
Launch the interactive application:
library(lrstat)
runShinyApp_lrstat()
If you use lrstat in analyses, reports, or publications, please cite the
package and relevant methodological references documented in the function help
pages and vignettes.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.