Abstract
INTRODUCTION: Reproducibility, consistency, and transparency are essential to responsible and ethical scientific inquiry, though practices supporting these qualities are often neglected. However, in many cases data are confidential or otherwise unable to be shared publicly. This tutorial describes a method utilizing generative adversarial networks (GANs) to create synthetic data that are sufficiently similar to the original dataset in such cases where the source data cannot be shared or where the source data are too sparse as to internally validate results. METHODS: Utilizing an exemplar study that aimed to create a clinical prediction model employing a novel echocardiographic measurement to differentiate between acute coronary syndrome and Takotsubo syndrome, we demonstrate the procedure of fitting a GAN and evaluating the resulting synthetic dataset against the results from the source dataset using conventional analytic methodologies. Further, we include relevant R code and output from this process to aid in implementation. RESULTS: The procedure we detail yielded a synthetic dataset that was largely similar to the source data used in univariate descriptive statistics, significance testing comparing variables across datasets, data visualizations, and yielded largely comparable secondary model fit and accuracy metrics. CONCLUSIONS: We demonstrated that through the implementation of a well-tuned GAN, synthetic data can be generated as a sufficiently faithful simulacrum of the source data for the purposes of internal validation, transparency of method, and reproducibility of analytic results.