Description Usage Arguments Value References Examples
This function calculates the conditional power at an interim analysis of a 
clinical trial
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 
| r | Proportion of subjects assigned to active group | 
| n1 | Number of patients / events at first interim analysis (NULL if parameter f provided) | 
| n2 | Number of patients / events at final analysis (NULL if parameter f provided) | 
| alpha_1s | one-sided alpha | 
| eff_est | effect observed/estimated at interim | 
| eff_planned | planned effect (usually alternative hypothesis, but can be modified to obtain  | 
| eff_null | effect corresponding with null hypothesis (e.g. 1 for hazard rates, 0 for difference)  | 
| SE | standard error: has to be provided if type not equal to "HR". If for instance SE =1  | 
| type | if type="HR", then SE is calculated, if type="general", then SE's have to be provided  | 
| pow | Power, needed to calculate sample size in second part provided to obtain given power | 
| f | n1/n2 at interim analysis. Only to be provided if n1 and n2 not provided | 
a list of three vectors
 CP_obs : conditional power, given 1) observed effect at interim, 2) total sample size, 
3) Assumed true effect= "eff_est" parameter
#' 
 CP_planned : conditional power, given 1) observed effect at interim, 2) total sample size, 
3) Assumed true effect= "eff_planned" parameter
#' 
n2_inc_new : additional patients needed to obtain given power
Lan and Wittes. The B-Value: A Tool for Monitoring Data. Biometrics 1988;44:579-585 
Mehta CR, Pocock SJ. Adaptive increase in sample size when interim results are promising: A practical 
guide with examples. Statist. Med. 2011;30:3267–3284
| 1 2 3 4 5 6 | CP(r=0.5,n1=72 ,n2=180,alpha_1s=0.025,eff_est=0.7,eff_planned=0.7 ,eff_null=1,SE=NULL,
   type="HR",pow=0.8)
CP(r=0.5              ,alpha_1s=0.025,eff_est=1.5,eff_planned=1.96,eff_null=0,SE=1,
   type="general",pow=0.8,f=0.5)
CP(r=0.5,n1=316,n2=633,alpha_1s=0.025,eff_est=1.5,eff_planned=1.96,eff_null=0,SE=1,
   type="general",pow=0.8)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.