Re: [R] coxph and remaing events

From: Federico Calboli <>
Date: Tue, 15 Jun 2010 19:04:39 +0100

On 15 Jun 2010, at 18:34, Federico Calboli wrote:
> I'm running a cox ph model on a dataset with a number of variables. Each variable has a different number of missing data, so that coxph() drops the individuals who are missing data at one or more variables. Because of this dropping (totally fine btw) I want to know how many events I am left with in the model. Is there a way of extracting them from the coxph() fit? or in any other reasonably efficient way?

I just noticed that


does work for a cox model with 1 only variable turned into a strata()

(survfit(coxph(time, death) ~ strata(variable), data)))

which does more or less what I need


Federico C. F. Calboli
Department of Epidemiology and Biostatistics
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t]
f.calboli [.a.t]

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 15 Jun 2010 - 18:08:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jun 2010 - 18:30:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive