[R] Cox regression model for matched data with replacement

Therneau, Terry M., Ph.D. therneau at mayo.edu
Mon Jun 23 14:51:41 CEST 2014

On 06/23/2014 05:00 AM, r-help-request at r-project.org wrote:
> My problem was how to build a Cox model for the matched data (1:n) with
> replacement. Usually, we can use stratified Cox regression model when the
> data were matched without replacement. However, if the data were matched
> with replacement, due to the re-use of subjects, we should give a weight
> for each pair, then how to incorporate this weight into a Cox model. I also
> checked the "clogit" function in survival package, it seems suitable to the
> logistic model for the matched data with replacement, rather than Cox
> model. Because it sets the time to a constant. Anyone can give me some
> suggestions?

You don't need to worry.  In an ordinary Cox model controls are "reused" at each death 
time; very early on this caused some concern but the theory has been worked out in 
multiple ways.  In your example a random sample is taken from each of the potential 
control sets, which preserves the underlying martingale theory.
   If you are still concerned then add " + cluster(id)" to the model statement to force a 
GEE type variance estimate, where id is a variable that identifies individual subjects.

Terry Therneau

More information about the R-help mailing list