[R] coxph and remaing events
Federico Calboli
f.calboli at imperial.ac.uk
Tue Jun 15 20:04:39 CEST 2010
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
(survfit(coxmodel))
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
F
--
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] imperial.ac.uk
f.calboli [.a.t] gmail.com
More information about the R-help
mailing list