[R] Building a web risk calculator based on Cox PH--definitive method for calculating probability?
jahan.mohiuddin at gmail.com
Tue Jul 17 16:13:29 CEST 2012
I am a medical student and as a capstone for my summer research project I am
going to create a simple online web "calculator" for users to input their
relevant data, and a probability of relapse within 5 years will be computed
and returned based on the Cox PH model I have developed.
The issue I'm having is finding a definitive method/function to feed the
user's "newdata" and return the probability of relapse within 5 years. I
have googled this and the answers seems to be inconsistent; I have variously
seen people recommend survest(), survfit(), and predict.coxph(). Terry had
a useful answer
here but I didn't quite understand what he meant in his last sentence.
Here is some code for you to quickly illustrate what you suggest.
vetcoxph=coxph(obj~celltype+trt,data=veteran) #I will fit models from
both the survival and rms packages so you can
#use what you like
#let's say the user inputted that their cell type was smallcell and their
treatment was "1".
I really appreciate your recommendations
View this message in context: http://r.789695.n4.nabble.com/Building-a-web-risk-calculator-based-on-Cox-PH-definitive-method-for-calculating-probability-tp4636749.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help