Executing an Observational Study

Observational studies using real-world data (RWD) are essential for understanding disease, treatment effectiveness, and patient outcomes. The OMOP Common Data Model (CDM) provides a global standard for structuring this data, enabling transparent and reproducible research.

To harness the power of the OMOP CDM, a suite of specialized R packages has been developed. These packages provide a robust, modular framework for every stage of a study. Using this standardized toolkit ensures that research is not only efficient but also adheres to the highest scientific standards, as promoted by regulatory bodies like the European Medicines Agency (EMA) through initiatives such as DARWIN EU.

This section is divided into key guides to help you navigate this ecosystem:

  1. Foundations: If you want to understand the foundational principles of clinical research design, evidence hierarchies, methodological biases, data taxonomies, and legal governance, start here.
  2. The Conceptual Guide to OMOP (The “Why”): If you want to understand how clinical ideas are translated into computable definitions and cohort definitions for observational research, start here. (For data engineering, ETL, and AI models, see Data Enablement).
  3. The Practical Guide (The “How”): If you are ready to start writing code and want a step-by-step walkthrough of a typical analysis workflow, from connecting to the database to generating final results, this guide is for you.
  4. The Tool Reference (The “What”): This guide provides a comprehensive overview of the available R packages, categorized by their purpose.
  5. The Study Templates (The “How To”): This section contains complete, executable examples of different types of observational studies.
  6. Troubleshooting: Solutions to common setup, installation, database connection, and runtime errors.

Package Categories and Purposes

Below is a categorized list of the core R packages you will use.

Foundation Layer

These are the core packages that establish the connection to the database and provide the basic infrastructure for all other operations.

Library Purpose
omopgenerics Provides a common set of classes and methods to ensure interoperability between different OHDSI packages.
CDMConnector Establishes and manages the connection to an OMOP CDM database, creating the cdm object.
omock A utility for creating mock cdm objects for testing and development purposes.

Cohort Generation & Infrastructure Layer

These packages are used to define, construct, and manage patient populations (cohorts) and CDM tables that form the basis of any study.

Library Purpose
CodelistGenerator Creates codelists (sets of medical codes) from OMOP concept sets.
CohortConstructor Builds patient cohorts from codelists and other criteria, such as temporal windows or intersections with other cohorts.
OmopConstructor Constructs and recalculates standardized OMOP CDM tables (e.g. observation_period).

Analysis Layer

This layer contains packages that perform specific types of epidemiological, characterization, or health economic analyses on the generated cohorts.

Library Purpose
CohortCharacteristics Summarizes the baseline characteristics of a cohort, including demographics, comorbidities, and other features.
IncidencePrevalence Calculates the incidence and prevalence of health outcomes within a study population.
EpiStandard Directly standardizes epidemiological incidence and prevalence rates across age and reference populations.
DrugUtilisation Analyzes patterns of drug use, such as treatment pathways and adherence.
CohortSurvival Performs time-to-event (survival) analysis to estimate the risk of outcomes over time.
CohortSymmetry Conducts Sequence Symmetry Analysis (SSA) for safety screening and adverse event signal detection.
PatientProfiles Adds detailed demographic and clinical features to patient cohorts for in-depth characterization.
CohortUtilisation Extracts in-database Healthcare Resource Utilization (HCRU) metrics across inpatient, outpatient, emergency, prescription, and procedure domains.
CohortCosts Links polymorphic OMOP COST records to clinical events and tracks direct medical expenditures.
CohortEconomics Provides an end-to-end framework for causal propensity score adjustment, Markov state-transition modeling, and Cost-Effectiveness Analysis (CEA).
OmopSketch Provides a quick summary or “sketch” of the data in an OMOP CDM instance.

Validation & Diagnostics Layer

This layer is focused on quality control, measurement consistency, and ensuring the clinical validity of the cohort definitions.

Library Purpose
PhenotypeR Provides a comprehensive suite of diagnostics to evaluate and validate the quality of clinical phenotype definitions.
MeasurementDiagnostics Assesses the quality, recording volume, numeric distributions, and categorical encodings of laboratory measurements and vital signs.

Visualization & Reporting Layer

These packages are used to generate the final outputs of a study, including tables, figures, and interactive applications.

Library Purpose
visOmopResults Creates standardized visualizations and tables from the results of other OHDSI packages.
OmopViewer Automatically exports interactive Shiny dashboard applications to explore and share <summarised_result> study outputs.
ggplot2 A general-purpose and highly flexible plotting library used for creating custom visualizations.

Study Packaging & Distribution Layer

These packages scaffold, review, and containerize study pipelines for reproducible execution across distributed research networks.

Library Purpose
OmopStudyBuilder Scaffolds standardized network study repositories, audits dependencies with renv, and packages studies into Docker containers for headless or interactive execution.

For a detailed, step-by-step guide on performing an observational study analysis, see Performing an Analysis.


Table of contents