Plot of probability of 1-year survival event vs. variable value? Would be derived from a Cox model I am hoping to plot the probability of a patient surviving to 1 year without progression (status==0) vs. the value of a continuous variable (radiation.dose). This would be based on a univariate cox proportional hazards model. I've Googled this and can't find anyone who has done this before.  What I imagine is similar axes to this logistic regression plot: Logistic probability vs. variable
Here is some sample code for you to work with:
library("survival")
require("survival")

days <- rpois(100, 365)
status <- rbinom(100,1,0.34)
radiation.dose <- sapply(status,function(x){ifelse(x==0,rnorm(1,80,20),rnorm(1,60,20))})

df<-data.frame(days,status,radiation.dose)
mod<-Surv(df$days,df$status)
cox.mod<-coxph(mod~radiation.dose,data=df)

Thank you for your help!
 A: I'm just thinking out loud here, I'm posting this as an answer instead of a comment for better formatting.
According to the help file on predict.coxph, "The survival probability for a subject is equal to exp(-expected)." So we can predict the survival probability
cox.pred<- exp(-predict(cox.mod, type = "expected"))
plot(radiation.dose, cox.pred)


A: The answer given by @Ron Jensen is incorrect. By simply calling the predict function without specifying the newdata argument, you are predicting the survival probability given the radiation.dose and the observed value of time. You can easily see this because there is no clear relationship in your plot, which has to be the case since you used a cox-regression model.
If you want to plot the survival probability at t as a function of a continuous variable based on a cox-model, you can instead use the contsurvplot package (https://cran.r-project.org/package=contsurvplot) I created. Using your example, you can do it like this:
library(survival)
library(contsurvplot)

set.seed(42)

days <- rpois(100, 365)
status <- rbinom(100, 1, 0.34)
radiation.dose <- sapply(status,function(x){ifelse(x==0, rnorm(1,80,20), rnorm(1,60,20))})

df <- data.frame(days,status,radiation.dose)
mod <- cox.mod<-coxph(Surv(days, status) ~ radiation.dose, data=df, x=TRUE)

plot_surv_at_t(time="days",
               status="status",
               variable="radiation.dose",
               data=df,
               model=cox.mod,
               t=365)


By specifying t = 365, you're telling the plot_surv_at_t function to use the survival probability at 1 year.
Since there are no other independent variables in this cox model, this is equivalent to using:
vals <- seq(min(df$radiation.dose), max(df$radiation.dose), 1)

newdata <- data.frame(radiation.dose=vals,
                      days=365,
                      status=0)

p <- predict(cox.mod, type="surv", newdata=newdata)

plot(vals, p)


If there is no specific reason to use one value of time, I would however recommend to use survival area plots or survival contour plots instead, as described in detail in this preprint: https://arxiv.org/pdf/2208.04644.pdf
