Skip to content

Risk Table for weighted competing risks #209

Answered by ddsjoberg
uriahf asked this question in Q&A
Discussion options

You must be logged in to vote

Is this what you're after? If so, be sure you're using the latest survival pkg from CRAN and the ggsurvfit version from here: #208

In the latest survival update, there was a change to how the number censored was returned. CRAN update coming vvv soon.

library(ggsurvfit)
#> Loading required package: ggplot2
packageVersion("survival")
#> [1] '3.6.4'
packageVersion("ggsurvfit")
#> [1] '1.0.0.9002'

survfit2(Surv(ttdeath, death_cr) ~ 1, tidycmprsk::trial, weights = runif(n = nrow(tidycmprsk::trial))) %>%
  tidy_survfit(times = c(0, 12, 24))
#> # A tibble: 6 × 15
#>    time n.risk n.censor cum.event cum.censor n.event estimate std.error conf.low
#>   <dbl>  <dbl>    <dbl>     <dbl>      <dbl>  …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@uriahf
Comment options

Answer selected by uriahf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants