[R] Surv(): Stop time must be > start time, NA created

Dimitris Rizopoulos d.rizopoulos at erasmusmc.nl
Fri Jun 3 12:27:50 CEST 2011


this sounds like a competing risks problem. Maybe you would be 
interested in a cause-specific hazard regression or the Fine & Gray 
model (http://cran.r-project.org/package=cmprsk).

Recently there was also a special issue in JSS on this topic 
(http://www.jstatsoft.org/v38).

I hope it helps.

Best,
Dimitris


On 6/3/2011 12:17 PM, Federico Calboli wrote:
> I am writing to get a better handle on a warning I am getting from a coxph analysis I am doing.
>
> I am analysing age of onset of dementia *after* the onset of parkinson disease. My data looks like:
>
>    age.park age.dem age.death censor x1 x2   x3   x4
> 1       76      87        88      0 16 33   E3   E3
> 2       75      84        84      0 33 36   E3   E3
> 3       77      81        81      1 NA NA<NA>  <NA>
> 4       65      65        69      0 NA NA   E4   E4
> 5       56      76        79      0 NA NA<NA>  <NA>
> 6       62      72        72      1 NA NA<NA>  <NA>
> ...
>
> Obviously some individuals (lines 1,2,5) will first develop parkinson, then a few years later, dementia. Some individuals will not develop dementia (lines 3 and 6, where age of death and age of dementia correspond, but the censor variable is 1). Some (more) unluky individuals develop parkinson and dementia at the same time (line 4).
>
> my coxph model looks like
>
> coxph(Surv(age.mot,age.dem, censor) ~ x1 + x2 + x3 + x4, mydata)
>
> and I get the warning:
>
> In Surv(age.mot, age.dem, censor) :
>    Stop time must be>  start time, NA created
>
> I am almost sure that this is due to the instances where age.park == age.dem, but there is nothing I can really do. So my question:
>
> how do I deal with the instances where age.park == age.dem in order to keep those individuals in the analysis and to get sensible results?
>
> Best wishes
>
> Federico
>
>
>
>
> --
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Dimitris Rizopoulos
Assistant Professor
Department of Biostatistics
Erasmus University Medical Center

Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
Tel: +31/(0)10/7043478
Fax: +31/(0)10/7043014
Web: http://www.erasmusmc.nl/biostatistiek/



More information about the R-help mailing list