Hello,
 
When I try to to obtain the expected risk for a new dataset using coxph in the 
survival package I get an error. Using the example from ?coxph:
 
> test1 <- list(time=  c(4, 3,1,1,2,2,3),+                 
> status=c(1,NA,1,0,1,1,0),+                 x=     c(0, 2,1,1,1,0,0),+         
>         sex=   c(0, 0,0,0,1,1,1))> cox<-coxph( Surv(time, status) ~ x + 
> strata(sex), test1)  #stratified model> > new<-list(time=  c(5, 
> 1,1,2,2,4,3),+                 status=c(1,NA,1,0,0,1,1),+                 x=  
>    c(0, 2,1,1,1,0,0),+                 sex=   c(0, 0,0,0,1,1,1))> > 
> predict(cox,new,type="expected")Error in predict.coxph(cox, new, type = 
> "expected") :   Method not yet finished
 
I assume that this is something that has simply not yet been incorporated into 
the survival package. Does anyone know of a way to calculate the expected risk 
for a new data set? Is this even possible? I would appreciate any help that you 
could give me.
 
Cheers,
Reid
 
 
 
_________________________________________________________________


        [[alternative HTML version deleted]]

______________________________________________
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