End-to-end R/pharmaverse workflow to simulate individual patient data (IPD) for a registered clinical trial using a g-formula causal-DAG simulator. Given an NCT ID with posted protocol + results, derives SDTM-style CRFs, builds evidence-based structural causal models, parameterizes them from ClinicalTrials.gov / literature priors, runs forward simulation in R, creates SDTM/ADaM outputs with pharmaverse packages, and iteratively calibrates marginal statistics to the published results without breaking causal identifiability.
$npx -y skills add rconsortium/pharma-skills --skill clinical-trial-ipd-simInstalls into the current project.
Run `npx skills use "https://github.com/rconsortium/pharma-skills" --skill "rconsortium/pharma-skills/clinical-trial-ipd-sim"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/rconsortium/pharma-skills" that are relevant to the current task. Run `npx skills add "https://github.com/rconsortium/pharma-skills"` and select the relevant skills, then follow their instructions.