Skip to content
Prev 333450 / 398506 Next

How to stop Kaplan-Meier curve at a time point

On Nov 20, 2013, at 12:01 PM, Dr.Vinay Pitchika wrote:

            
I'm assuming that you have a dataframe with those variables and have attached it. If so, then:

dfrm <- detach(said_df)

# If not, then:

dfrm <- data.frame(Survival_days, Outcome, Gender)

Gender2<-survfit(Surv(Survival_days, Outcome)~Gender, 
                  data=dfrm, subset = Survival_days < 6*365.25 )
David Winsemius
Alameda, CA, USA