Skip to content

Power analysis for Cox regression with a time-varying covariate

5 messages · Greg Snow, Paul Miller, Marc Schwartz

#
Hello All,

Does anyone know where I can find information about how to do a power analysis for Cox regression with a time-varying covariate using R or  some other readily available software? I've done some searching online but haven't found anything. 

Thanks,

Paul
#
For something like this the best (and possibly only reasonable) option
is to use simulation. I have posted on the general steps for using
simulation for power studies in this list and elsewhere before, but
probably never with coxph.

The general steps still hold, but the complicated part here will be to
simulate the data.  I would recommend something along the lines of:

1. generate a value for the censoring time, possibly exponential or
weibull (for simplicity I would make this not dependent on the
covariates if reasonable).
2. generate a value for the covariate for the given time period
(sample function possibly), then generate a survival time for this
covariate value (possibly weibull distribution, or lognormal,
exponential, etc.)  If the survival time is less than the time period
and censoring time then you have an event and a time to the event.  If
the survival time is longer than the censoring time, but not longer
than the time period (for the covariate), then you have censoring and
you can record the time to censoring.  If the survival time is longer
than the time period then you have the row information for that time
period and can move on to the next time period where you will first
randomly choose the covariate value again, then generate another
survival time based on the covariate and given that they have already
survived a given amount.  Continue with this until you have an event
or censoring time for each subject.
On Fri, Jul 13, 2012 at 9:17 AM, Paul Miller <pjmiller_57 at yahoo.com> wrote:

  
    
1 day later
2 days later
#
Hi Greg and Paul,

I had initially contemplated a solution similar to Greg's, which is simulation.

However, I might just throw out, that if based upon Terry's comments, time varying covariates do not impact the power/sample size considerations for the Cox model, then Schoenfeld's 1983 article in Biometrics would be of value:

  Sample-Size Formula for the Proportional-Hazards Regression Model
  David A. Schoenfeld
  Biometrics, Vol. 39, No. 2. (Jun., 1983), pp. 499-503.

Another reference would be:

Sample-Size Calculations for the Cox Proportional Hazards Regression Model with Nonbinary Covariates
F.Y. Hsieh and Philip W. Lavori
Controlled Clinical Trials 21:552?560 (2000


A skillful Google search will find both available online if you don't have access otherwise.

Regards,

Marc Schwartz
On Jul 17, 2012, at 12:33 PM, Greg Snow wrote: