cp: Conditional power given observed log hazard ratio

View source: R/cp.R

cpR Documentation

Conditional power given observed log hazard ratio

Description

This will calculate the conditional power given the observed log hazard ratio based on Cox model

Usage

cp(Dplan=300,alpha=0.05,two.sided=1,pi1=0.5,Obsbeta=log(seq(1,0.6,by=-0.01)),
   BetaD=log(0.8),Beta0=log(1),prop=seq(0.1,0.9,by=0.1))

Arguments

Dplan

Planned number of events at study end

alpha

Type 1 error rate

two.sided

=1 two-sided test and =0 one-sided test

pi1

Allocation probability for the treatment group

Obsbeta

observed log hazard ratio

BetaD

designed log hazard ratio, i.e. under alternative hypothesis

Beta0

null log hazard ratio, i.e. under null hypothesis

prop

proportion of Dplan observed

Details

This is to calculated conditional power at time point when certain percent of target number of event has been observed and an observed log hazard ratio is provided.

Value

CPT

Conditional power under current trend

CPN

Conditional power under null hypothesis

CPD

Conditional power according to design, i.e. under alternative hypothesis

Note

This will calculate the conditional power given the observed log hazard ratio based on Cox model

Author(s)

Xiaodong Luo

References

Halperin, Lan, Ware, Johnson and DeMets (1982). Controlled Clinical Trials.

See Also

cpboundary,cpstop

Examples

###Calculate the CP at 10-90 percent of the target 300 events when the observed HR 
###are seq(1,0.6,by=-0.01) with 2:1 allocation 
###ratio between the treatment group and the control group
cp(pi1=2/3)

PWEALL documentation built on Aug. 9, 2023, 9:08 a.m.

Related to cp in PWEALL...