
This function is used to summarise the dose table over multiple cohorts.
summariseTreatmentFromConceptSet.RdThis function is used to summarise the dose table over multiple cohorts.
Usage
summariseTreatmentFromConceptSet(
cohort,
window,
treatmentConceptSet,
strata = list(),
indexDate = "cohort_start_date",
censorDate = NULL,
combination = FALSE,
minCellCount = lifecycle::deprecated()
)Arguments
- cohort
Cohort with drug use variables and strata.
- window
Window where to summarise the treatments.
- treatmentConceptSet
Concept set list to summarise.
- strata
Stratification list.
- indexDate
Variable in x that contains the date to compute the intersection.
- censorDate
Whether to censor overlap events at a specific date or a column date of x. If NULL, end of observation will be used.
- combination
Whether to include combination treatments.
- minCellCount
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
Examples
# \donttest{
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
cdm$cohort1 |>
summariseTreatmentFromConceptSet(
treatmentConceptSet = list("a" = 1503327, "c" = 43135274, "b" = 2905077),
window = list(c(0, Inf))
)
#> ℹ The following estimates will be computed:
#> • window1_a: count, percentage
#> • window1_b: count, percentage
#> • window1_c: count, percentage
#> • window1_untreated: count, percentage
#> → Start summary of data, at 2024-07-24 10:29:01.987882
#> ✔ Summary finished, at 2024-07-24 10:29:02.059671
#> # A tibble: 24 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 DUS MOCK cohort_name cohort_1 overall overall
#> 2 1 DUS MOCK cohort_name cohort_1 overall overall
#> 3 1 DUS MOCK cohort_name cohort_1 overall overall
#> 4 1 DUS MOCK cohort_name cohort_1 overall overall
#> 5 1 DUS MOCK cohort_name cohort_1 overall overall
#> 6 1 DUS MOCK cohort_name cohort_1 overall overall
#> 7 1 DUS MOCK cohort_name cohort_1 overall overall
#> 8 1 DUS MOCK cohort_name cohort_1 overall overall
#> 9 1 DUS MOCK cohort_name cohort_2 overall overall
#> 10 1 DUS MOCK cohort_name cohort_2 overall overall
#> # ℹ 14 more rows
#> # ℹ 7 more variables: variable_name <chr>, variable_level <chr>,
#> # estimate_name <chr>, estimate_type <chr>, estimate_value <chr>,
#> # additional_name <chr>, additional_level <chr>
# }