I struggle with R ....How do I cut out the observations from 10- 25 years to make a Kaplan meier plot for up to 10 years:
what would I add to this line of code? Or would I Need to make separate groups for 0-1 year, 1-2 years and so on?
km.model <- survfit(Survival(Time, Diabetes) ~ Over40, type = "Kaplan-Meier")
plot(km.model, conf.int = F, lab = "Time(years)", lab = %Notdiabetic = S(t), main = "KM-Model")