Trial biostatistics toolkit

Stage 3: data standards

SDTM-like inputs, ADaM with admiral, specification checks and XPT

Executed hereNot covered: define.xml, ADRG

Synthetic data only: simulated for this worked example; not real trial data and not a regulatory deliverable.

SDTM-like source domains are simulated by 03_adam/01_sdtm.R, which reuses the sim_lifecycle/ priors and one-compartment model (N = 40, seed 2026) and takes each participant's sequence from the stage 1 randomization schedule. ADaM datasets are derived with admiral 1.5.0 following its ad_adsl.R, ad_adpc.R, ad_adpp.R and ad_adae.R templates, checked against the specification with metacore 0.3.0 and metatools 0.3.0, and written as SAS XPORT v5 with xportr 0.6.0.

SDTM-like inputs

DomainRecordsContentFile
DM 40Demographics and reference datesdm.csv
EX 79One record per dose (Test or Reference)ex.csv
PC1185Plasma concentrations at actual sampling times; BLQ as textpc.csv
AE 32Adverse events from the sim_lifecycle priorsae.csv
VS 80Screening height and weightvs.csv
DS 120Consent, randomization and dispositionds.csv
PP1027PK parameters from the NCA in stage 4 (derived, then fed back into ADPP)pp.csv

Files: dm.csv, ex.csv, pc.csv, ae.csv, vs.csv, ds.csv, pp.csv, scenarios.json. No LB domain: no output in this example needs laboratory data.

Documented scenarios that exercise the SAP rules

ParticipantScenario
SIMBE01-101-017withdraws consent after Period 1 (no Period 2 dose)
SIMBE01-101-029vomits 45 minutes after the Period 2 dose
SIMBE01-101-008measurable Period 2 pre-dose concentration at 2.5% of that period's Cmax (below the 5% rule)
SIMBE01-101-03512 h sample in Period 1 not collected
SIMBE01-101-0124 h sample in Period 1 drawn 25 minutes late
SIMBE01-101-0246 h sample in Period 2 reported below the LLOQ between quantifiable samples (a simulated sample-handling problem; no reassay)

ADaM datasets

DatasetRecordsVariablesTemplate
ADSL 4054ad_adsl.R pattern; derive_vars_period() for the crossover
ADPC126452ad_adpc.R, step by step (adaptations listed below)
ADPP102734ad_adpp.R; SAP exclusion rules
ADAE 3231ad_adae.R pattern; period from create_period_dataset()

Template adaptations in ADPC (each one commented in 03_adam/03_adpc.R)

Specification

adam_spec.xlsx uses the Pinnacle 21 specification layout (Study, Datasets, Variables, ValueLevel, WhereClauses, Codelists, Dictionaries, Methods, Comments, Documents), which metacore::spec_to_metacore() reads. adam_spec.json holds the same tables for scripts and diffs. Both come from one definition in 03_adam/spec/build_spec.R. Variable labels follow CDISC naming (for example USUBJID, "Unique Subject Identifier").

Metadata checks (executed)

metatools checks, length and mandatory checks, and an XPT read-back for each dataset.
datasetcheckpassdetail
ADSLmetatools::check_variables (strict)pass54 variables in data, 54 in spec
ADSLmetatools::check_ct_datapassall values in their codelists
ADSLmetatools::check_unique_keyspassSTUDYID, USUBJID
ADSLtext values fit the spec lengthspass34 text variables
ADSLmandatory variables populatedpass48 mandatory variables
ADSLXPT v5 read back: names, order and labels match the specpass40 rows x 54 columns; dataset label 'Subject-Level Analysis Dataset'
ADPCmetatools::check_variables (strict)pass52 variables in data, 52 in spec
ADPCmetatools::check_ct_datapassall values in their codelists
ADPCmetatools::check_unique_keyspassSTUDYID, USUBJID, ASEQ
ADPCtext values fit the spec lengthspass30 text variables
ADPCmandatory variables populatedpass35 mandatory variables
ADPCXPT v5 read back: names, order and labels match the specpass1264 rows x 52 columns; dataset label 'PK Concentrations Analysis Dataset'
ADPPmetatools::check_variables (strict)pass34 variables in data, 34 in spec
ADPPmetatools::check_ct_datapassall values in their codelists
ADPPmetatools::check_unique_keyspassSTUDYID, USUBJID, APERIOD, PARAMCD
ADPPtext values fit the spec lengthspass24 text variables
ADPPmandatory variables populatedpass26 mandatory variables
ADPPXPT v5 read back: names, order and labels match the specpass1027 rows x 34 columns; dataset label 'PK Parameters Analysis Dataset'
ADAEmetatools::check_variables (strict)pass31 variables in data, 31 in spec
ADAEmetatools::check_ct_datapassall values in their codelists
ADAEmetatools::check_unique_keyspassSTUDYID, USUBJID, ASEQ
ADAEtext values fit the spec lengthspass20 text variables
ADAEmandatory variables populatedpass30 mandatory variables
ADAEXPT v5 read back: names, order and labels match the specpass32 rows x 31 columns; dataset label 'Adverse Events Analysis Dataset'

Gap: not authored here. No define.xml and no Analysis Data Reviewer's Guide (ADRG). No Pinnacle 21 or CDISC CORE conformance run: the checks above test the datasets against this study's own specification. The source domains are SDTM-like (no trial design domains, no SUPP datasets). The Dataset-JSON v1.1 copies are a demonstration: FDA has not accepted Dataset-JSON as of Oct 2026, and SAS XPORT v5 remains the submission format.