Message-ID: <200612221406.kBME6Ai28487@hsrnfs-101.mayo.edu>
Date: 2006-12-22T14:06:09Z
From: Terry Therneau
Subject: newbie estimating survival curve w/ survfit for coxph
fit <- coxph(Surv(futime,fustat)~ age +strata(rx), data=ovarian,
subset=1:23)
curves <- survfit(fit, newdata=ovarian[24:26,])
I don't think this is mentioned in the documentation (I'll have to fix that!),
but subscripting works for survfit objects. In this case there are 2 strata
and 3 subjects, and
curves[1,2] will return the survival curve for strata 1, subject 2.
curves[2,1] will return the survival curve for strata 2, subject 1,
etc.
Terry Therneau