Skip to content
dicook edited this page Feb 19, 2015 · 8 revisions

Create a shiny app with ggvis plots for diagnosing nonlinear mixed effects models

Summary: Nonlinear mixed effects models are used to study drug concentrations in clinical trials. Models are typically fitted using external software, NONMEM, MONOLIX, but sometimes using the nlme R package. Diagnosing these models is aided by good plots of the observed and fitted values, and covariates. Linking these plots should be possible using the new R package ggvis, and this is the goal of this project, to extend existing work to include linked plots.

Description: : Start with the fit4NM package, which is a RGtk2 GUI containing base graphics. This package plots patient drug concentration profiles, the fitted values, residuals, with some capacity for faceting by covariates. Versions of this package exist on CRAN for Windows and linux. The package fit4NM-EDA is a shell of a shiny app that uses ggplot2 graphics for a subset of the displays available in fit4NM. This code is available on github fit4NM. For this project we would like to generate plots using ggvis, and provide linking within and between the plots. Profile plots show drug concentration over time, for each patient, where points are connected by lines. With a lot of patients there are many overplotted lines. Being able to highlight one point and have the full profile for the patient will help understand the drug elimination patterns. Because each patient also typically has associated demographic information, like weight, age, gender, linking plots of these characteristics helps to assess demographic-specific drug effects. The app needs to take data from model fits made with packages like NONMEM and MONOLIX, or even nlme, and provide an interface to the user to select variables and types of plots.

Related work:

Potential tasks:

  • Take the shiny app shell from fit4NM-EDA, and re-do the plots using ggvis.
  • Profiles plots of drug concentration, where profiles can be selected by brushing a point.
  • Scatterplots, side-by-side boxplots, histograms of covariates displayed
  • Multiple plots displayed on the page should be linked so that a user selecting an element in one plot, will trigger appropriate highlighting in the other plots.

Skills required:

  • Knowledge of shiny, ggvis, basic statistical plots

Test: Make a scatter plot of these measurements in ggvis, which has basic categorical variable linking available. When the user selects a point from patient A, all observations from patient A will highlight

Mentor: Eun-Kyung Lee ([@](mailto:lee.eunk {at} gmail {dot} com)) Di Cook ([@](mailto:visnut {at} gmail {dot} com))

Disclaimer: