Git Product home page Git Product logo

pmplots's Introduction

pmplots

The goal of pmplots is to create exploratory and diagnostic plots commonly used in pharmacometrics.

Installation

You can install the released version of pmplots from MPN with:

mpn <- "https://mpn.metworx.com/snapshots/stable/2021-06-20"
install.packages("pmplots", repos = mpn)

This installs from a specific, dated snapshot. Please check https://mpn.metworx.com/docs/snapshots/ for the most recent snapshot date.

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("metrumresearchgroup/pmplots")

Examples

library(pmplots)
library(dplyr)

data <- pmplots_data_obs()

The default pmplots behavior is to expect names following NONMEM convention, for example DV refers to observed values, PRED refers to population predicted values. With that convention, we can easily make observed versus predicted plots

dv_pred(data, yname = "MyDrug (ng/ml)")

dv_pred(data, loglog = TRUE)

NPDE plots

npde_time(data)

npde_pred(data)

QQ plots

cwres_q(data)

Exploratory plots

id <- pmplots_data_id()
cont_cat(id, x = "STUDYc", y = c("WT", "SCR", "AAG")) %>% pm_grid()

pairs_plot(id, y = c("WT//Weight (kg)", "SCR//Creat (mg/dL)", "BMI//BMI (kg/m2)"))

Some faceted versions

wrap_cont_time(data, y = c("RES","WRES", "CWRES", "NPDE"), ncol = 2)

Function and workflow overview

A functions and features (code + output) listing is available at pmplots_complete.md.

Suggested packages

Consider installing the cowplot package to help arranging plots on a page. Also, consider installing latex2exp to allow you to use latex in axis titles.

pmplots's People

Contributors

barrettk avatar dpastoor avatar kylebaron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.