[R] question about survival datas with repeated mesurements
Thomas Lumley
tlumley at u.washington.edu
Thu Jan 10 20:22:55 CET 2002
On Thu, 10 Jan 2002, [iso-8859-1] françoise Hennequin wrote:
> I have to study censured datas concernig the occurence of infection at
> the point of insertion of catheter in patients with renal disease.
> Catheter may be removed for ather reasons than infection, in this case,
> the observation is censored. Each has exactly 2 observations. The
> question are the pronostic factors of infection (the other variables
> are; age, sex, type of renal disease...). Could you indicate me what is
> the R function to use in case of repeated consored datas? Than you very
> much..
I assume that you are interested in the relationships between time to
infection and the prognostic factors (rather than being interested
primarily in the amount of correlation within a person, for example)
The cluster() feature in coxph() is designed for this sort of data.
If you have two records per person with eg
id time status age
1 50 1 66
1 40 0 66
2 80 0 75
2 70 1 75
...
then you can do
coxph(Surv(time,status)~age+cluster(id))
to model the marginal rates of infection. That much is easy. The tricky
part is that there are several ways to code the times.
If you have two catheters being infected at, say, 50 and 70 days from the
start of the study you could code the two times as 50 and 70, or 50 and
20. You could also code two time intervals [0,50] and [50,70] by
specifying an entry time for each record
id time status
1 50 1
1 70 1
id time status
1 50 1
1 20 1
id entry exit status
1 0 50 1
1 50 70 1
(in this case you would use Surv(entry,exit,status) in the model formula.
If you aren't sure about this then one place to look is a nice review
paper by Therneau & Hamilton in "Statistics in Medicine" 16: 2029--2047
(and some other useful papers in that issue of the journal).
-thomas
Thomas Lumley Asst. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list