Published

July 6, 2025

Characterise your own cohort

Please use the provided code in Practical.R to create the cdm reference to the GiBleed database and follow the steps:

  1. Create codelists of interest:
  • drugs codelists: aspirin, amoxicillin, acetaminophen, ibuprofen, … (Add more if you want)
  • conditions codelists: headache, sinusitis, pharyngitis, bronchitis, Osteoarthritis, … (Add more if you want)
  1. Create cohort of interest:
  • All records of aspirin.
  • Collapse them with a gap of 30 days.
  • First record ever.
  • Prior observation of at least 365 days.
  1. Display attrition in a diagram.

  2. Characteristic the cohort of interest, please include in the characterisation the following:

  • Demographics
  • Number of visits in the prior year ([-365, -1])
  • Number of drugs prescribed in the month prior ([-30, -1])
  • % of conditions of interest any time prior ([-Inf, -1])
  • % of medication of interest in the prior year ([-365, -1])
  1. Run large scale characterisation for you cohort of interest using the following tables: condition_occurrence and drug_exposure, and windows: [-365, -1], [-30, -1], [1, 30], [1, 365]. Compare the results of the two analogous windows which are the concepts that have bigger SMDs. Are you able to cretae the plot comparing LSC?