summariseIndication {DrugUtilisation} | R Documentation |
This function is used to summarise the indication table over multiple cohorts.
Description
This function is used to summarise the indication table over multiple cohorts.
Usage
summariseIndication(
cohort,
cdm = lifecycle::deprecated(),
strata = list(),
minCellCount = lifecycle::deprecated()
)
Arguments
cohort |
Cohort with indications and strata |
cdm |
cdm_reference created by CDMConnector |
strata |
Stratification list |
minCellCount |
Minimum counts that a group can have. Cohorts with less counts than this value are obscured. |
Value
A Tibble with 4 columns: cohort_definition_id, variable, estimate and value. There will be one row for each cohort, variable and cohort combination.
Examples
library(DrugUtilisation)
library(PatientProfiles)
library(CodelistGenerator)
cdm <- mockDrugUtilisation()
indications <- list("headache" = 378253, "asthma" = 317009)
cdm <- generateConceptCohortSet(cdm, indications, "indication_cohorts")
acetaminophen <- getDrugIngredientCodes(cdm, "acetaminophen")
cdm <- generateDrugUtilisationCohortSet(cdm, "drug_cohort", acetaminophen)
cdm[["drug_cohort"]] <- cdm[["drug_cohort"]] %>%
addIndication(
indicationCohortName = "indication_cohorts",
indicationGap = c(0, 30, 365)
)
summariseIndication(cdm[["drug_cohort"]])
cdm[["drug_cohort"]] <- cdm[["drug_cohort"]] %>%
addAge(ageGroup = list("<40" = c(0, 39), ">=40" = c(40, 150))) %>%
addSex()
summariseIndication(
cdm[["drug_cohort"]], strata = list(
"age_group" = "age_group", "age_group and sex" = c("age_group", "sex")
)
)
[Package DrugUtilisation version 0.6.0 Index]