How to maximize survival rates, given one variable? (in R) I'm a radiation oncologist. I have a list of patients. For each patient, I have
D = dose received (in Gray)
T = date of death or last check-up date
S = status (0=alive, 1=dead)
I have 5 years of observation
My questions are :

*

*How can I compute a 2-year and 5-year survival rate in R ? (Kaplan-Meier, I know I need to use the survival library, but I can't find how to get just a rate in %)

*How can I find the threshold dose above wich the survival rate is lowest ?

Thanks for your help !
 A: Question 1. Once you have a survfit object for your data, you can interrogate it with the summary() function at any specified times for survival estimates and standard errors. If your time scale is in years, specify summary(survfitObject, times=c(2,5)) to get survival estimates and confidence intervals at 2 and 5 years.
Question 2. Don't do this, as it will be extremely misleading. There are several reasons.
First, looking for thresholds in a continuous predictor is troublesome in general and throws away important information. See this page among many others here dealing with discretizing continuous variables. It's highly unlikely that any threshold you found in your data would replicate in a new data set. It's much better to fit a continuous predictor flexibly, for example with regression splines, and then plot the model estimates as a function of the predictor.
Second, Cox models have a tendency toward omitted-variable bias. Leaving out any outcome-associated covariate tends to bias the results of the analysis, even if the omitted predictor is uncorrelated with the included predictors.
Third, in your case the radiation doses are almost certainly correlated with other survival-related covariates. Think about how you choose the doses you plan and how patient choice means that the received dose will not always be what you planned. Both of those choices (yours and the patients') are typically based on other outcome-associated characteristics. That confounding of clinical characteristics with the received dose will make results based on received dose alone almost impossible to interpret.
