hlt003-sample / README.md
pradeep-xpert's picture
Upload folder using huggingface_hub
5b79a58 verified
---
license: cc-by-nc-4.0
task_categories:
- tabular-classification
- tabular-regression
- time-series-forecasting
language:
- en
tags:
- synthetic
- healthcare
- clinical-trials
- rct
- randomized-controlled-trial
- phase-iii
- phase-ii
- biostatistics
- pharma
- drug-development
- power-analysis
- sample-size
- treatment-effect
- adverse-events
- ctcae
- ich-e9
- consort
- cohens-d
- hazard-ratio
- odds-ratio
- progression-free-survival
- arps
- itt-population
- pp-population
- dropout-modeling
- mar-mnar
- biomarker-interaction
- simulation
pretty_name: HLT-003 Synthetic Clinical Trial Dataset 3 Endpoint Types + Power Sweep (Sample Preview)
size_categories:
- 1K<n<10K
---
# HLT-003 — Synthetic Clinical Trial Dataset (Sample Preview)
**A free, schema-identical preview of the full HLT-003 commercial product from [XpertSystems.ai](https://xpertsystems.ai).**
A **fully synthetic** parametric clinical trial simulator demonstrating all three primary endpoint types (CONTINUOUS, BINARY, TTE) plus a sample-size power sweep. Built on JSON-configurable trial designs with ICH E9 / CONSORT 2010 / CTCAE v5.0 conventions for randomization, blinding, dropout modeling, and adverse event reporting.
> ⚠️ **PRIVACY & SYNTHETIC NATURE**
> Every record in this dataset is **100% synthetic**. **No real trial participant data, no PHI, no re-identifiable records.** Trial parameters (effect sizes, response rates, dropout rates, AE profiles) match published clinical trial design conventions but the participants are computationally generated.
---
## What's in this sample
### Three sample trials — one per endpoint type
| File | Trial | Phase | Endpoint | Arms | N | Size |
|---|---|---|---|---|---|---|
| `cardiology_ldl_trial.csv` | LDL-C reduction (lipid-lowering therapy) | III | CONTINUOUS | 3 | 800 | 117 KB |
| `rheumatology_acr20_trial.csv` | ACR20 response (rheumatoid arthritis biologic) | III | BINARY | 3 | 800 | 109 KB |
| `oncology_pfs_trial.csv` | Progression-free survival (targeted oncology) | II | TTE | 2 | 600 | 80 KB |
### Configuration templates
| File | Description |
|---|---|
| `cardiology_ldl_config.json` | Full JSON config for the cardiology trial |
| `rheumatology_acr20_config.json` | Full JSON config for the rheumatology trial |
| `oncology_pfs_config.json` | Full JSON config for the oncology trial |
| `trial_config_schema.json` | Complete config API documentation |
### Power analysis
| File | Description |
|---|---|
| `power_sweep_results.csv` | Power curve at 7 sample sizes (200-2500) × 50 simulations per n, small effect (d=0.10) |
### Documentation
| File | Description |
|---|---|
| `simulation_audit_log.txt` | Reproducibility audit log from latest trial run |
| `validation_scorecard.json` | Wrapper-authored 10-metric scorecard with sources |
**Total:** ~348 KB across 10 files.
---
## Schema (all 3 trial CSVs share the same 28-column schema)
### Trial & participant identity
`participant_id`, `trial_id`, `therapeutic_area`, `trial_phase`, `arm_id`, `arm_label`, `treatment_effect_d`
### Demographics
`age`, `sex`, `bmi`, `disease_severity_score`, `severity_tertile` (Low/Moderate/High), `biomarker_positive`, `elderly_flag`
### Analysis populations (ICH E9)
`ITT_flag` (Intent-to-Treat), `PP_flag` (Per-Protocol), `dropout_flag`
### Endpoint fields (only the trial's endpoint type is populated; others are NaN)
**CONTINUOUS:** `baseline_ep`, `primary_ep_w24`, `primary_cfb_w24`
**BINARY:** `binary_response_w24`
**TTE:** `tte_event_week`, `tte_event_flag`, `tte_censored_flag`
### Safety (CTCAE v5.0)
`ae_total_count`, `ae_grade3plus_count`, `ae_sae_count`, `ae_any_flag`
---
## Coverage
**3 endpoint types** — CONTINUOUS (mean change from baseline), BINARY (response rate with odds ratios), TTE (time-to-event with hazard ratios)
**Therapeutic areas demonstrated** — Cardiology, Rheumatology, Oncology (full product supports 12 areas including Neurology, Metabolic, Respiratory, Psychiatry, Infectious Disease, Rare Disease, Ophthalmology, Dermatology, GI)
**4 trial phases supported** — I, II, III, IV
**3 blinding modes** — OPEN, SINGLE, DOUBLE
**4 randomization schemes** — SIMPLE, BLOCK, STRATIFIED, MINIMIZATION
**3 dropout mechanisms** — MCAR (Missing Completely At Random), MAR (Missing At Random, logit model with severity/age/arm coefficients), MNAR (Missing Not At Random fraction)
**5 AE severity grades** — CTCAE v5.0 Grade 1 (mild) through Grade 5 (death)
**Biomarker × treatment interaction modeling** — predictive biomarker positive fraction with arm-specific effect modification
**Subgroup effects** — elderly (≥65) AE multipliers, severity tertile stratification
---
## Calibration source story
The full HLT-003 generator is grounded in industry-standard clinical trial methodology:
- **ICH E9 (1998)** — Statistical Principles for Clinical Trials (ITT/PP analysis populations, primary endpoint analysis conventions)
- **CONSORT 2010** — Reporting standards for randomized trials
- **Cohen (1988)** — Statistical Power Analysis (effect size conventions)
- **ICH E6(R2)** — Good Clinical Practice (randomization, blinding standards)
- **CTCAE v5.0 (NCI)** — Common Terminology Criteria for Adverse Events
- **Felson et al. (1995)** — ACR Response Criteria (rheumatoid arthritis)
- **Cox (1972)** — Proportional hazards model (TTE analysis)
- **Kaplan-Meier (1958)** — Survival analysis conventions
- **Cholesterol Treatment Trialists' Collaboration** — LDL-C reduction baselines for statin trials
### Sample-scale validation scorecard
| Metric | Observed | Target | Tolerance | Status | Source |
|---|---|---|---|---|---|
| CONTINUOUS placebo CFB calibration | -6.78 | -8.0 | ±2.0 | ✅ PASS | CTT Collaboration |
| CONTINUOUS treatment effect separation | 16.94 | 16.0 | ±4.0 | ✅ PASS | Cohen (1988) |
| BINARY placebo response rate | 21.1% | 22% | ±6% | ✅ PASS | Felson et al. (1995) |
| BINARY high-dose response rate | 58.3% | 53% | ±10% | ✅ PASS | Felson et al. (1995) |
| TTE event rate separation | 6.3% | 10% | ±8% | ✅ PASS | Cox (1972) |
| Overall dropout rate | 8.9% | 10% | ±6% | ✅ PASS | ICH E9 |
| AE grade distribution validity | 100% | 100% | ±5% | ✅ PASS | CTCAE v5.0 |
| ITT population completeness | 100% | 100% | — | ✅ PASS | ICH E9 |
| Randomization balance | 99.7% | ≥95% | ±5% | ✅ PASS | ICH E6(R2) GCP |
| Endpoint field type compliance | 100% | 100% | — | ✅ PASS | Data hygiene invariant |
**Grade: A+ (100/100) — verified across 6 random seeds (42, 7, 123, 2024, 99, 1).**
### Power curve (small effect d=0.10, 2-arm continuous)
```
n=200 → power = 0.28
n=400 → power = 0.58
n=600 → power = 0.70
n=800 → power = 0.74
n=1200 → power = 0.92 ← crosses 80% threshold
n=1800 → power = 1.00
n=2500 → power = 1.00
```
Classic S-shaped power curve — the kind of output biostatisticians use for trial sample-size justification.
---
## Loading examples
### Pandas — explore the 3 trials
```python
import pandas as pd
cont = pd.read_csv("cardiology_ldl_trial.csv")
binr = pd.read_csv("rheumatology_acr20_trial.csv")
tte = pd.read_csv("oncology_pfs_trial.csv")
print("CONTINUOUS trial — mean change from baseline by arm:")
print(cont.groupby("arm_label")["primary_cfb_w24"].agg(["mean", "std", "count"]))
print("\nBINARY trial — response rates by arm:")
print(binr.groupby("arm_label")["binary_response_w24"].mean())
print("\nTTE trial — event vs censored by arm:")
print(tte.groupby("arm_label")[["tte_event_flag", "tte_censored_flag"]].sum())
```
### Hugging Face Datasets
```python
from datasets import load_dataset
ds = load_dataset("xpertsystems/hlt003-sample", data_files={
"continuous": "cardiology_ldl_trial.csv",
"binary": "rheumatology_acr20_trial.csv",
"tte": "oncology_pfs_trial.csv",
"power": "power_sweep_results.csv",
})
print(ds)
```
### Reproducing a primary analysis (CONTINUOUS endpoint)
```python
import pandas as pd
from scipy import stats
df = pd.read_csv("cardiology_ldl_trial.csv")
itt = df[df["ITT_flag"] == 1]
arm_placebo = itt[itt["arm_id"] == 0]["primary_cfb_w24"].dropna()
arm_high = itt[itt["arm_id"] == 2]["primary_cfb_w24"].dropna()
t, p = stats.ttest_ind(arm_placebo, arm_high)
print(f"Placebo CFB mean: {arm_placebo.mean():.2f} mg/dL (n={len(arm_placebo)})")
print(f"100mg CFB mean: {arm_high.mean():.2f} mg/dL (n={len(arm_high)})")
print(f"Treatment effect: {arm_high.mean() - arm_placebo.mean():.2f} mg/dL")
print(f"t={t:.2f}, p={p:.4g}")
```
### Reproducing a Kaplan-Meier curve (TTE endpoint)
```python
import pandas as pd
import matplotlib.pyplot as plt
# Optional: pip install lifelines for proper KM curves
from lifelines import KaplanMeierFitter
df = pd.read_csv("oncology_pfs_trial.csv")
fig, ax = plt.subplots(figsize=(8, 5))
for arm_id, arm_df in df.groupby("arm_id"):
kmf = KaplanMeierFitter()
kmf.fit(arm_df["tte_event_week"], event_observed=arm_df["tte_event_flag"],
label=arm_df["arm_label"].iloc[0])
kmf.plot_survival_function(ax=ax)
ax.set_xlabel("Weeks"); ax.set_ylabel("Progression-Free Survival")
plt.show()
```
### Using a JSON config to design your own trial
```python
import json
# Load one of the included configs as a starting point
with open("cardiology_ldl_config.json") as f:
config = json.load(f)
# Modify for your trial design
config["trial_id"] = "MY-TRIAL-001"
config["n_participants"] = 1500
config["arms"][1]["treatment_effect_cohens_d"] = 0.55 # smaller effect
config["dropout_mcar_rate"] = 0.08 # higher base dropout
with open("my_custom_trial.json", "w") as f:
json.dump(config, f, indent=2)
# Then run the full HLT-003 generator:
# python hlt003_simulation_engine.py --config my_custom_trial.json
```
---
## Suggested use cases
- **Power analysis & sample-size calculation** — reproduce the included power sweep with custom effect sizes, validate analytical power formulas (e.g. Cohen's `pwr` package) against Monte Carlo simulation
- **Statistical test selection** — practice choosing t-test / Wilcoxon / chi-square / Fisher / log-rank / Cox on the appropriate endpoint type
- **Missing data methodology** — develop and test MAR/MNAR imputation strategies on the dropout-flagged data
- **ITT vs PP comparison** — quantify the bias from per-protocol analysis vs intent-to-treat
- **Biomarker subgroup analysis** — test prespecified subgroup hypotheses on `biomarker_positive`
- **Adverse event signal detection** — train classifiers on `ae_grade3plus_count` and `ae_sae_count` against arm/severity features
- **Survival analysis** — fit Kaplan-Meier, Cox proportional hazards, accelerated failure time models on the TTE trial
- **Trial design optimization** — compare 2-arm vs 3-arm designs, dose-ranging vs head-to-head, fixed vs adaptive randomization
- **Educational use** — biostatistics coursework demonstrating endpoint types, randomization, dropout, AE reporting
- **Pharma data pipeline testing** — validate ETL pipelines, SDTM/ADaM converters, e-CRF systems against schema-compliant synthetic data
---
## Sample vs. full product
| Aspect | This sample | Full HLT-003 product |
|---|---|---|
| Trials demonstrated | 3 (one per endpoint type) | Unlimited via JSON config |
| Patients per trial | 600-800 | Up to 50,000 |
| Power sweep | 7 n values × 50 sims | 9+ n values × 200 sims + matplotlib chart |
| Therapeutic areas | 3 (Cardio, Rheum, Onc) | All 12 (incl. Neuro, Metabolic, Resp, Psych, ID, Rare, Ophth, Derm, GI) |
| Phases | II, III | I, II, III, IV |
| Schema | identical | identical |
| Config API | identical | identical |
| License | CC-BY-NC-4.0 | Commercial license |
The full product unlocks unlimited custom trial configurations, larger participant counts for adaptive-design simulations, full power-sweep chart output, and commercial use. **Contact us for the full product.**
---
## Limitations & honest disclosures
- **Sample is preview-only.** 3 trials × 600-800 patients is enough to demonstrate the JSON config API, endpoint types, and validation scorecard, but is **not statistically sufficient** for serious drug development simulation work. The full product supports up to 50K patients per trial.
- **`treatment_effect_cohens_d` is a generator parameter, not the textbook post-trial Cohen's d.** The generator uses it as a multiplier in its CFB formula (`active_bonus = -|placebo_cfb| × d × 2.5`); the actual post-trial Cohen's d for the comparison depends on the residual SD. For example, the cardiology config's d=0.75 produces an actual post-trial Cohen's d of ~1.5 (Δ=15 vs σ_residual=10.5). Use the power sweep (which simulates the actual statistical test) for true power calculations.
- **Power sweep uses only 50 simulations per n.** Production-grade power analyses use 1,000-10,000 sims per n. The included sweep is a demonstration; the full product runs 200+ sims by default with optional escalation.
- **No matplotlib chart in the sample.** The full product generates a PNG power curve chart with 80%/90% threshold lines and the minimum-n-for-80%-power annotation. Excluded from this preview for HF size hygiene.
- **Single-visit endpoint** (no repeated measures). Each participant has one CFB value at "week 24" — no per-visit longitudinal endpoint trajectories. The full product can be extended with visit-level repeated measures.
- **Synthetic, not derived from real trial data.** Effect sizes, dropout patterns, and AE profiles follow published clinical trial conventions but do NOT reflect any specific real trial. Use synthetic data for design, methodology development, and ETL testing; validate final designs against published trial literature and prior real trials.
- **No FDA SDTM/ADaM CDISC compliance in the sample CSVs.** The wide-format CSV is a flat preview format, not CDISC-conformant DM/AE/LB/QS domain tables. CDISC mapping is available in the full product (contact for SDTM/ADaM ETL).
- **Endpoint-type field hygiene is enforced**: only the trial's endpoint type populates its fields; other endpoint fields are NaN. This is by design (data hygiene invariant) and is validated as one of the 10 scorecard metrics.
- **No multi-region pooling complexity.** The sample treats sites as independent; the full product supports multi-region trial design with region-specific stratification.
---
## Ethical use guidance
This dataset is designed for:
- Biostatistics method development and educational use
- Trial design simulation and power analysis
- ETL pipeline testing against schema-compliant synthetic data
- Pharma data engineering and validation
This dataset is **not appropriate for**:
- Submission as evidence for regulatory filings (use real trial data)
- Drug efficacy claims of any kind
- Predicting outcomes for any specific real intervention
- Training models that produce clinical recommendations
---
## Companion datasets in the Healthcare vertical
- [HLT-001](https://huggingface.co/datasets/xpertsystems/hlt001-sample) — Synthetic Patient Population (5K patients × 79 cols, CDC/NHANES calibrated)
- [HLT-002](https://huggingface.co/datasets/xpertsystems/hlt002-sample) — Synthetic EHR Dataset (4K encounters + FHIR R4 bundles, HL7/ICD-10/RxNorm/LOINC)
- **HLT-003** — Synthetic Clinical Trial Dataset (you are here)
Use **HLT-001 + HLT-002 + HLT-003 together** for full population-to-encounter-to-trial healthcare ML workflows.
---
## Citation
If you use this dataset, please cite:
```bibtex
@dataset{xpertsystems_hlt003_sample_2026,
author = {XpertSystems.ai},
title = {HLT-003 Synthetic Clinical Trial Dataset (Sample Preview)},
year = 2026,
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/xpertsystems/hlt003-sample}
}
```
---
## Contact
- **Web:** [https://xpertsystems.ai](https://xpertsystems.ai)
- **Email:** [pradeep@xpertsystems.ai](mailto:pradeep@xpertsystems.ai)
- **Full product catalog:** Cybersecurity, Insurance & Risk, Materials & Energy, Oil & Gas, Healthcare, and more
**Sample License:** CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0)
**Full product License:** Commercial — please contact for pricing.