ADaM with admiral

Pharma & Clinical

Turn CDISC SDTM tabulations into analysis-ready ADaM datasets in R with the pharmaverse admiral package. This hands-on series builds the ADSL subject-level backbone, then the BDS structure that every parameter-level analysis dataset shares, through to the ADTTE time-to-event dataset — each a complete, runnable derivation on public pharmaverse data.

LearnPharma & Clinical › ADaM with admiral

SDTM (the Study Data Tabulation Model) tabulates what happened in the trial; ADaM (the Analysis Data Model) makes it analysis-ready. This series builds the CDISC (Clinical Data Interchange Standards Consortium) ADaM datasets in R with the pharmaverse admiral package — the same derivations a clinical programmer runs to take standardized SDTM source domains and produce the datasets every table, listing, and figure is computed from. Each lesson is a complete, runnable build on public pharmaverse data, so every line reproduces. The runtime is the judge.

The arc follows how analysis datasets are actually built:

  1. ADSL — the subject-level backbone — one row per subject. Derive treatment variables, population flags (SAFFL, RANDFL), disposition, and age groups from SDTM DM/EX/DS with admiral. Every other ADaM dataset merges its key variables back from here, so ADSL comes first.
  2. ADLB and the BDS structure — the Basic Data Structure that every findings analysis dataset shares: one row per subject per parameter per timepoint, organized around PARAMCD/PARAM and AVAL. Build the laboratory analysis dataset (ADLB) — baseline, change from baseline, and reference-range flags — and you have the shape behind ADVS, ADEG, and ADTTE too.
  3. ADVS — vital signs and per-timepoint baselines — the second findings dataset, where a parameter is measured at several positions in one visit (supine vs standing for orthostatic blood pressure). Add the analysis timepoint (ATPT/ATPTN) and derive_basetype_records() so baseline and change from baseline are computed within each position — the BASETYPE machinery ADLB deferred.
  4. ADAE — adverse events (OCCDS) — derive the adverse-events analysis dataset on the Occurrence Data Structure, the events counterpart to the findings BDS, with treatment-emergent flagging.
  5. ADTTE — time-to-event — derive a conformant time-to-event dataset (PARAMCD, AVAL, the CNSR 0/1 censoring convention) with admiral’s derive_param_tte(), then run a Kaplan-Meier analysis on it.
  6. Metadata-driven ADaM — govern it all with one spec — the derivations above produce the values; a machine-readable specification governs the structure. Load an ADaM spec with metacore (from a Define-XML or a spreadsheet) and use metatools to apply it and check a derived dataset for conformance — variables present, controlled terminology valid, columns ordered — the same way for every dataset in the study.

All lessons

No matching items
🟢 With an AI agent

Ask Prova “in admiral, how do I derive a population flag like SAFFL on ADSL, and why does it live at the subject level?” — it answers grounded in the CDISC ADaM standard and runnable admiral code, so the derivation fits your study, not a generic example. The runtime is the judge. Ask Prova →

Was this page helpful?

Prove you can do it. Master the whole Clinical Programming in R (pharmaverse) series — track your path, build projects, and earn a certificate.

Start free →

Go Pro — unlimited Prova on your own data and a verifiable certificate that proves the skill.

from $15/mo billed yearly

Go Pro →

✓ You're Pro — keep going. The runtime is the judge.

Get new R & Python lessons by email

Practical, reproducible, no spam. Unsubscribe anytime.

Double opt-in. We never share your email.

Share this pageXLinkedInRedditHN

Citation

BibTeX citation:
@online{untitled,
  author = {},
  title = {ADaM with Admiral},
  url = {https://www.datanovia.com/learn/pharma-clinical/03-adam-admiral/},
  langid = {en}
}
For attribution, please cite this work as:
“ADaM with Admiral.” n.d. https://www.datanovia.com/learn/pharma-clinical/03-adam-admiral/.