lrstat0.2.13 package

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

accrual

Number of Enrolled Subjects

ad

Number of Patients Enrolled During an Interval and Having an Event by ...

adaptDesign

Adaptive Design at an Interim Look

binary_tte_sim

Simulation for a Binary Endpoint and a Time-to-Event Endpoint

BOINTable

BOIN Decision Table

caltime

Calendar Times for Target Number of Events

ClopperPearsonCI

Clopper-Pearson Confidence Interval for One-Sample Proportion

covrmst

Covariance Between Restricted Mean Survival Times

errorSpent

Error Spending

exitprob

Stagewise Exit Probabilities

fadjpbon

Adjusted p-Values for Bonferroni-Based Graphical Approaches

fadjpdun

Adjusted p-Values for Dunnett-Based Graphical Approaches

fadjpsim

Adjusted p-Values for Simes-Based Graphical Approaches

findInterval3

Find Interval Numbers of Indices

float_to_fraction

Converting a decimal to a fraction

fmodmix

Adjusted p-Values for Modified Mixture Gatekeeping Procedures

fquantile

The Quantiles of a Survival Distribution

fseqbon

Group Sequential Trials Using Bonferroni-Based Graphical Approaches

fstdmix

Adjusted p-Values for Standard Mixture Gatekeeping Procedures

fstp2seq

Adjusted p-Values for Stepwise Testing Procedures for Two Sequences

ftrunc

Adjusted p-Values for Holm, Hochberg, and Hommel Procedures

fwgtmat

Weight Matrix for All Intersection Hypotheses

getAccrualDurationFromN

Accrual Duration to Enroll Target Number of Subjects

getADCI

Confidence Interval After Adaptation

getADRCI

Repeated Confidence Interval After Adaptation

getBound

Efficacy Boundaries for Group Sequential Design

getCI

Confidence Interval After Trial Termination

getCP

Conditional Power Allowing for Varying Parameter Values

getDesign

Power and Sample Size for a Generic Group Sequential Design

getDesignAgreement

Power and Sample Size for Cohen's kappa

getDesignANOVA

Power and Sample Size for One-Way ANOVA

getDesignANOVAContrast

Power and Sample Size for One-Way ANOVA Contrast

getDesignEquiv

Power and Sample Size for a Generic Group Sequential Equivalence Desig...

getDesignFisherExact

Power and Sample Size for Fisher's Exact Test for Two Proportions

getDesignLogistic

Power and Sample Size for Logistic Regression

getDesignMeanDiff

Group Sequential Design for Two-Sample Mean Difference

getDesignMeanDiffCarryover

Power and Sample Size for Direct Treatment Effects in Crossover Trials

getDesignMeanDiffCarryoverEquiv

Power and Sample Size for Equivalence in Direct Treatment Effects in C...

getDesignMeanDiffEquiv

Group Sequential Design for Equivalence in Two-Sample Mean Difference

getDesignMeanDiffMMRM

Group Sequential Design for Two-Sample Mean Difference From the MMRM M...

getDesignMeanDiffXO

Group Sequential Design for Mean Difference in 2x2 Crossover

getDesignMeanDiffXOEquiv

Group Sequential Design for Equivalence in Mean Difference in 2x2 Cros...

getDesignMeanRatio

Group Sequential Design for Two-Sample Mean Ratio

getDesignMeanRatioEquiv

Group Sequential Design for Equivalence in Two-Sample Mean Ratio

getDesignMeanRatioXO

Group Sequential Design for Mean Ratio in 2x2 Crossover

getDesignMeanRatioXOEquiv

Group Sequential Design for Equivalence in Mean Ratio in 2x2 Crossover

getDesignOddsRatio

Group Sequential Design for Two-Sample Odds Ratio

getDesignOddsRatioEquiv

Group Sequential Design for Equivalence in Two-Sample Odds Ratio

getDesignOneMean

Group Sequential Design for One-Sample Mean

getDesignOneMultinom

Power and Sample Size for One-Sample Multinomial Response

getDesignOneProportion

Group Sequential Design for One-Sample Proportion

getDesignOneRateExact

Power and Sample Size for One-Sample Poisson Rate Exact Test

getDesignOneSlope

Group Sequential Design for One-Sample Slope

getDesignOrderedBinom

Power and Sample Size for Cochran-Armitage Trend Test for Ordered Mult...

getDesignPairedMeanDiff

Group Sequential Design for Paired Mean Difference

getDesignPairedMeanDiffEquiv

Group Sequential Design for Equivalence in Paired Mean Difference

getDesignPairedMeanRatio

Group Sequential Design for Paired Mean Ratio

getDesignPairedMeanRatioEquiv

Group Sequential Design for Equivalence in Paired Mean Ratio

getDesignPairedPropMcNemar

Group Sequential Design for McNemar's Test for Paired Proportions

getDesignRepeatedANOVA

Power and Sample Size for Repeated-Measures ANOVA

getDesignRepeatedANOVAContrast

Power and Sample Size for One-Way Repeated Measures ANOVA Contrast

getDesignRiskDiff

Group Sequential Design for Two-Sample Risk Difference

getDesignRiskDiffEquiv

Group Sequential Design for Equivalence in Two-Sample Risk Difference

getDesignRiskDiffExact

Power and Sample Size for Exact Unconditional Test for Risk Difference

getDesignRiskDiffExactEquiv

Power and Sample Size for Exact Unconditional Test for Equivalence in ...

getDesignRiskRatio

Group Sequential Design for Two-Sample Risk Ratio

getDesignRiskRatioEquiv

Group Sequential Design for Equivalence in Two-Sample Risk Ratio

getDesignRiskRatioExact

Power and Sample Size for Exact Unconditional Test for Risk Ratio

getDesignRiskRatioExactEquiv

Power and Sample Size for Exact Unconditional Test for Equivalence in ...

getDesignRiskRatioFM

Group Sequential Design for Two-Sample Risk Ratio Based on the Farring...

getDesignSlopeDiff

Group Sequential Design for Two-Sample Slope Difference

getDesignSlopeDiffMMRM

Group Sequential Design for Two-Sample Slope Difference From the MMRM ...

getDesignTwoMultinom

Power and Sample Size for Difference in Two-Sample Multinomial Respons...

getDesignTwoOrdinal

Power and Sample Size for the Wilcoxon Test for Two-Sample Ordinal Res...

getDesignTwoWayANOVA

Power and Sample Size for Two-Way ANOVA

getDesignUnorderedBinom

Power and Sample Size for Unordered Multi-Sample Binomial Response

getDesignUnorderedMultinom

Power and Sample Size for Unordered Multi-Sample Multinomial Response

getDesignWilcoxon

Group Sequential Design for Two-Sample Wilcoxon Test

getDurationFromNevents

Range of Accrual Duration for Target Number of Events

getNeventsFromHazardRatio

Required Number of Events Given Hazard Ratio

getRCI

Repeated Confidence Interval for Group Sequential Design

hd

Integrated Event Probability Over an Interval With Constant Hazard

hedgesg

Hedges' g Effect Size

kmdiff

Estimate of Milestone Survival Difference

kmest

Kaplan-Meier Estimates of Survival Curve

kmpower

Power for Difference in Milestone Survival Probabilities

kmpower1s

Power for One-Sample Milestone Survival Probability

kmpowerequiv

Power for Equivalence in Milestone Survival Probability Difference

kmsamplesize

Sample Size for Difference in Milestone Survival Probabilities

kmsamplesize1s

Sample Size for One-Sample Milestone Survival Probability

kmsamplesizeequiv

Sample Size for Equivalence in Milestone Survival Probability Differen...

kmstat

Stratified Difference in Milestone Survival Probabilities

kmstat1

Milestone Survival Probability by Stratum

kmsurv

Kaplan-Meier Survival Probability Based on Pooled Sample

liferegr

Parametric Regression Models for Failure Time Data

logisregr

Logistic Regression Models for Binary Data

lrpower

Log-Rank Test Power

lrpowerequiv

Power for Equivalence in Hazard Ratio

lrsamplesize

Log-Rank Test Sample Size

lrsamplesizeequiv

Sample Size for Equivalence in Hazard Ratio

lrschoenfeld

Schoenfeld Method for Log-Rank Test Sample Size Calculation

lrsim

Log-Rank Test Simulation

lrsim2e

Log-Rank Test Simulation for Two Endpoints

lrsim2e3a

Log-Rank Test Simulation for Two Endpoints and Three Arms

lrsim3a

Log-Rank Test Simulation for Three Arms

lrstat-package

Power and Sample Size Calculation for Non-Proportional Hazards and Bey...

lrstat

Number of Subjects Having an Event and Log-Rank Statistics

lrstat1

Number of Subjects Having an Event and Log-Rank Statistic for a hypoth...

lrtest

Log-Rank Test of Survival Curve Difference

mnOddsRatioCI

Miettinen-Nurminen Score Confidence Interval for Two-Sample Odds Ratio

mnRateDiffCI

Miettinen-Nurminen Score Confidence Interval for Two-Sample Rate Diffe...

mnRateRatioCI

Miettinen-Nurminen Score Confidence Interval for Two-Sample Rate Ratio

mnRiskDiffCI

Miettinen-Nurminen Score Confidence Interval for Two-Sample Risk Diffe...

mnRiskRatioCI

Miettinen-Nurminen Score Confidence Interval for Two-Sample Risk Ratio

mTPI2Table

mTPI-2 Decision Table

natrisk

Number of Subjects at Risk

nbpower

Power for Negative Binomial Rate Ratio

nbpower1s

Power for One-Sample Negative Binomial Rate

nbpowerequiv

Power for Equivalence in Negative Binomial Rate Ratio

nbsamplesize

Sample Size for Negative Binomial Rate Ratio

nbsamplesize1s

Sample Size for One-Sample Negative Binomial Rate

nbsamplesizeequiv

Sample Size for Equivalence in Negative Binomial Rate Ratio

nbstat

Negative Binomial Rate Ratio

nbstat1

Negative Binomial Rate Ratio by Stratum

nevent

Number of Subjects Having an Event

nevent2

Number of Subjects Having an Event by Calendar Time

param_accrualDuration

Parameter Description: accrualDuration

param_accrualIntensity

Parameter Description: accrualIntensity

param_accrualTime

Parameter Description: accrualTime

param_allocationRatioPlanned

Parameter Description: allocationRatioPlanned

param_alpha

Parameter Description: alpha

param_criticalValues

Parameter Description: criticalValues

param_efficacyStopping

Parameter Description: efficacyStopping

param_estimateHazardRatio

Parameter Description: estimateHazardRatio

param_fixedFollowup

Parameter Description: fixedFollowup

param_followupTime

Parameter Description: followupTime

param_futilityBounds

Parameter Description: futilityBounds

param_futilityStopping

Parameter Description: futilityStopping

param_gamma

Parameter Description: gamma

param_gamma1_stratified

Parameter Description: gamma1_stratified

param_gamma1

Parameter Description: gamma1

param_gamma2_stratified

Parameter Description: gamma2_stratified

param_gamma2

Parameter Description: gamma2

param_hazardRatioH0

Parameter Description: hazardRatioH0

param_informationRates

Parameter Description: informationRates

param_kMax

Parameter Description: kMax

param_lambda

Parameter Description: lambda

param_lambda1_stratified

Parameter Description: lambda1_stratified

param_lambda1

Parameter Description: lambda1

param_lambda2_stratified

Parameter Description: lambda2_stratified

param_lambda2

Parameter Description: lambda2

param_maxFollowupTime

Parameter Description: maxFollowupTime

param_minFollowupTime

Parameter Description: minFollowupTime

param_parameterAlphaSpending

Parameter Description: parameterAlphaSpending

param_parameterBetaSpending

Parameter Description: parameterBetaSpending

param_piecewiseSurvivalTime

Parameter Description: piecewiseSurvivalTime

param_rho1

Parameter Description: rho1

param_rho2

Parameter Description: rho2

param_stratumFraction

Parameter Description: stratumFraction

param_typeAlphaSpending

Parameter Description: typeAlphaSpending

param_typeBetaSpending

Parameter Description: typeBetaSpending

param_typeOfComputation

Parameter Description: typeOfComputation

param_userAlphaSpending

Parameter Description: userAlphaSpending

param_userBetaSpending

Parameter Description: userBetaSpending

patrisk

Probability of Being at Risk

pd

Integrated Event Probability Over an Interval

pevent

Probability of Having an Event

phregr

Proportional Hazards Regression Models

powerFisherExact

Power for Fisher's Exact Test for Two Proportions

powerOnePropExact

Power for Binomial One-Sample Exact Test

powerOneRateExact

Power for Poisson One-Sample Exact Test

powerRiskDiffExact

Power for Exact Unconditional Test of Risk Difference

powerRiskDiffExactEquiv

Power for Exact Unconditional Test of Equivalence in Risk Difference

powerRiskRatioExact

Power for Exact Unconditional Test of Risk Ratio

powerRiskRatioExactEquiv

Power for Exact Unconditional Test of Equivalence in Risk Ratio

print.adaptDesign

Print Adaptive Group Sequential Design

print.BOINTable

Print the Decision Table for the BOIN Design

print.design

Print Group Sequential Design

print.designAgreement

Print Power and Sample Size Results for Cohen's kappa.

print.designANOVA

Print Power and Sample Size Results for One-Way ANOVA

print.designANOVAContrast

Print Power and Sample Size Results for a Single Contrast in One-Way A...

print.designEquiv

Print Group Sequential Equivalence Design

print.designLogistic

Print Power and Sample Size Results for Logistic Regression

print.designMeanDiff

Print Power and Sample Size Results for Two-Sample Mean Difference

print.designMeanDiffCarryover

Print Power and Sample Size Results for Direct Treatment Effects in Cr...

print.designMeanDiffCarryoverEquiv

Print Power and Sample Size Results for Equivalence in Direct Treatmen...

print.designMeanDiffEquiv

Print Power and Sample Size Results for Equivalence in Two-Sample Mean...

print.designMeanDiffMMRM

Print Power and Sample Size Results for Two-Sample Mean Difference at ...

print.designMeanDiffXO

Print Power and Sample Size Results for Mean Difference in 2x2 Crossov...

print.designMeanDiffXOEquiv

Print Power and Sample Size Results for Equivalence in Mean Difference...

print.designMeanRatio

Print Power and Sample Size Results for Two-Sample Mean Ratio

print.designMeanRatioEquiv

Print Power and Sample Size Results for Equivalence in Two-Sample Mean...

print.designMeanRatioXO

Print Power and Sample Size Results for Mean Ratio in 2x2 Crossover

print.designMeanRatioXOEquiv

Print Power and Sample Size Results for Equivalence in Mean Ratio in 2...

print.designOddsRatio

Print Power and Sample Size Results for Two-Sample Odds Ratio

print.designOddsRatioEquiv

Print Power and Sample Size Results for Equivalence in Two-Sample Odds...

print.designOneMean

Print Power and Sample Size Results for One-Sample Mean

print.designOneMultinom

Print Power and Sample Size Results for One-Sample Multinomial Respons...

print.designOneProportion

Print Power and Sample Size Results for One-Sample Proportion

print.designOneSlope

Print Power and Sample Size Results for One-Sample Slope

print.designOrderedBinom

Print Power and Sample Size Results for Cochran-Armitage Trend Test fo...

print.designPairedMeanDiff

Print Power and Sample Size Results for Paired Mean Difference

print.designPairedMeanDiffEquiv

Print Power and Sample Size Results for Equivalence in Paired Mean Dif...

print.designPairedMeanRatio

Print Power and Sample Size Results for Paired Mean Ratio

print.designPairedMeanRatioEquiv

Print Power and Sample Size Results for Equivalence in Paired Mean Rat...

print.designPairedPropMcNemar

Print Power and Sample Size Results for McNemar's Test for Paired Prop...

print.designRepeatedANOVA

Print Power and Sample Size Results for One-Way Repeated Measures ANOV...

print.designRepeatedANOVAContrast

Print Power and Sample Size Results for a Single Contrast in One-Way R...

print.designRiskDiff

Print Power and Sample Size Results for Two-Sample Risk Difference

print.designRiskDiffEquiv

Print Power and Sample Size Results for Equivalence in Two-Sample Risk...

print.designRiskRatio

Print Power and Sample Size Results for Two-Sample Risk Ratio

print.designRiskRatioEquiv

Print Power and Sample Size Results for Equivalence in Two-Sample Risk...

print.designRiskRatioFM

Print Power and Sample Size Results for Two-Sample Risk Ratio Based on...

print.designSlopeDiff

Print Power and Sample Size Results for Two-Sample Slope Difference

print.designSlopeDiffMMRM

Print Power and Sample Size Results for Two-Sample Slope Difference at...

print.designTwoMultinom

Print Power and Sample Size Results for Difference in Two-Sample Multi...

print.designTwoOrdinal

Print Power and Sample Size Results for Wilcoxon Test for Two-Sample O...

print.designTwoWayANOVA

Print Power and Sample Size Results for Two-Way ANOVA

print.designUnorderedBinom

Print Power and Sample Size Results for Unordered Multi-Sample Binomia...

print.designUnorderedMultinom

Print Power and Sample Size Results for Unordered Multi-Sample Multino...

print.designWilcoxon

Print Power and Sample Size Results for Two-Sample Wilcoxon Test

print.estimateCI

Print the Point Estimate and Confidence Interval

print.kmpower

Print Power and Sample Size Results for Milestone Survival Difference

print.kmpower1s

Print Power and Sample Size Results for One-Sample Milestone Survival ...

print.kmpowerequiv

Print Power and Sample Size Results for Equivalence in Milestone Survi...

print.liferegr

Print liferegr Object

print.logisregr

Print logisregr Object

print.lrpower

Print Power and Sample Size Results for Log-Rank Tests

print.lrpowerequiv

Print Power and Sample Size Results for Equivalence in Hazard Ratio

print.lrsim

Print Simulation Results for Log-Rank Tests

print.mTPI2Table

Print the Decision Table for the mTPI-2 Design

print.nbpower

Print Power and Sample Size Results for Negative Binomial Rate Ratio

print.nbpower1s

Print Power and Sample Size Results for One-Sample Negative Binomial R...

print.nbpowerequiv

Print Power and Sample Size Results for Equivalence in Negative Binomi...

print.phregr

Print phregr Object

print.rmpower

Print Power and Sample Size Results for Restricted Mean Survival Time ...

print.rmpower1s

Print Power and Sample Size Results for One-Sample Restricted Mean Sur...

print.rmpowerequiv

Print Power and Sample Size Results for Equivalence in Restricted Mean...

ptpwexp

Distribution Function of Truncated Piecewise Exponential Distribution

pwexpcuts

Piecewise Exponential Approximation to a Survival Distribution

pwexploglik

Profile Log-Likelihood Function for the Change Points in Piecewise Exp...

qrcpp

QR Decomposition of a Matrix

qtpwexp

Quantile Function of Truncated Piecewise Exponential Distribution

remlOddsRatio

REML Estimates of Individual Proportions With Specified Odds Ratio

remlRateDiff

REML Estimates of Individual Rates With Specified Rate Difference

remlRateRatio

REML Estimates of Individual Rates With Specified Rate Ratio

remlRiskDiff

REML Estimates of Individual Proportions With Specified Risk differenc...

remlRiskRatio

REML Estimates of Individual Proportions With Specified Risk Ratio

repeatedPValue

Repeated p-Values for Group Sequential Design

residuals_phregr

Residuals for Proportional Hazards Regression Models

riskDiffExactCI

Exact Unconditional Confidence Interval for Risk Difference

riskDiffExactPValue

P-Value for Exact Unconditional Test of Risk Difference

riskRatioExactCI

Exact Unconditional Confidence Interval for Risk Ratio

riskRatioExactPValue

P-Value for Exact Unconditional Test of Risk Ratio

rmdiff

Estimate of Restricted Mean Survival Time Difference

rmest

Estimate of Restricted Mean Survival Time

rmpower

Power for Difference in Restricted Mean Survival Times

rmpower1s

Power for One-Sample Restricted Mean Survival Time

rmpowerequiv

Power for Equivalence in Restricted Mean Survival Time Difference

rmsamplesize

Sample Size for Difference in Restricted Mean Survival Times

rmsamplesize1s

Sample Size for One-Sample Restricted Mean Survival Time

rmsamplesizeequiv

Sample Size for Equivalence in Restricted Mean Survival Time Differenc...

rmst

Restricted Mean Survival Time

rmstat

Stratified Difference in Restricted Mean Survival Times

rmstat1

Restricted Mean Survival Time by Stratum

rtpwexp

Random Number Generation Function of Truncated Piecewise Exponential D...

runShinyApp_lrstat

Run Shiny App

samplesizeFisherExact

Sample Size for Fisher's Exact Test for Two Proportions

samplesizeOnePropExact

Sample Size for Binomial One-Sample Exact Test

samplesizeOneRateExact

Sample Size for Poisson One-Sample Exact Test

samplesizeRiskDiffExact

Sample Size for Exact Unconditional Test of Risk Difference

samplesizeRiskDiffExactEquiv

Sample Size for Exact Unconditional Test of Equivalence in Risk Differ...

samplesizeRiskRatioExact

Sample Size for Exact Unconditional Test of Risk Ratio

samplesizeRiskRatioExactEquiv

Sample Size for Exact Unconditional Test of Equivalence in Risk Ratio

simon2stage

Simon's Two-Stage Design

simonBayesAnalysis

Analysis of Simon's Bayesian Basket Trials

simonBayesSim

Simulation of Simon's Bayesian Basket Trials

survfit_phregr

Survival Curve for Proportional Hazards Regression Models

survQuantile

Brookmeyer-Crowley Confidence Interval for Quantiles of Right-Censored...

survsplit

Split a survival data set at specified cut points

svdcpp

Singular Value Decomposition of a Matrix

updateGraph

Update Graph for Graphical Approaches

zstatOddsRatio

Miettinen-Nurminen Score Test Statistic for Two-Sample Odds Ratio

zstatRateDiff

Miettinen-Nurminen Score Test Statistic for Two-Sample Rate Difference

zstatRateRatio

Miettinen-Nurminen Score Test Statistic for Two-Sample Rate Ratio

zstatRiskDiff

Miettinen-Nurminen Score Test Statistic for Two-Sample Risk difference

zstatRiskRatio

Miettinen-Nurminen Score Test Statistic for Two-Sample Risk Ratio

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.

  • Maintainer: Kaifeng Lu
  • License: GPL (>= 2)
  • Last published: 2025-03-20