Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #143 Navitas R blog #150

Merged
merged 7 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions inst/WORDLIST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ atoxgr
auth
AVAL
AVALU
Balu
basel
bayer
bb
Expand All @@ -102,6 +103,7 @@ bindEvent
Biostatisticians
Biostatistics
Biostats
Biotechs
blogpost
bmi
BMI
Expand Down Expand Up @@ -166,6 +168,7 @@ datetime
Datetime
dcf
DCUTDT
De
defaultPageSize
deliverables
DEMOADY
Expand Down Expand Up @@ -201,6 +204,7 @@ DTHFL
dtm
DTM
dy
EBGM
eclinical
eCTD
edoardo
Expand All @@ -216,6 +220,7 @@ envsetup
EOSDT
EPI
eps
eSubmission
ethz
eval
eventID
Expand Down Expand Up @@ -354,6 +359,7 @@ modularize
Mosteller
msrc
na
Navitas
nas
natively
ncol
Expand Down Expand Up @@ -482,6 +488,7 @@ Siggaard
signif
siloed
SITEIDN
skillsets
soumitra
Soumitra
ss
Expand Down Expand Up @@ -564,6 +571,7 @@ vehIoJgdA
Velásquez's
venkatachalam
Venkatachalam
Venkatesan
Veríssimo
ViiV
Viyash
Expand All @@ -587,6 +595,7 @@ webr
webR
WebR
wfk
WG
wg
wikipedia
WnpvVgmyE
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added posts/2024-04-15_de-_mystifying__.../Rlogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added posts/2024-04-15_de-_mystifying__.../Signpost.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions posts/2024-04-15_de-_mystifying__.../appendix.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
paste(paste("##", name, "{.appendix}"), " ", content, sep = "\n")
}
markdown_link <- function(text, path) {
paste0("[", text, "](", path, ")")
}



# worker functions --------------------------------------------------------

insert_source <- function(repo_spec, name,
collection = "posts",
branch = "main",
host = "https://github.com",
text = "source code") {
path <- paste(
host,
repo_spec,
"tree",
branch,
collection,
name,
"code_sections.qmd",
sep = "/"
)
return(markdown_link(text, path))
}

insert_timestamp <- function(tzone = Sys.timezone()) {
time <- lubridate::now(tzone = tzone)
stamp <- as.character(time, tz = tzone, usetz = TRUE)
return(stamp)
}

insert_lockfile <- function(repo_spec, name,
collection = "posts",
branch = "main",
host = "https://github.com",
text = "R environment") {
path <- paste(
host,
repo_spec,
"tree",
branch,
collection,
name,
"renv.lock",
sep = "/"
)
return(markdown_link(text, path))
}



# top level function ------------------------------------------------------

insert_appendix <- function(repo_spec, name, collection = "posts") {
appendices <- paste(
markdown_appendix(
name = "Last updated",
content = insert_timestamp()
),
" ",
markdown_appendix(
name = "Details",
content = paste(
insert_source(repo_spec, name, collection),
insert_lockfile(repo_spec, name, collection),
sep = ", "
)
),
sep = "\n"
)
knitr::asis_output(appendices)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
---
title: "De-Mystifying R Programming in Clinical Trials"
author:
- name: Venkatesan Balu
description: "A blog highlighting the benefits/limitations of using R Programming and using the right tools to create value"
date: "2024-04-15"
categories: [community]
image: "Rlogo.png"
editor:
markdown:
wrap: 72
---

<!--------------- typical setup ----------------->

```{r setup, include=FALSE}
long_slug <- "2024-04-15_de-_mystifying__..."
# renv::use(lockfile = "renv.lock")
```

<!--------------- post begins here ----------------->

## Introduction

The use of R programming in clinical trials has not always been the most
popular and obvious in the past. Despite experiencing significant growth
in recent years, the adoption of R programming in clinical trials is not
as widespread and evident as anticipated. Practical implementation faces
obstacles due to various factors, including occasional
misunderstandings, particularly in the context of validation, and a
notable lack of awareness regarding its capabilities. However, despite
these challenges, R is steadily establishing a growing niche within the
pharmaceutical industry.

## Opportunities for R Programming in Clinical Trials

Although R is versatile and applicable in various settings, it is
commonly associated with scientific computing and statistics. In the
context of clinical trials, where researchers aim to understand and
enhance drug development and testing processes, R has become a prominent
tool for analyzing the collected data. While SAS® has been a
longstanding programming language for clinical trials, the industry has
been exploring alternative options. There is a quest for sustainable
technology and tools that can effectively address industry challenges.

To drive innovation, there is a need to move away from traditional,
inefficient processes and tools toward solutions that are efficient,
simple, easy to implement, reliable, and cost-effective. Collaboration
among industry stakeholders is crucial to develop a robust technology
ecosystem and establish consensus on validation and regulatory
benchmarks. Equally vital is preparing the workforce with the necessary
skillsets to meet future demands.

## Current Usage Trends of R

Analyzing the current trends of R in the pharmaceutical industry reveals
that its usage still has room for growth when related to Pharma
Regulatory Submissions. However, R finds extensive use in public health
projects, healthcare economics, exploratory and scientific analysis,
trend identification, generating plots/graphs, specific statistical
analysis, and machine learning. R continues to advance steadily in
clinical trials, however lacks widespread usage within the clinical
space.

This is an area that we see gradually evolving thanks to a number of
across-industry efforts such as pharmaverse.

## SAS® or R Programming: Which is Better?

![SAS® or R?](Signpost.jpg){fig-align="center" width="500px"}

The ongoing debate in the programming community revolves around whether
to replace SAS® with R, use both, or explore other alternatives like
Python. Instead of adopting an either-or scenario, leveraging the
strengths of each programming language for specific Data Science
problems is recommended, recognizing that one size does not fit all.
Early adopters of R have faced challenges, with regulatory compliance
for R packages being a common issue.

For R to be considered for tasks related to regulatory submission, a
rigorous risk assessment of R packages, feasibility analysis, and the
establishment of processes for R usage through pilot projects with
necessary documentation becomes imperative. We see great progress in
this area through efforts such as the [R Consortium R Submissions
WG](https://rconsortium.github.io/submissions-wg/).

## Benefits of Using R Programming

R, as a language and environment for statistical computing and graphics,
possesses characteristics that make it a potentially powerful tool for
Data Analysis. With approximately 2 million users worldwide and three
decades of legacy, R stands out as open-source software receiving
substantial support from the community. Its availability under the GNU
General Public License and extensive documentation contribute to its
strength. R is versatile, running on various platforms, offering a wide
array of statistical and graphical techniques, and its ease of producing
publication-quality plots enhances its appeal.

The pharmaceutical industry has witnessed the emergence of various R
packages tailored for Clinical Trial reporting. Examples include
`{rtables}` for creating tables for reporting clinical trials,
`{admiral}` for CDISC ADaM, `{pkglite}` to support eSubmission, and many
others. These packages cater to different aspects of clinical trial data
analysis, showcasing the versatility of R in this domain.

This article talks more about use of R in clinical trials and how this
will be used by taking advantages of open source of R. The FDA
emphasizes the need for fully documenting software packages used for
statistical analysis in submissions. The use of R poses specific
challenges related to validation, given its free and open-source nature.
To address this, the [R Validation Hub](https://www.pharmar.org/) has
released guidance documents focusing in this space.

Given that the cost of the R package is non-chargeable, it can also
serve as a potential tool for API integration. For instance, in signal
detection, R packages can prove to be valuable tools due to the
intricate derivation process for EBGM in the Bayesian approach, which
aims to mitigate false positive signals resulting from multiple
comparisons. The computation adjusts the observed-to-expected reporting
ratio for temporal trends and confounding variables such as age and sex.
While both methods can estimate this, the accessibility of R as free
software enables easy integration into any system as an API or for macro
estimation purposes without any copyrights issue. As always though
consult the license of any package being used to be sure your usage is
in compliance.

## Identifying the Limitations in Using R Programming

It is crucial to note that software cost is essential to any company,
including Pharma and Biotechs. While R and RStudio® are free and SAS®
requires an annual license, using R instead of SAS® may not always lower
costs. The cost of software is only one part of the equation. To be used
in a highly regulated industry such as pharmaceuticals, software
validation, maintenance, and support are critical, and their costs need
to be considered. Although R is free and open source, it comes with a
learning curve, and in short term the industry might face a shortage of
experienced pharma R programmers compared to those familiar with SAS®.

## Leveraging the Right Tools to Capture Value

Capturing the value of R programming starts with a clear vision for its
use and a systematic approach to identifying and prioritizing the needs
in the industry. Clinical Data Science is evolving rapidly, and the
industry actively seeks alternative solutions to unlock valuable
insights from diverse datasets. Recognizing the need for innovation,
collaboration, and efficient tools is crucial. Rather than viewing SAS®,
R, and Python as mutually exclusive, leveraging the strengths of each
for appropriate Data Science problems provides a nuanced and effective
approach.

Ensuring data quality, scientific integrity, and regulatory compliance
through risk assessment frameworks, validation, and documentation are
imperative in this dynamic landscape. The pharmaceutical industry's
journey toward embracing R reflects the broader trend of industries
recognizing the value and potential of open-source tools in addressing
complex challenges.

![Leveraging the Right Tools](RightTool.png){fig-align="center"}

## Author

Venkatesan Balu is the Associate Director, Global Data Sciences, Navitas
Life Sciences with 15+ years of experience in the Biostatistics domain,
and in Phase I to Phase IV Clinical Trials across various therapeutic
areas, BABE and PK studies. He has invaluable expertise in providing
inputs to study design, sample size, SAP, outlier evaluation, interim
analysis, complex statistical evaluation & model selection, and
regulatory requirement. He is a technical leader in drug development
strategy, adaptive design, portfolio optimization, and decision-making
in clinical trials.

<!--------------- appendices go here ----------------->

```{r, echo=FALSE}
source("appendix.R")
insert_appendix(
repo_spec = "pharmaverse/blog",
name = long_slug
)
```
Loading