Combining R and SAS with tidy functional programming for clinical trial design

Mary Rosenbloom Co-Author
ALCON Laboratories Inc
 
James Otto First Author
Alcon
 
James Otto Presenting Author
Alcon
 
Monday, Aug 5: 2:35 PM - 2:50 PM
3460 
Contributed Papers 
Oregon Convention Center 
We propose a functional programming style approach to Monte Carlo sample size determination analysis in R and SAS. Our proposed workflow centers around the development of a study-specific R package used to conduct the analysis, exporting functions for simulating data, modeling data, and summarizing results. Doing so has numerous advantages–R packages have a predictable structure, come with powerful documentation and unit testing tools, are portable, and are easy to collaborate on. In lieu of more standard functional tools such as the lapply() family or the {purrr} library we recommend the use of the exported functions with parallelizable rowwise operations on nested tibbles from the {tidyr} package, extending the notion of "tidy" data to the "tidy" organization of simulation data. We also discuss a functional style approach to modeling data in SAS via macros for designs involving the use of SAS-specific tools such as PROC MIXED, demonstrating a methodology for using SAS and R in tandem. We conclude with an example from ophthalmology, showcasing the development and use of an R package and SAS code for such an analysis at Alcon.

Keywords

Functional Programming

Clinical Trial Design

Monte Carlo Simulation

R

SAS 

Main Sponsor

Section for Statistical Programmers and Analysts