R Shiny Clinical Review Tools on the Horizon


Jimmy Wong, Statistician
FDA/Center for Drug Evaluation and Research/
Office of Translational Sciences/Office of Biostatistics

PharmaSUG Annual Conference
Baltimore, MD | May 16, 2017



Disclaimer

This presentation reflects the views of the author and should not be construed to represent FDA's views or policies.

About Myself

  • A statistician/statistical analyst in CDER's Office of Biostatistics for over a year
  • Previously in the Office of Pharmaceutical Quality as an ORISE Fellow working on post-marketing stat analysis
  • Developing R Shiny Apps for clinical reviews, such as
    • Patient-reported outcomes (PRO) visualizations
    • Forest plots for subgroups
    • Multiplicity procedures
  • Providing statistical support to reviews and data standards
  • Organizing an R Shiny Users Group within CDER

Agenda

  1. What is Shiny?
  2. How does Shiny work?
  3. How is Shiny used at the FDA?
  4. How can I start using Shiny?
  5. Take Home Points





What is Shiny?


First things first.

Shiny Intro



  • Only requires programming experience in R to develop an app
  • Used in various disciplines ranging from biostatistics, statistics education, finance, etc.
  • Free of charge to develop but cost of a server is expected for vast distribution
  • New features are continuously being developed by the RStudio team

Shiny’s Advantages

  • Data analyses and visualizations can be programmed into a user-interface format starting from base R code
  • Combined with RMarkdown, routine reports can be generated for higher productivity
  • In the regulatory setting, standardized tools can be created for efficiency in conducting reviews
  • No HTML, CSS, or JavaScript experience required but could provide enhancements
  • Access to Shiny apps can be easily done through a Shiny server





How does Shiny work?

Components of a Shiny App


  • ui.R
    • Designates the layout of user inputs and outputs
    • Assigns the variables, in the forms of slider bars, drop-down menus, etc., to receive reactive values from users
    • Sends it to server.R
  • server.R
    • Performs computations and tasks
    • Receives user inputs to execute code
    • Returns ouputs to ui.R

Launching a Shiny App (locally)


  • runApp tracing the directory
runApp("C:\\Jimmy\\MyFolder")
  • Hit Run App in RStudio
    • An advantage of using RStudio is that you can easily choose how the app is launched





How is Shiny used
at the FDA?

R Shiny Users Group



  • Initial planning meeting took place on May 4, 2017
  • Branched out from the Data Review Committee (DRC) in the Office of Biostatistics
  • Each session would focus on a specific topic/theme, such as
    • Shiny demos from other offices
    • Shiny challenges
    • Shiny updates

Shiny Apps at the FDA




Examples of currently in use and in development apps

  • Forest plots for subgroup analysis
  • Psychometrics analysis with MPlus
  • Patient-reported outcomes (PRO) visualizations
  • Gantt chart for review timeline
  • Data quality assessment
  • Text mining on medical terms

R Shiny MediaWiki Homepage


Purpose:

  • Communicates information to staff across CDER
  • Provides a brief introduction to Shiny and its capabilities
  • Hosts information for each Shiny app and instructions on how to connect to them
  • (Future) Hosts R Shiny users group information such as goals, members, projects, status, accomplishments, etc.

R Shiny MediaWiki Homepage

R Shiny MediaWiki Homepage

Shiny Server


  • A Shiny server allows users to directly launch an app using its URL in an internet browser
  • No need for having R and/or RStudio installed to run apps
  • Pilot study will start in CDER's Office of Biostatistics with several apps on the server
  • Beta testers will be recruited to “break” the apps
  • Test out the security and compliance of a server

Example: R Shiny Forest Plots App


  • Produces forest plots for subgroup analysis
  • Two data structures are supported: imputed and non-imputed
  • Users have the flexibility to choose the parameters to focus on
  • Additional adjustments can be made by users
  • Output can be directly exported from the app

Example: R Shiny Forest Plots App

Example: R Shiny Forest Plots App

Example: R Shiny Forest Plots App

Example: R Shiny Multiplicity App


  • Applies multiplicity procedures in scenarios with multiple endpoints, doses, populations, etc.
  • A variety of procedures can be used ranging from the classic Bonferroni to the more advanced Superchain (Kordzakhia and Dmitrienko, 2012)
  • Adjusted p-values, decision rules, and confidence limits can be obtained
  • Users can output results in either HTML or Word format using knitr

Example: R Shiny Multiplicity App

Example: R Shiny Multiplicity App

Example: R Shiny Multiplicity App

Example: R Shiny Multiplicity App





How can I start
using Shiny?

Starting with Shiny





Take Home Points

Take Home Points

  • Shiny is a free library in R that is used to develop interactive web applications
  • There is a great flexibility for various things that could be created using Shiny
  • Shiny apps can be easily accessible through a browser on a computer, tablet, or phone
  • Offices in FDA recently have begun developing Shiny apps that are “fit for purpose”
  • Shiny apps can serve as standardized tools to increase efficiency in drug reviews
  • An R Shiny users group is being proposed (PhUSE, ASA Statistical Computing Section, and others?)





Thank you!
Questions?