clinical-trial-ipd-sim

Simulate clinical trial IPD with a g-formula causal-DAG simulator.

93|23|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/RConsortium/pharma-skills --skill clinical-trial-ipd-sim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clinical-trial-ipd-sim
Source: https://github.com/RConsortium/pharma-skills/tree/main/clinical-trial-ipd-sim
Command: npx skills add https://github.com/RConsortium/pharma-skills --skill clinical-trial-ipd-sim

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires renv, dplyr, tidyr, purrr, readr, tibble, lubridate, stringr, rlang, survival, flexsurv, broom, jsonlite, sdtm.oak, admiral, haven, tidytlg, xportr, datasetjson, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the challenge of generating synthetic individual patient data (IPD) for clinical trials, ensuring that the simulated data aligns with published trial results while maintaining an explicit causal structure.

Core Features & Use Cases

  • Causal-DAG Simulation: Utilizes a g-formula causal-DAG simulator to generate IPD that matches both marginal statistics and joint distributions of the trial results.
  • SDTM/ADaM Derivations: Produces SDTM-style CRFs and ADaM analysis datasets following CDISC standards for data exchange and analysis.
  • Use Case: When a user provides an NCT ID and wants to simulate IPD for a trial with published results and a protocol document, this skill can generate synthetic data for analysis and modeling.

Quick Start

Run the clinical-trial-ipd-sim skill on an NCT ID (e.g., NCT04035486) to generate synthetic IPD, CRFs, and SDTM/ADaM datasets.

Frequently Asked Questions about clinical-trial-ipd-sim

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate synthetic individual patient data for clinical trials?

You can generate synthetic individual patient data (IPD) for clinical trials using a g-formula causal-DAG simulator that aligns simulated data with published trial results while maintaining an explicit causal structure.

Can I produce SDTM and ADaM datasets from simulated clinical trial data?

Yes, the simulation produces SDTM-style CRFs and ADaM analysis datasets following CDISC standards for data exchange by leveraging the pharmaverse stack for standards compliance.

What is a causal-DAG simulator and how does it match published trial results?

A causal-DAG simulator uses a g-formula approach to generate synthetic IPD that matches both marginal statistics and joint distributions of published clinical trial results.

Do I need R 4.3 and the pharmaverse stack to simulate clinical trial IPD?

Yes, simulating clinical trial IPD with this approach requires R 4.3 or higher along with the pharmaverse stack, including packages like admiral, sdtm.oak, and xportr for CDISC compliance.

How do I simulate IPD using an NCT ID from ClinicalTrials.gov?

Provide an NCT ID along with a protocol document to simulate synthetic IPD that aligns with the published trial results and generates corresponding SDTM and ADaM datasets.

What are the limitations of using causal-DAG simulation for clinical trial data?

Causal-DAG simulation aligns synthetic IPD with published trial statistics and joint distributions, but requires R 4.3+ and the full pharmaverse stack to execute, which may present an environment setup barrier.