|
| 1 | +--- |
| 2 | +title: "De-Mystifying R Programming in Clinical Trials" |
| 3 | +author: |
| 4 | + - name: Venkatesan Balu |
| 5 | +description: "A blog highlighting the benefits/limitations of using R Programming and using the right tools to create value" |
| 6 | +date: "2024-04-15" |
| 7 | +categories: [community] |
| 8 | +image: "Rlogo.png" |
| 9 | +editor: |
| 10 | + markdown: |
| 11 | + wrap: 72 |
| 12 | +--- |
| 13 | + |
| 14 | +<!--------------- typical setup -----------------> |
| 15 | + |
| 16 | +```{r setup, include=FALSE} |
| 17 | +long_slug <- "2024-04-15_de-_mystifying__..." |
| 18 | +# renv::use(lockfile = "renv.lock") |
| 19 | +``` |
| 20 | + |
| 21 | +<!--------------- post begins here -----------------> |
| 22 | + |
| 23 | +## Introduction |
| 24 | + |
| 25 | +The use of R programming in clinical trials has not always been the most |
| 26 | +popular and obvious in the past. Despite experiencing significant growth |
| 27 | +in recent years, the adoption of R programming in clinical trials is not |
| 28 | +as widespread and evident as anticipated. Practical implementation faces |
| 29 | +obstacles due to various factors, including occasional |
| 30 | +misunderstandings, particularly in the context of validation, and a |
| 31 | +notable lack of awareness regarding its capabilities. However, despite |
| 32 | +these challenges, R is steadily establishing a growing niche within the |
| 33 | +pharmaceutical industry. |
| 34 | + |
| 35 | +## Opportunities for R Programming in Clinical Trials |
| 36 | + |
| 37 | +Although R is versatile and applicable in various settings, it is |
| 38 | +commonly associated with scientific computing and statistics. In the |
| 39 | +context of clinical trials, where researchers aim to understand and |
| 40 | +enhance drug development and testing processes, R has become a prominent |
| 41 | +tool for analyzing the collected data. While SAS® has been a |
| 42 | +longstanding programming language for clinical trials, the industry has |
| 43 | +been exploring alternative options. There is a quest for sustainable |
| 44 | +technology and tools that can effectively address industry challenges. |
| 45 | + |
| 46 | +To drive innovation, there is a need to move away from traditional, |
| 47 | +inefficient processes and tools toward solutions that are efficient, |
| 48 | +simple, easy to implement, reliable, and cost-effective. Collaboration |
| 49 | +among industry stakeholders is crucial to develop a robust technology |
| 50 | +ecosystem and establish consensus on validation and regulatory |
| 51 | +benchmarks. Equally vital is preparing the workforce with the necessary |
| 52 | +skillsets to meet future demands. |
| 53 | + |
| 54 | +## Current Usage Trends of R |
| 55 | + |
| 56 | +Analyzing the current trends of R in the pharmaceutical industry reveals |
| 57 | +that its usage still has room for growth when related to Pharma |
| 58 | +Regulatory Submissions. However, R finds extensive use in public health |
| 59 | +projects, healthcare economics, exploratory and scientific analysis, |
| 60 | +trend identification, generating plots/graphs, specific statistical |
| 61 | +analysis, and machine learning. R continues to advance steadily in |
| 62 | +clinical trials, however lacks widespread usage within the clinical |
| 63 | +space. |
| 64 | + |
| 65 | +This is an area that we see gradually evolving thanks to a number of |
| 66 | +across-industry efforts such as pharmaverse. |
| 67 | + |
| 68 | +## SAS® or R Programming: Which is Better? |
| 69 | + |
| 70 | +{fig-align="center" width="500px"} |
| 71 | + |
| 72 | +The ongoing debate in the programming community revolves around whether |
| 73 | +to replace SAS® with R, use both, or explore other alternatives like |
| 74 | +Python. Instead of adopting an either-or scenario, leveraging the |
| 75 | +strengths of each programming language for specific Data Science |
| 76 | +problems is recommended, recognizing that one size does not fit all. |
| 77 | +Early adopters of R have faced challenges, with regulatory compliance |
| 78 | +for R packages being a common issue. |
| 79 | + |
| 80 | +For R to be considered for tasks related to regulatory submission, a |
| 81 | +rigorous risk assessment of R packages, feasibility analysis, and the |
| 82 | +establishment of processes for R usage through pilot projects with |
| 83 | +necessary documentation becomes imperative. We see great progress in |
| 84 | +this area through efforts such as the [R Consortium R Submissions |
| 85 | +WG](https://rconsortium.github.io/submissions-wg/). |
| 86 | + |
| 87 | +## Benefits of Using R Programming |
| 88 | + |
| 89 | +R, as a language and environment for statistical computing and graphics, |
| 90 | +possesses characteristics that make it a potentially powerful tool for |
| 91 | +Data Analysis. With approximately 2 million users worldwide and three |
| 92 | +decades of legacy, R stands out as open-source software receiving |
| 93 | +substantial support from the community. Its availability under the GNU |
| 94 | +General Public License and extensive documentation contribute to its |
| 95 | +strength. R is versatile, running on various platforms, offering a wide |
| 96 | +array of statistical and graphical techniques, and its ease of producing |
| 97 | +publication-quality plots enhances its appeal. |
| 98 | + |
| 99 | +The pharmaceutical industry has witnessed the emergence of various R |
| 100 | +packages tailored for Clinical Trial reporting. Examples include |
| 101 | +`{rtables}` for creating tables for reporting clinical trials, |
| 102 | +`{admiral}` for CDISC ADaM, `{pkglite}` to support eSubmission, and many |
| 103 | +others. These packages cater to different aspects of clinical trial data |
| 104 | +analysis, showcasing the versatility of R in this domain. |
| 105 | + |
| 106 | +This article talks more about use of R in clinical trials and how this |
| 107 | +will be used by taking advantages of open source of R. The FDA |
| 108 | +emphasizes the need for fully documenting software packages used for |
| 109 | +statistical analysis in submissions. The use of R poses specific |
| 110 | +challenges related to validation, given its free and open-source nature. |
| 111 | +To address this, the [R Validation Hub](https://www.pharmar.org/) has |
| 112 | +released guidance documents focusing in this space. |
| 113 | + |
| 114 | +Given that the cost of the R package is non-chargeable, it can also |
| 115 | +serve as a potential tool for API integration. For instance, in signal |
| 116 | +detection, R packages can prove to be valuable tools due to the |
| 117 | +intricate derivation process for EBGM in the Bayesian approach, which |
| 118 | +aims to mitigate false positive signals resulting from multiple |
| 119 | +comparisons. The computation adjusts the observed-to-expected reporting |
| 120 | +ratio for temporal trends and confounding variables such as age and sex. |
| 121 | +While both methods can estimate this, the accessibility of R as free |
| 122 | +software enables easy integration into any system as an API or for macro |
| 123 | +estimation purposes without any copyrights issue. As always though |
| 124 | +consult the license of any package being used to be sure your usage is |
| 125 | +in compliance. |
| 126 | + |
| 127 | +## Identifying the Limitations in Using R Programming |
| 128 | + |
| 129 | +It is crucial to note that software cost is essential to any company, |
| 130 | +including Pharma and Biotechs. While R and RStudio® are free and SAS® |
| 131 | +requires an annual license, using R instead of SAS® may not always lower |
| 132 | +costs. The cost of software is only one part of the equation. To be used |
| 133 | +in a highly regulated industry such as pharmaceuticals, software |
| 134 | +validation, maintenance, and support are critical, and their costs need |
| 135 | +to be considered. Although R is free and open source, it comes with a |
| 136 | +learning curve, and in short term the industry might face a shortage of |
| 137 | +experienced pharma R programmers compared to those familiar with SAS®. |
| 138 | + |
| 139 | +## Leveraging the Right Tools to Capture Value |
| 140 | + |
| 141 | +Capturing the value of R programming starts with a clear vision for its |
| 142 | +use and a systematic approach to identifying and prioritizing the needs |
| 143 | +in the industry. Clinical Data Science is evolving rapidly, and the |
| 144 | +industry actively seeks alternative solutions to unlock valuable |
| 145 | +insights from diverse datasets. Recognizing the need for innovation, |
| 146 | +collaboration, and efficient tools is crucial. Rather than viewing SAS®, |
| 147 | +R, and Python as mutually exclusive, leveraging the strengths of each |
| 148 | +for appropriate Data Science problems provides a nuanced and effective |
| 149 | +approach. |
| 150 | + |
| 151 | +Ensuring data quality, scientific integrity, and regulatory compliance |
| 152 | +through risk assessment frameworks, validation, and documentation are |
| 153 | +imperative in this dynamic landscape. The pharmaceutical industry's |
| 154 | +journey toward embracing R reflects the broader trend of industries |
| 155 | +recognizing the value and potential of open-source tools in addressing |
| 156 | +complex challenges. |
| 157 | + |
| 158 | +{fig-align="center"} |
| 159 | + |
| 160 | +## Author |
| 161 | + |
| 162 | +Venkatesan Balu is the Associate Director, Global Data Sciences, Navitas |
| 163 | +Life Sciences with 15+ years of experience in the Biostatistics domain, |
| 164 | +and in Phase I to Phase IV Clinical Trials across various therapeutic |
| 165 | +areas, BABE and PK studies. He has invaluable expertise in providing |
| 166 | +inputs to study design, sample size, SAP, outlier evaluation, interim |
| 167 | +analysis, complex statistical evaluation & model selection, and |
| 168 | +regulatory requirement. He is a technical leader in drug development |
| 169 | +strategy, adaptive design, portfolio optimization, and decision-making |
| 170 | +in clinical trials. |
| 171 | + |
| 172 | +<!--------------- appendices go here -----------------> |
| 173 | + |
| 174 | +```{r, echo=FALSE} |
| 175 | +source("appendix.R") |
| 176 | +insert_appendix( |
| 177 | + repo_spec = "pharmaverse/blog", |
| 178 | + name = long_slug |
| 179 | +) |
| 180 | +``` |
0 commit comments