therneau / survival

Survival package for R
394 stars 106 forks source link

`survfit` plot KM curve with only n-1 points #281

Closed EQUIWDH closed 1 week ago

EQUIWDH commented 1 month ago

Hello, I am trying to use fit <- survfit(survival::Surv(time, delta) ~ 1) for returning individual KM estimation $\hat{S}_i(T_i)$. Because of the data is driven for simulation, there is no tie for time. I found that fit[["surv"]] only give me $n-1$ points. Could u please help me on this?

therneau commented 1 month ago

No example is given and I am not clairvoyant. But I would suggest you look at the timefix argument. (?survfit.formula)

From: Fulong Jin @.> Date: Monday, September 23, 2024 at 8:37 AM To: therneau/survival @.> Cc: Subscribed @.***> Subject: [EXTERNAL] [therneau/survival] survfit plot KM curve with only n-1 points (Issue #281)

Hello, I am trying to use fit <- survfit(survival::Surv(time, delta) ~ 1) for returning individual KM estimation $\hat{S}_i(T_i)$. Because of the data is driven for simulation, there is no tie for time. I found that fit[["surv"]] only give me $n-1$ points. Could u please help me on this?

— Reply to this email directly, view it on GitHubhttps://github.com/therneau/survival/issues/281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACJ3PGJZNEK4R7LYGO5YJJTZYAKRLAVCNFSM6AAAAABOWDM4FSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DENRYGUYTENA. You are receiving this because you are subscribed to this thread.Message ID: @.***>