How to create Kaplan Meier plot for grouped data?

30 Views Asked by At

do you know a way how to make Kaplan Meier plot for grouped data in R? I do not have invidual data, justa number of newborns, number of people that riched 1,2...12 year. Thanks.

The data are:

data <- tibble::tribble(
      ~age,  ~male, ~female,
        0L, 48415L,  46450L,
        1L, 41292L,  40316L,
        2L, 38717L,  37735L,
        3L, 37310L,  36314L,
        4L, 36318L,  35338L,
        5L, 34996L,  34044L,
        6L, 34022L,  33124L,
        7L, 33378L,  32507L,
        8L, 32807L,  31957L,
        9L, 32341L,  31560L,
       10L, 32054L,  31247L,
       11L, 31847L,  31070L,
       12L, 31633L,  30815L
      )
0

There are 0 best solutions below