360 likes | 493 Views
MSToolkit An R library for the Simulation of Clinical Trials. Andy Nicholls anicholls@mango-solutions.com. Agenda. Clinical Trial Simulation What is MSToolkit ? What can it do? Low Level Usage High Level Usage How to get it?. Clinical Trial Simulation. Andy Nicholls
E N D
MSToolkitAn R library for the Simulation of Clinical Trials Andy Nicholls anicholls@mango-solutions.com
Agenda • Clinical Trial Simulation • What is MSToolkit? • What can it do? • Low Level Usage • High Level Usage • How to get it?
Clinical Trial Simulation Andy Nicholls anicholls@mango-solutions.com
“I have always considered it more desirable to kill computer-generated patients than real ones while calibrating design parameters”Peter Thall, MD Anderson Cancer Centre, Houston, TX
Population Treatment Adapt Treatments Dropout Response Mathematical Model What to Simulate?
What is MSToolkit? Andy Nicholls anicholls@mango-solutions.com
MSToolkit History • In 2008, Pfizer asked Mango to design and develop simulation software • R selected, since available on their grid • SAS execution was a nice to have • Needed to appeal to 2 audiences: • Those who can code in R • Those who cannot, and just want to “do it”
What is MSToolkit Today? • A free R library • Backed by Mango (validated, tests) • Functionality: • Set of “low level” functions to perform basic tasks • “High level” functions for those who want to simply “run > tweak > run > tweak” • Uses cluster (if available) to enhance performance • Can use SAS (if available) for analysis
What can MSToolkit do? Andy Nicholls anicholls@mango-solutions.com
MSToolkit: Low Level Usage • Suite of “Low Level” Functions • Aimed at R programmers • Can be used to enhance your scripts
Low Level Components • Generate possible treatments • Allocate subjects to treatment arms • Generate parameters (fixed and random) • Generate covariates • Add missingness • Add dropout • Allocate subjects to interims • Generate responses • Analyze a dataset • Summarise a dataset • Apply an interim decision • Perform macro evaluation
Low Level Components • createTreatments • allocateTreatments • createParameters • createCovariates • createMCAR • createDropout • createInterims • createResponse • analyzeData • compileSummary • interimAnalysis • macroEvaluation
Image Size Generate Covariates
MSToolkit: High Level Usage • 2 “Wrappers” for Low Level Functions • Generate simulated data (generateData) • Analyzes the data (analyzeData) • Aimed at those who don’t want to code • Allows standard definition of CTS
Population generateData analyzeData Treatment Dropout Response Mathematical Model What to Simulate? Adapt Treatments
Simulating the Analysis Image Size
The analyzeDataFunction • Key Arguments: • analysisCode: R function, R script or SAS script containing analysis code • interimCode: Optional function that performs “interim” analyses • macroCode: R function that transforms an analysis into a single “success” flag
analysisCode macroCode
analysisCode analysisCode + interimCode macroCode
Analysis code Summary code Interim code Perform analysis
How to get it? Andy Nicholls anicholls@mango-solutions.com
Getting MSToolkit • MSToolkit 2.0 on CRAN • Version 3.0 on R-Forge
Acknowledgements • Rich Pugh (Mango) • Mike Smith (Pfizer)
Questions? Andy Nicholls anicholls@mango-solutions.com