I have fitted a coxph model with time dependent variable of weight and time independent variables as following:
id start stop death weight age smoke
1 0 1 0 60 60 0
2 0 1 0 55 57 1
2 1 2 1 60 58 1
...
mod <- coxph(Surv(start, stop, death) ~ weight + age + factor(smoke) + cluster(id),
data=data)
I want to plot the effect of weight on survival curve, the plot could have 2 survival curves, one for weight 60, the other for weight 80, which indicates the effect of increasing weight on the curve.
How do I make this plot?