
Table with survival events
riskTable.Rd
Table with survival events
Arguments
- x
Result from estimateSingleEventSurvival or estimateCompetingRiskSurvival.
- eventGap
Event gap defining the times at which to report the risk table information. Must be one of the eventGap inputs used for the estimation function. If NULL, all available are reported.
- header
A vector containing which elements should go into the header. Allowed are: cdm_name, group, strata, additional, variable, estimate, and settings.
- type
Type of desired formatted table, possibilities: "gt", "flextable", and "tibble".
- groupColumn
Columns to use as group labels.
- style
Named list that specifies how to style the different parts of the table generated. It can either be a pre-defined style ("default" or "darwin" - the latter just for gt and flextable), NULL to get the table default style, or custom. Keep in mind that styling code is different for all table styles. To see the different styles check visOmopResults::tableStyle().
- .options
Named list with additional formatting options. CohortSurvival::optionsTableSurvival() shows allowed arguments and their default values.
Value
A tibble containing the risk table information (n_risk, n_events, n_censor) for all times within the event gap specified.
Examples
# \donttest{
cdm <- mockMGUS2cdm()
surv <- estimateSingleEventSurvival(cdm,
targetCohortTable = "mgus_diagnosis",
outcomeCohortTable = "death_cohort")
#> - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort
#> 'death_cohort'
#> Getting overall estimates
#> `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and
#> `minimum_survival_days` casted to character.
riskTable(surv)
# }