simplePower: Power Calculation Based on Provided Number of Events And...

View source: R/simplePower.R

simplePowerR Documentation

Power Calculation Based on Provided Number of Events And Rejection Boundary in Group Sequential Design

Description

This function calculates the power for the given number of events and rejection boundary at each analysis for group sequential design

Usage

simplePower(
  events = c(126, 210),
  events0 = NULL,
  events1 = NULL,
  hr = 0.6,
  r = 0.5,
  bd.p = NULL,
  sf = gsDesign::sfLDOF,
  alpha = 0.025,
  variance = "H0"
)

Arguments

events

A vector of target events for IAs and FA

events0

A vector of target events for IAs and FA for control arm. Required when variance option is H1.

events1

A vector of target events for IAs and FA for experimental arm Required when variance option is H1.

hr

Hazard ratio (smaller better)

r

Proportion of experimental arm subjects among all subjects

bd.p

A vector of rejection bound in one-sided p value. When bd.p is specified, sf and alpha are ignored.

sf

Alpha spending function. Default sf = gsDesign::sfLDOF, i.e., LanDeMets implementation of O'Brien Fleming spending function.

alpha

Overall alpha for the test in the group sequential design. Default, alpha = 0.025. Alpha must be one-sided. When bd.p is specified, alpha will be re-calculated. Required when bd.p is not specified.

variance

Option for variance estimate. "H1" or "H0". Default H1, which is usually more conservative than H0.

Value

  • events Target events at each analysis

  • bd Rejection ounds at each analysis

  • marg.power Marginal power at each analysis

  • cum.power Cumulative power by each analysis

  • overall.power Overall power

  • CV Critical value (minimum detectable difference)

  • corr Correlation matrix

Examples


#(1) O'Brien Fleming alpha spending, variance under H0
simplePower(events=c(126, 210), events0=NULL, events1=NULL, 
                        hr = 0.6, r = 0.5, 
                        bd.p=NULL, sf=gsDesign::sfLDOF, 
                        alpha=0.025, variance="H0")
#(2) O'Brien Fleming alpha spending, variance under H1
simplePower(events=c(126, 210), events0=c(66,115), events1=c(60,95), 
                        hr = 0.6, r = 0.5, 
                        bd.p=NULL, sf=gsDesign::sfLDOF, 
                        alpha=0.025, variance="H1")

#(3) Customized rejection bounds, variance under H1
simplePower(events=c(126, 210), events0=c(66,115), events1=c(60,95), 
                        hr = 0.6, r = 0.5, 
                        bd.p=c(0.004,0.024), sf=NULL, 
                        alpha=NULL, variance="H1")
simplePower(events=c(208, 287), events0=c(66,115), events1=c(60,95), 
                        hr = 0.6, r = 0.5, 
                        bd.p=c(0.016933/2,0.044898/2), sf=NULL, 
                        alpha=NULL, variance="H0")
simplePower(events=c(231, 287), events0=c(66,115), events1=c(60,95), 
                        hr = 0.6, r = 0.5, 
                        bd.p=c(0.016933/2,0.044898/2), sf=NULL, 
                        alpha=NULL, variance="H0")
                        

phe2189/corrTests documentation built on Oct. 7, 2022, 11:13 a.m.