[R] Power analysis for Cox regression with a time-varying covariate

Terry Therneau therneau at mayo.edu
Wed Jul 18 15:24:03 CEST 2012


Marc gave the referencer for Schoenfeld's article.  It's actually quite 
simple.

Sample size for a Cox model has two parts:
  1. Easy part: how many deaths to I need

       d = (za + zb)^2 / [var(x) * coef^2]

       za = cutoff for your alpah, usually 1.96 (.05 two-sided)
       zb = cutoff for power, often 0.84 = qnorm(.8) = 80% power
       var(x) = variance of the covariate you are testing.  For a yes/no 
variable like treatment this would be p(1-p) where p = fraction on the 
first arm
       coef = the target coefficient in your Cox model.  For an 
"increase in survival of 50%" we need exp(coef)=1.5 or coef=.405

All leading to the value I've memorized by now of (1.96 + 0.84)^2 /(.25* 
.405^2) = 191 deaths for a balanced two arm study to detect a 50% 
increase in survival.

  2. Hard part: How many patients will I need to recruit, over what 
interval of time, and with how much total follow-up to achieve this 
number of events?
    I never use the canned procedures for sample size because this 
second part is so study specific.  And frankly, it's always a 
guesstimate.  Death rates for a condidtion will usually drop by 1/3 as 
soon as you start enrolling subjects.

Terry T.



More information about the R-help mailing list