cp | R Documentation |
This will calculate the conditional power given the observed log hazard ratio based on Cox model
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))
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 |
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.
CPT |
Conditional power under current trend |
CPN |
Conditional power under null hypothesis |
CPD |
Conditional power according to design, i.e. under alternative hypothesis |
This will calculate the conditional power given the observed log hazard ratio based on Cox model
Xiaodong Luo
Halperin, Lan, Ware, Johnson and DeMets (1982). Controlled Clinical Trials.
cpboundary
,cpstop
###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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.