Package: lrstat 0.2.11

lrstat: Power and Sample Size Calculation for Non-Proportional Hazards and Beyond

Performs power and sample size calculation for non-proportional hazards model using the Fleming-Harrington family of weighted log-rank tests. The sequentially calculated log-rank test score statistics are assumed to have independent increments as characterized in Anastasios A. Tsiatis (1982) <doi:10.1080/01621459.1982.10477898>. The mean and variance of log-rank test score statistics are calculated based on Kaifeng Lu (2021) <doi:10.1002/pst.2069>. The boundary crossing probabilities are calculated using the recursive integration algorithm described in Christopher Jennison and Bruce W. Turnbull (2000, ISBN:0849303168). The package can also be used for continuous, binary, and count data. For continuous data, it can handle missing data through mixed-model for repeated measures (MMRM). In crossover designs, it can estimate direct treatment effects while accounting for carryover effects. For binary data, it can design Simon's 2-stage, modified toxicity probability-2 (mTPI-2), and Bayesian optimal interval (BOIN) trials. For count data, it can design group sequential trials for negative binomial endpoints with censoring. Additionally, it facilitates group sequential equivalence trials for all supported data types. Moreover, it can design adaptive group sequential trials for changes in sample size, error spending function, number and spacing or future looks. Finally, it offers various options for adjusted p-values, including graphical and gatekeeping procedures.

Authors:Kaifeng Lu [aut, cre]

lrstat_0.2.11.tar.gz
lrstat_0.2.11.zip(r-4.5)lrstat_0.2.11.zip(r-4.4)lrstat_0.2.11.zip(r-4.3)
lrstat_0.2.11.tgz(r-4.4-x86_64)lrstat_0.2.11.tgz(r-4.4-arm64)lrstat_0.2.11.tgz(r-4.3-x86_64)lrstat_0.2.11.tgz(r-4.3-arm64)
lrstat_0.2.11.tar.gz(r-4.5-noble)lrstat_0.2.11.tar.gz(r-4.4-noble)
lrstat_0.2.11.tgz(r-4.4-emscripten)lrstat_0.2.11.tgz(r-4.3-emscripten)
lrstat.pdf |lrstat.html
lrstat/json (API)

# Install 'lrstat' in R:
install.packages('lrstat', repos = c('https://kaifenglu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/kaifenglu/lrstat/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda-Forge:

cpp

5.58 score 2 stars 30 scripts 633 downloads 180 exports 32 dependencies

Last updated 3 months agofrom:163eeda6fc. Checks:1 OK, 8 WARNING. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKJan 03 2025
R-4.5-win-x86_64WARNINGJan 03 2025
R-4.5-linux-x86_64WARNINGJan 03 2025
R-4.4-win-x86_64WARNINGJan 03 2025
R-4.4-mac-x86_64WARNINGJan 03 2025
R-4.4-mac-aarch64WARNINGJan 03 2025
R-4.3-win-x86_64WARNINGJan 03 2025
R-4.3-mac-x86_64WARNINGJan 03 2025
R-4.3-mac-aarch64WARNINGJan 03 2025

Exports:accrualadadaptDesignbinary_tte_simBOINTablecaltimeClopperPearsonCIcovrmsterrorSpentexitprobfadjpbonfadjpdunfadjpsimfindInterval3fmodmixfquantilefseqbonfstdmixfstp2seqftruncfwgtmatgetAccrualDurationFromNgetADCIgetADRCIgetBoundgetCIgetCPgetDesigngetDesignAgreementgetDesignANOVAgetDesignANOVAContrastgetDesignEquivgetDesignFisherExactgetDesignLogisticgetDesignMeanDiffgetDesignMeanDiffCarryovergetDesignMeanDiffEquivgetDesignMeanDiffMMRMgetDesignMeanDiffXOgetDesignMeanDiffXOEquivgetDesignMeanRatiogetDesignMeanRatioEquivgetDesignMeanRatioXOgetDesignMeanRatioXOEquivgetDesignOddsRatiogetDesignOddsRatioEquivgetDesignOneMeangetDesignOneMultinomgetDesignOneProportiongetDesignOneRateExactgetDesignOneSlopegetDesignOrderedBinomgetDesignPairedMeanDiffgetDesignPairedMeanDiffEquivgetDesignPairedMeanRatiogetDesignPairedMeanRatioEquivgetDesignPairedPropMcNemargetDesignRepeatedANOVAgetDesignRepeatedANOVAContrastgetDesignRiskDiffgetDesignRiskDiffEquivgetDesignRiskDiffExactgetDesignRiskDiffExactEquivgetDesignRiskRatiogetDesignRiskRatioEquivgetDesignRiskRatioExactgetDesignRiskRatioExactEquivgetDesignRiskRatioFMgetDesignSlopeDiffgetDesignSlopeDiffMMRMgetDesignTwoMultinomgetDesignTwoOrdinalgetDesignTwoWayANOVAgetDesignUnorderedBinomgetDesignUnorderedMultinomgetDesignWilcoxongetDurationFromNeventsgetNeventsFromHazardRatiogetRCIhdhedgesgkmdiffkmestkmpowerkmpower1skmpowerequivkmsamplesizekmsamplesize1skmsamplesizeequivkmstatkmstat1kmsurvliferegrlogisregrlrpowerlrpowerequivlrsamplesizelrsamplesizeequivlrsimlrsim2elrsim2e3alrsim3alrstatlrstat1lrtestmnOddsRatioCImnRateDiffCImnRateRatioCImnRiskDiffCImnRiskRatioCImTPI2Tablenatrisknbpowernbpower1snbpowerequivnbsamplesizenbsamplesize1snbsamplesizeequivnbstatnbstat1neventnevent2patriskpdpeventphregrpowerFisherExactpowerOnePropExactpowerOneRateExactpowerRiskDiffExactpowerRiskDiffExactEquivpowerRiskRatioExactpowerRiskRatioExactEquivptpwexppwexpcutspwexploglikqrcppqtpwexpremlOddsRatioremlRateDiffremlRateRatioremlRiskDiffremlRiskRatiorepeatedPValueresiduals_phregrriskDiffExactCIriskDiffExactPValueriskRatioExactCIriskRatioExactPValuermdiffrmestrmpowerrmpower1srmpowerequivrmsamplesizermsamplesize1srmsamplesizeequivrmstrmstatrmstat1rtpwexprunShinyAppsamplesizeFisherExactsamplesizeOnePropExactsamplesizeOneRateExactsamplesizeRiskDiffExactsamplesizeRiskDiffExactEquivsamplesizeRiskRatioExactsamplesizeRiskRatioExactEquivsimon2stagesimonBayesAnalysissimonBayesSimsurvfit_phregrsurvQuantileupdateGraphzstatOddsRatiozstatRateDiffzstatRateRatiozstatRiskDiffzstatRiskRatio

Dependencies:base64encbslibcachemclicommonmarkcrayondigestfastmapfontawesomefsgluehtmltoolshttpuvjquerylibjsonlitelaterlifecyclelpSolvemagrittrmemoisemimemvtnormpromisesR6rappdirsRcpprlangsassshinysourcetoolswithrxtable

Comparing Direct Approximation and Schoenfeld Methods

Rendered fromdirect_approximation_vs_schoenfeld.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-05-07
Started: 2022-08-04

Multiplicity Adjustment for Group Sequential Designs

Rendered fromgroup_sequential_multiplicity.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-05-07
Started: 2023-02-06

Power Calculation Using Max-Combo Tests

Rendered frommaxcombo.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-12-04
Started: 2022-07-25

Power Calculation With Stratification Variables

Rendered fromstratified.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-05-07
Started: 2022-07-25

Sample Size Calculation Under Non-Proportional Hazards

Rendered fromnon-proportional_hazards.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-05-07
Started: 2022-07-25

Sample Size Calculation With Fixed Follow-up

Rendered fromfixed_follow-up.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-10-22
Started: 2022-07-25

Simulation for Group Sequential Trials

Rendered fromgroup_sequential_simulation.Rmdusingknitr::rmarkdownon Jan 03 2025.

Last update: 2024-02-27
Started: 2022-07-25

Readme and manuals

Help Manual

Help pageTopics
Power and Sample Size Calculation for Non-Proportional Hazards and Beyondlrstat-package
Number of Enrolled Subjectsaccrual
Adaptive Design at an Interim LookadaptDesign
Calendar Times for Target Number of Eventscaltime
Error SpendingerrorSpent
Stagewise Exit Probabilitiesexitprob
Adjusted p-Values for Bonferroni-Based Graphical Approachesfadjpbon
Adjusted p-Values for Dunnett-Based Graphical Approachesfadjpdun
Adjusted p-Values for Simes-Based Graphical Approachesfadjpsim
Adjusted p-Values for Modified Mixture Gatekeeping Proceduresfmodmix
Group Sequential Trials Using Bonferroni-Based Graphical Approachesfseqbon
Adjusted p-Values for Standard Mixture Gatekeeping Proceduresfstdmix
Adjusted p-Values for Stepwise Testing Procedures for Two Sequencesfstp2seq
Weight Matrix for All Intersection Hypothesesfwgtmat
Accrual Duration to Enroll Target Number of SubjectsgetAccrualDurationFromN
Efficacy Boundaries for Group Sequential DesigngetBound
Power and Sample Size for a Generic Group Sequential DesigngetDesign
Range of Accrual Duration for Target Number of EventsgetDurationFromNevents
Required Number of Events Given Hazard RatiogetNeventsFromHazardRatio
Kaplan-Meier Estimates of Survival Curvekmest
Log-Rank Test Powerlrpower
Log-Rank Test Sample Sizelrsamplesize
Log-Rank Test Simulationlrsim
Log-Rank Test Simulation for Two Endpointslrsim2e
Log-Rank Test Simulation for Two Endpoints and Three Armslrsim2e3a
Log-Rank Test Simulation for Three Armslrsim3a
Number of Subjects Having an Event and Log-Rank Statisticslrstat
Quantile Function of Truncated Piecewise Exponential Distributionqtpwexp
Repeated p-Values for Group Sequential DesignrepeatedPValue
Update Graph for Graphical ApproachesupdateGraph