ADaM
Overview
This section provides end-to-end examples for creating Analysis Data Model (ADaM) datasets using pharmaverse packages. ADaM is a CDISC standard designed to facilitate efficient generation, replication, and review of clinical trial statistical analyses.
The examples demonstrate how to leverage multiple pharmaverse packages together, including {admiral}, {metacore}, {metatools}, and {xportr}, to build analysis-ready datasets from SDTM data.
All examples use SDTM datasets from {pharmaversesdtm} as input, ensuring consistency and reproducibility.
Examples
Subject-Level Analysis Dataset (ADSL)
- ADSL (Subject-Level Analysis Dataset) - Create the foundational subject-level dataset containing demographic, treatment, and study participation information.
ADSL is the foundation for most other ADaM datasets. We recommend starting with this example if you’re new to ADaM development with pharmaverse packages. ADSL contains one record per subject and serves as the basis for merging subject-level variables into other ADaM datasets.
Basic Data Structure (BDS) Analysis Datasets
BDS datasets follow a standard structure with one observation per subject per analysis parameter per analysis timepoint. These are commonly used for efficacy and safety analyses.
ADVS(Vital Signs Analysis) - Generate vital signs analysis dataset with baseline and change from baseline calculations.ADRS(Response Analysis) - Create response analysis dataset for oncology efficacy endpoints.
Occurrence Data Structure (OCCDS) Analysis Datasets
OCCDS datasets have one observation per subject per occurrence of an event, capturing multiple events per subject.
ADAE(Adverse Events Analysis) - Build an analysis dataset for adverse events with derived variables for analysis and reporting.
Time-to-Event Analysis Dataset (ADTTE)
ADTTE(Time-to-Event Analysis) - Develop oncology time-to-event analysis dataset for survival analyses, including censoring and event derivations.
Pharmacokinetic Analysis Datasets
ADPC(Pharmacokinetic Concentrations) - Build pharmacokinetic concentration analysis dataset with timepoint derivations.ADPPK(Population Pharmacokinetic) - Create population pharmacokinetic analysis dataset for modeling and simulation.
Quick Reference
| Dataset Type | Example | Key Packages | Structure |
|---|---|---|---|
| Subject-Level | ADSL |
admiral, metacore, metatools, xportr | One record per subject |
| BDS - Vitals | ADVS |
admiral, metacore, metatools, xportr | One record per subject per parameter per timepoint |
| BDS - Response | ADRS |
admiral, metacore, metatools, xportr | One record per subject per parameter per timepoint |
| OCCDS - Safety | ADAE |
admiral, metacore, metatools, xportr | One record per subject per event |
| Time-to-Event | ADTTE |
admiral, metacore, metatools, xportr | One record per subject per parameter |
| PK Concentration | ADPC |
admiral, metacore, metatools, xportr | One record per subject per timepoint per analyte |
| Population PK | ADPPK |
admiral, metacore, metatools, xportr | One record per subject per timepoint |
Workflow Overview
Each example demonstrates a consistent workflow for creating ADaM datasets:
- Data Input - Load SDTM datasets and required metadata specifications
- Derivations - Apply ADaM derivation functions to create analysis variables (e.g., baseline flags, change from baseline, derived parameters)
- Metadata Application - Use metadata specifications to control dataset attributes, labels, and formats
- Validation - Perform dataset checks and validation against specifications
- Export - Create SAS transport files ready for regulatory submission
Most ADaM datasets require ADSL as input for subject-level variables. The typical flow is:
SDTM datasets → ADSL → Other ADaM datasets → TLGs
Key Packages Used
{admiral}- Core ADaM derivations and functions for creating analysis datasets following CDISC standards{metacore}- Metadata and specifications management, storing variable-level metadata{metatools}- Dataset building and validation using metadata, applying specifications to datasets{xportr}- SAS transport file creation and eSub compliance checks for regulatory submissions
Meet the {admiral} Family
The {admiral} ecosystem includes specialized extension packages for different therapeutic areas and study types:
- Admiral Family Overview - Explore the complete admiral family
- Extension Packages - These packages provide additional therapeutic area support, for example including functions for oncology endpoints such as RECIST v1.1 for solid tumors (
{admiralonco}) - Additional extensions - Packages for other therapeutic areas are under development
Each extension package builds on {admiral} core functionality while providing domain-specific derivations.
Additional Resources
- CDISC ADaM Implementation Guide - Official ADaM standard documentation and data structure specifications
- {admiral} Documentation - Comprehensive guide to admiral functions, workflows, and best practices
- Pharmaverse E2E Clinical Reporting - Complete list of pharmaverse packages supporting the full clinical reporting pipeline
Common Derivations Across Examples
While each ADaM dataset has unique requirements, several derivation patterns appear across multiple examples:
- Baseline derivations - Identifying and flagging baseline records
- Change from baseline - Calculating analysis values relative to baseline
- Analysis flags - Creating indicators for analysis populations and key events
- Date/time imputations - Handling partial or missing dates
- Treatment variables - Deriving planned and actual treatment information
- Parameter derivations - Creating derived or calculated parameters
These common patterns are demonstrated throughout the examples, showing how {admiral} functions can be reused across different dataset types.