search for: usercurv

Displaying 1 result from an estimated 1 matches for "usercurv".

Did you mean: usercurve
2012 Jul 18
0
Building a web risk calculator based on Cox, PH--definitive method for calculating probability?
Here is an example of how to do it. > library(survival) > vfit <- coxph(Surv(time, status) ~ celltype + trt, data=veteran) > userinput <- data.frame(celltype="smallcell", trt = 1) > usercurve <- survfit(vfit, newdata=userinput) #the entire predicted survival curve > user2 <- summary(usercurve, time= 2*365.25) # 2 year time point > user2$surv [1] 0.0007438084 Some comments: 1. The summary function for survival curves was written so that people could print out shor...