Dear useRs,

What is the syntax to obtain survival curves for single strata on many subjects?

I have a model based on Surv(time,response) object, so there is a single row 
per subject and no start,stop and no switching of strata.

The newdata has many subjects and each subject has a strata and the survival 
based on the subject risk and the subject strata is needed.

If I do

newpred <- survfit(cph.approve,new=newapp,se=F)

I get all strata for every subject.

Attempting

> newpred <- survfit(cph.approve,new=newapp,id=CertId,se=F)
Error in survfit.coxph(cph.approve, new = newapp, id = CertId, se = F) : 
  The individual option is  only valid for start-stop data
> newpred <- survfit(cph.approve,new=newapp,indi=T,se=F)
Error in survfit.coxph(cph.approve, new = newapp, indi = T, se = F) : 
  The individual option is  only valid for start-stop data

Please, advise if obtaining a single strata for a basic (time,response) model 
is possible? Due to differing lengths of the surv for different strata this 
will not go in a "wide" data.frame without padding.

Thanks everybody and have a great day.

Stephen B

______________________________________________
R-help@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.

Reply via email to