Structures clinical trial data analysis with primary endpoint evaluation and safety reporting. Use when analyzing trial results, evaluating endpoints, or preparing statistical reports.
Clinical trial data analysis translates raw study data into evidence that regulators, clinicians, and payers act on. Errors in analysis — wrong population sets, incorrect handling of missing data, failure to control multiplicity — can result in complete response letters, advisory-committee failures, or post-marketing safety crises. This skill implements the statistical analysis workflow defined by ICH E9 (Statistical Principles for Clinical Trials), ICH E9(R1) (Estimands), FDA guidance on clinical trial endpoints, and CDISC standards to produce analyses that withstand regulatory scrutiny.
Checkpoint A — Intake and Scoping
Required Intake Questions
What is the study phase (I–IV) and therapeutic area?
What are the primary, secondary, and exploratory endpoints as defined in the protocol?
Is the Statistical Analysis Plan (SAP) finalized and locked before database lock?
What analysis populations are defined (ITT, mITT, per-protocol, safety)?
What is the randomization structure (stratification factors, adaptive elements)?
Are there interim analyses with alpha-spending considerations?
What is the data format (CDISC SDTM, ADaM, legacy)?
Has database lock been confirmed? What is the lock date?
Are there any protocol deviations affecting the analysis populations?
What are the deliverable formats (tables, listings, figures — TLF shells)?
Required Source Documents
Finalized and signed Statistical Analysis Plan (SAP)
Randomization list (unblinded, post-database lock)
Protocol deviation log
Data Management Report (query resolution status, edit checks)
Medical coding dictionaries (MedDRA version, WHO Drug Dictionary version)
Step 1 — Define and Verify Analysis Populations
Construct each analysis population per the SAP:
Intent-to-Treat (ITT): All randomized participants analyzed as randomized, regardless of protocol adherence. This is the primary population for superiority trials per ICH E9.
Modified ITT (mITT): ITT minus participants who never received study drug or have no post-baseline efficacy assessment. Document specific exclusion criteria.
Per-Protocol (PP): Participants who completed the study without major protocol deviations. Define deviation types that trigger PP exclusion (wrong treatment, insufficient exposure, prohibited medications, missed primary-endpoint assessments).
Safety population: All participants who received at least one dose of study medication, analyzed as treated (not as randomized).
Reconcile population counts across datasets. Any discrepancy between randomization list and safety/ITT counts requires documentation.
Step 2 — Produce Demographic and Baseline Tables
Generate the CONSORT-required baseline comparison table:
Demographics: age (mean, SD, median, range), sex, race/ethnicity (per FDA and NIH reporting requirements), BMI
Report: median time-to-event per group (with 95% CI), HR, p-value, KM curves at key timepoints
For Count Data / Recurrent Events
Negative binomial regression or Andersen-Gill model
Report: rate per group, rate ratio with 95% CI, p-value
Step 4 — Handle Missing Data
Implement the pre-specified missing-data strategy per ICH E9(R1) estimand framework:
Primary approach: The method that aligns with the chosen estimand (e.g., MMRM under MAR assumption for treatment-policy estimand)
Sensitivity analyses (required — at least two):
Tipping-point analysis: Determine how extreme imputed values must be to reverse the conclusion
Pattern-mixture model (MNAR): Reference-based imputation (copy-reference, jump-to-reference)
Multiple imputation under various assumptions
Worst-case / best-case imputation for binary endpoints
Supplementary analyses: Complete-case analysis, last-observation-carried-forward (document as sensitivity only — LOCF is no longer acceptable as primary per FDA and EMA guidance)
Documentation: Report the number and reasons for missing data by treatment arm and visit
Step 5 — Analyze Secondary Endpoints with Multiplicity Control
Apply the pre-specified multiplicity adjustment strategy:
Hierarchical (fixed-sequence) testing: Test secondary endpoints in pre-specified order; stop testing at first non-significant result. This is the most common approach for pivotal trials.
Graphical approach (Bretz et al.): Allocate alpha across endpoints with pre-specified propagation rules
Hochberg or Holm step-up/step-down: When endpoints are independent or positively correlated
Gate-keeping strategies: For families of primary and secondary endpoints
Analyze each secondary endpoint using the same methodology specified for its data type. Report adjusted and nominal p-values.
Step 6 — Conduct Safety Analysis
Analyze the safety population:
Adverse Events
Summarize by System Organ Class (SOC) and Preferred Term (PT) using the specified MedDRA version
Present: any AE, drug-related AE, serious AE (SAE), AE leading to discontinuation, AE leading to death
Tabulate by severity grade (CTCAE v5 or mild/moderate/severe)
For each PT, report incidence (n, %) per treatment arm — not number of events (one participant with multiple episodes counts once)
Flag imbalances (≥2% difference between arms or ≥2× rate ratio) for medical review
Tables: formatted with proper headers, footnotes, population counts (N = per arm), and statistical references
Listings: participant-level data for SAEs, deaths, discontinuations, protocol deviations, and concomitant medications
Figures: KM plots, forest plots for subgroups, waterfall plots (oncology), spider plots (tumor response), bar/line charts for PRO scores
All output must be reproducible from ADaM datasets with documented programs
Checkpoint B — Analysis Review
Primary analysis matches the SAP exactly (no unplanned modifications)
All analysis populations are correctly derived and counts reconcile
Missing-data handling follows the estimand framework with sensitivity analyses
Multiplicity adjustment is correctly applied in the specified order
Safety tables use correct MedDRA version and incidence-based (not event-based) counting
Hy's Law assessment is completed for studies with hepatotoxicity potential
All TLFs match the pre-approved shells
Subgroup analyses (sex, age, race, region, baseline severity) are conducted for primary endpoint
Statistical programs are validated (double-programming or independent QC)
Unblinding log confirms no premature unblinding occurred
Quality Audit
SAP version matches the version referenced in the CSR
ADaM datasets are CDISC-compliant with submitted define.xml
All p-values are reported to the appropriate decimal precision (typically 4 decimal places)
Confidence intervals are consistently 2-sided 95% unless otherwise specified
KM curves include number-at-risk tables
Forest-plot subgroup analyses include interaction p-values
All post-hoc analyses are clearly labeled as exploratory
No results are presented that are not derivable from the submitted datasets
All [VERIFY] flags have been resolved or escalated
Guidelines
The SAP must be finalized before database lock and unblinding — any changes after unblinding must be documented and justified as pre-specified sensitivity or clearly labeled post-hoc
Never change the primary analysis method after seeing the data without regulatory disclosure
Use ITT as the primary population for superiority trials; per-protocol as co-primary for non-inferiority
LOCF is no longer acceptable as a primary missing-data method — use MMRM or multiple imputation
All statistical programs must have independent QC (double-programming or code review)
Report effect estimates with confidence intervals, not only p-values — p-values without effect sizes are insufficient
Safety analyses are descriptive — hypothesis testing of AE incidence rates is generally inappropriate
Apply the CONSORT flow diagram to document participant disposition through analysis populations
Mark any deviation from the SAP with [VERIFY] for biostatistics-lead review
This skill produces analysis results — interpretation for regulatory submission requires clinical and regulatory team review
1---2name: analyzing-clinical-trial-data3description: Structures clinical trial data analysis with primary endpoint evaluation and safety reporting. Use when analyzing trial results, evaluating endpoints, or preparing statistical reports.4---56# Analyzing Clinical Trial Data78## Why This Skill Exists910Clinical trial data analysis translates raw study data into evidence that regulators, clinicians, and payers act on. Errors in analysis — wrong population sets, incorrect handling of missing data, failure to control multiplicity — can result in complete response letters, advisory-committee failures, or post-marketing safety crises. This skill implements the statistical analysis workflow defined by ICH E9 (Statistical Principles for Clinical Trials), ICH E9(R1) (Estimands), FDA guidance on clinical trial endpoints, and CDISC standards to produce analyses that withstand regulatory scrutiny.1112---1314## Checkpoint A — Intake and Scoping1516### Required Intake Questions171. What is the study phase (I–IV) and therapeutic area?182. What are the primary, secondary, and exploratory endpoints as defined in the protocol?193. Is the Statistical Analysis Plan (SAP) finalized and locked before database lock?204. What analysis populations are defined (ITT, mITT, per-protocol, safety)?215. What is the randomization structure (stratification factors, adaptive elements)?226. Are there interim analyses with alpha-spending considerations?237. What is the data format (CDISC SDTM, ADaM, legacy)?248. Has database lock been confirmed? What is the lock date?259. Are there any protocol deviations affecting the analysis populations?2610. What are the deliverable formats (tables, listings, figures — TLF shells)?2728### Required Source Documents29- Finalized and signed Statistical Analysis Plan (SAP)30- Protocol (including all amendments)31- TLF shells (mock table/listing/figure specifications)32- SDTM and ADaM datasets with define.xml33- Randomization list (unblinded, post-database lock)34- Protocol deviation log35- Data Management Report (query resolution status, edit checks)36- Medical coding dictionaries (MedDRA version, WHO Drug Dictionary version)3738---3940## Step 1 — Define and Verify Analysis Populations4142Construct each analysis population per the SAP:4344- **Intent-to-Treat (ITT)**: All randomized participants analyzed as randomized, regardless of protocol adherence. This is the primary population for superiority trials per ICH E9.45- **Modified ITT (mITT)**: ITT minus participants who never received study drug or have no post-baseline efficacy assessment. Document specific exclusion criteria.46- **Per-Protocol (PP)**: Participants who completed the study without major protocol deviations. Define deviation types that trigger PP exclusion (wrong treatment, insufficient exposure, prohibited medications, missed primary-endpoint assessments).47- **Safety population**: All participants who received at least one dose of study medication, analyzed as treated (not as randomized).4849Reconcile population counts across datasets. Any discrepancy between randomization list and safety/ITT counts requires documentation.5051---5253## Step 2 — Produce Demographic and Baseline Tables5455Generate the CONSORT-required baseline comparison table:56571. Demographics: age (mean, SD, median, range), sex, race/ethnicity (per FDA and NIH reporting requirements), BMI582. Disease characteristics: diagnosis duration, disease severity scores, prior treatments, relevant biomarkers593. Stratification factors: verify balance across treatment arms604. Baseline efficacy measures: values for primary and key secondary endpoints at baseline615. Present continuous variables as mean (SD) and median (Q1, Q3); categorical variables as n (%)626. Do not perform hypothesis tests on baseline characteristics (CONSORT guidance) — describe imbalances narratively6364---6566## Step 3 — Analyze Primary Endpoint6768Execute the pre-specified primary analysis exactly as stated in the SAP:6970### For Continuous Endpoints71- ANCOVA with treatment as fixed effect, stratification factors as covariates, and baseline value as covariate72- MMRM (mixed model for repeated measures) for longitudinal data: treatment, visit, treatment-by-visit interaction, baseline, baseline-by-visit interaction; unstructured covariance73- Report: LS means per group, difference in LS means, 95% CI, p-value7475### For Binary Endpoints76- CMH (Cochran-Mantel-Haenszel) test stratified by randomization strata77- Logistic regression as sensitivity analysis78- Report: response rates per group, difference in proportions, 95% CI, odds ratio with 95% CI, p-value7980### For Time-to-Event Endpoints81- Kaplan-Meier estimates with log-rank test (stratified if applicable)82- Cox proportional hazards model for hazard ratio with 95% CI83- Verify proportional-hazards assumption (Schoenfeld residuals, log-log plot)84- Report: median time-to-event per group (with 95% CI), HR, p-value, KM curves at key timepoints8586### For Count Data / Recurrent Events87- Negative binomial regression or Andersen-Gill model88- Report: rate per group, rate ratio with 95% CI, p-value8990---9192## Step 4 — Handle Missing Data9394Implement the pre-specified missing-data strategy per ICH E9(R1) estimand framework:95961. **Primary approach**: The method that aligns with the chosen estimand (e.g., MMRM under MAR assumption for treatment-policy estimand)972. **Sensitivity analyses** (required — at least two):98 - Tipping-point analysis: Determine how extreme imputed values must be to reverse the conclusion99 - Pattern-mixture model (MNAR): Reference-based imputation (copy-reference, jump-to-reference)100 - Multiple imputation under various assumptions101 - Worst-case / best-case imputation for binary endpoints1023. **Supplementary analyses**: Complete-case analysis, last-observation-carried-forward (document as sensitivity only — LOCF is no longer acceptable as primary per FDA and EMA guidance)1034. **Documentation**: Report the number and reasons for missing data by treatment arm and visit104105---106107## Step 5 — Analyze Secondary Endpoints with Multiplicity Control108109Apply the pre-specified multiplicity adjustment strategy:1101111. **Hierarchical (fixed-sequence) testing**: Test secondary endpoints in pre-specified order; stop testing at first non-significant result. This is the most common approach for pivotal trials.1122. **Graphical approach** (Bretz et al.): Allocate alpha across endpoints with pre-specified propagation rules1133. **Hochberg or Holm step-up/step-down**: When endpoints are independent or positively correlated1144. **Gate-keeping strategies**: For families of primary and secondary endpoints115116Analyze each secondary endpoint using the same methodology specified for its data type. Report adjusted and nominal p-values.117118---119120## Step 6 — Conduct Safety Analysis121122Analyze the safety population:123124### Adverse Events125- Summarize by System Organ Class (SOC) and Preferred Term (PT) using the specified MedDRA version126- Present: any AE, drug-related AE, serious AE (SAE), AE leading to discontinuation, AE leading to death127- Tabulate by severity grade (CTCAE v5 or mild/moderate/severe)128- For each PT, report incidence (n, %) per treatment arm — not number of events (one participant with multiple episodes counts once)129- Flag imbalances (≥2% difference between arms or ≥2× rate ratio) for medical review130131### Laboratory Data132- Shift tables (baseline category → worst post-baseline category)133- Potentially clinically significant (PCS) values: define thresholds per parameter; tabulate n (%) meeting PCS criteria by arm134- Liver safety: apply Hy's Law criteria (ALT >3× ULN + bilirubin >2× ULN without cholestasis); generate eDISH plot135136### Vital Signs, ECG, Other Safety137- Summarize by visit with change-from-baseline; flag PCS values138- QTc analysis per ICH E14 if applicable139140---141142## Step 7 — Generate Tables, Listings, and Figures (TLFs)143144Produce all TLFs per the pre-approved shells:145146- Follow CDISC Analysis Results Metadata (ARM) standards147- Tables: formatted with proper headers, footnotes, population counts (N = per arm), and statistical references148- Listings: participant-level data for SAEs, deaths, discontinuations, protocol deviations, and concomitant medications149- Figures: KM plots, forest plots for subgroups, waterfall plots (oncology), spider plots (tumor response), bar/line charts for PRO scores150- All output must be reproducible from ADaM datasets with documented programs151152---153154## Checkpoint B — Analysis Review1551561. [ ] Primary analysis matches the SAP exactly (no unplanned modifications)1572. [ ] All analysis populations are correctly derived and counts reconcile1583. [ ] Missing-data handling follows the estimand framework with sensitivity analyses1594. [ ] Multiplicity adjustment is correctly applied in the specified order1605. [ ] Safety tables use correct MedDRA version and incidence-based (not event-based) counting1616. [ ] Hy's Law assessment is completed for studies with hepatotoxicity potential1627. [ ] All TLFs match the pre-approved shells1638. [ ] Subgroup analyses (sex, age, race, region, baseline severity) are conducted for primary endpoint1649. [ ] Statistical programs are validated (double-programming or independent QC)16510. [ ] Unblinding log confirms no premature unblinding occurred166167---168169## Quality Audit170171- [ ] SAP version matches the version referenced in the CSR172- [ ] ADaM datasets are CDISC-compliant with submitted define.xml173- [ ] All p-values are reported to the appropriate decimal precision (typically 4 decimal places)174- [ ] Confidence intervals are consistently 2-sided 95% unless otherwise specified175- [ ] KM curves include number-at-risk tables176- [ ] Forest-plot subgroup analyses include interaction p-values177- [ ] All post-hoc analyses are clearly labeled as exploratory178- [ ] No results are presented that are not derivable from the submitted datasets179- [ ] All [VERIFY] flags have been resolved or escalated180181---182183## Guidelines1841851. The SAP must be finalized before database lock and unblinding — any changes after unblinding must be documented and justified as pre-specified sensitivity or clearly labeled post-hoc1862. Never change the primary analysis method after seeing the data without regulatory disclosure1873. Use ITT as the primary population for superiority trials; per-protocol as co-primary for non-inferiority1884. LOCF is no longer acceptable as a primary missing-data method — use MMRM or multiple imputation1895. All statistical programs must have independent QC (double-programming or code review)1906. Report effect estimates with confidence intervals, not only p-values — p-values without effect sizes are insufficient1917. Safety analyses are descriptive — hypothesis testing of AE incidence rates is generally inappropriate1928. Apply the CONSORT flow diagram to document participant disposition through analysis populations1939. Mark any deviation from the SAP with [VERIFY] for biostatistics-lead review19410. This skill produces analysis results — interpretation for regulatory submission requires clinical and regulatory team review
Run npx skillmds@latest add lev-os/analyzing-clinical-trial-data in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Structures clinical trial data analysis with primary endpoint evaluation and safety reporting. Use when analyzing trial results, evaluating endpoints, or preparing statistical reports. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
lev-os (@lev-os) published this skill. Their other Agent Skills are listed on their SkillMD profile.