Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Add cumulative censored events to get_risktable.survfit() statlist option #309

Closed
ddsjoberg opened this issue Jan 25, 2022 · 2 comments
Labels
enhancement New feature or request idea To post an idea for a new plot

Comments

@ddsjoberg
Copy link
Collaborator

Idea

What is your idea for a new plot/table?

I would like to add the number of cumulative censored events to get_risktable.survfit() to the list of statistics available to print.

Do you have any examples you can share of what it looks like?

The get_risktable.tidycuminc() variant already has this option.

library(visR)

estimate_cuminc(
  tidycmprsk::trial,
  AVAL = "ttdeath",
  CNSR = "death_cr",
  strata = "trt"
) %>%
  get_risktable(
    statlist = c("n.censor", "cumulative.censor"),
    time = c(0, 20)
  )
#>   time        y_values Drug A Drug B
#> 1    0      N Censored      0      0
#> 2    0 Cum. N Censored      0      0
#> 3   20      N Censored      0      0
#> 4   20 Cum. N Censored      0      0

Created on 2022-01-24 by the reprex package (v2.0.1)

Are you interested to implement this yourself?

Yes, I can implement. I think it will be a simple implementation using cumsum() on the n.censor column. I could also review if someone on the team would prefer to implement themselves.

@ddsjoberg ddsjoberg added enhancement New feature or request idea To post an idea for a new plot labels Jan 25, 2022
@SHAESEN2
Copy link
Collaborator

Hey @ddsjoberg, I am planning to update the risktable functions to create a more proper risktabel #263 at some point as well.

@ddsjoberg
Copy link
Collaborator Author

Thanks @SHAESEN2 ! I just submitted a pull request with the update 🌞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea To post an idea for a new plot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants