Skip to contents

Table of incidence results

Usage

tableIncidence(
  result,
  type = "gt",
  header = c("estimate_name"),
  groupColumn = character(),
  settingsColumn = omopgenerics::settingsColumns(result),
  hide = character(),
  .options = list(),
  settingsColumns = lifecycle::deprecated()
)

Arguments

result

Incidence results

type

Type of table. Can be "gt", "flextable", or "tibble"

header

A vector specifying the elements to include in the header. The order of elements matters, with the first being the topmost header. The header vector can contain one of the following variables: "cdm_name", "denominator_cohort_name", "outcome_cohort_name", "incidence_start_date", "incidence_end_date", "estimate_name", variables in the strata_name column, and any of the settings columns specified in settingsColumn argument. The header can also include other names to use as overall header labels

groupColumn

Variables to use as group labels. Allowed columns are the same as in header

settingsColumn

Variables from the settings atribute to dispaly in the table

hide

Table columns to exclude, options are the ones described in header

.options

Table options to apply

settingsColumns

[Deprecated]

Value

Table of results

Examples

# \donttest{
cdm <- mockIncidencePrevalence(sampleSize = 1000)
cdm <- generateDenominatorCohortSet(
  cdm = cdm, name = "denominator",
  cohortDateRange = c(as.Date("2008-01-01"), as.Date("2018-01-01"))
)
#>  Creating denominator cohorts
#>  Cohorts created in 0 min and 3 sec
inc <- estimateIncidence(
  cdm = cdm,
  denominatorTable = "denominator",
  outcomeTable = "outcome"
)
#> Getting incidence for analysis 1 of 1
#> Overall time taken: 0 mins and 1 secs
tableIncidence(inc)
Database name Denominator cohort name Outcome cohort name Incidence start date Incidence end date Analysis interval Analysis complete database intervals Analysis outcome washout Analysis repeated events Denominator age group Denominator days prior observation Denominator end date Denominator sex Denominator start date Denominator target cohort name Denominator time at risk
Estimate name
Denominator (N) Person-years Outcome (N) Incidence 100 person-years [95% CI]
mock denominator_cohort_1 cohort_1 2008-01-01 2008-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 42 33.05 9 27,230.64 (12,451.58 - 51,692.24)
2009-01-01 2009-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 38 28.74 13 45,229.98 (24,083.06 - 77,344.64)
2010-01-01 2010-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 25 19.69 8 40,623.57 (17,538.37 - 80,044.63)
2011-01-01 2011-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 17 11.57 7 60,485.61 (24,318.35 - 124,623.48)
2012-01-01 2012-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 10 9.86 1 10,137.88 (256.67 - 56,484.62)
2013-01-01 2013-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 9 8.74 1 11,446.89 (289.81 - 63,777.97)
2014-01-01 2014-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 8 6.36 2 31,461.38 (3,810.12 - 113,649.33)
2015-01-01 2015-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 6 3.86 4 103,761.35 (28,271.48 - 265,670.26)
2016-01-01 2016-12-31 years TRUE inf FALSE 0 to 150 0 2018-01-01 Both 2008-01-01 None 0 to Inf 2 1.11 1 90,415.91 (2,289.13 - 503,765.23)
# }