clinical-trial-simulation

Design and simulate clinical trials using the TrialSimulator R package.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires TrialSimulator, survival, rpact, gsDesign, markdown, simdata, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of designing and simulating clinical trials using the TrialSimulator R package, enabling users to create detailed trial simulations and generate quality control-ready reports.

Core Features & Use Cases

  • Clinical Trial Design: Guide users through the design of clinical trials using TrialSimulator's building blocks.
  • Simulation Execution: Execute the designed trial simulation and generate results.
  • Report Generation: Produce a comprehensive report that pairs each code block with rationale, parameters, and operating characteristics.
  • Use Case: Help a biostatistician design a clinical trial, simulate it using TrialSimulator, and generate a report that outlines the design, parameters, and operating characteristics for review.

Quick Start

To simulate a clinical trial, first describe the trial design you have in mind. The skill will then guide you through the steps of setting up the simulation and generating the report.

Frequently Asked Questions about clinical-trial-simulation

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

FAQPage Schema
How do I design and simulate a clinical trial using R?

You can design and simulate a clinical trial using R by defining endpoints, arms, milestones, and regimens with the TrialSimulator package, then executing the simulation to generate operating characteristics and results.

What R packages do I need to run clinical trial simulations?

To run clinical trial simulations, you need the TrialSimulator, survival, rpact or gsDesign, markdown, and simdata R packages installed to support design, execution, and report generation.

Can I generate quality control-ready reports for clinical trial simulations in R?

Yes, you can generate quality control-ready reports that pair each R code block with its design rationale, parameters, and operating characteristics using the markdown package within the simulation workflow.

How do I set up trial arms and endpoints for a clinical trial simulation?

You set up trial arms and endpoints by utilizing the building blocks provided by the TrialSimulator R package, configuring specific therapeutic area study parameters before executing the simulation.

What is the best way to simulate clinical trial operating characteristics in R?

The best way to simulate clinical trial operating characteristics in R is using TrialSimulator to define controllers and listeners, which allows you to calculate and review performance metrics for your specific trial design.

Does TrialSimulator work with gsDesign and rpact for clinical trial design?

Yes, TrialSimulator works alongside gsDesign and rpact R packages, integrating their capabilities to build comprehensive trial designs, execute simulations, and output operating characteristic reports.