inst/docs/requirements.md

Introduction

pmplots is an R package to generate exploratory and diagnostic plots commonly of interest in pharamcometrics. Each function in pmplots is named according to the specific plot it generates via calls to functions in the ggplot2 R package.

This document lists the functional requirements for the pmplots package.

Requirements for pharamcometric plotting package pmplots

Section RID Requirement Default column names 1 Column RES refers to residual; rendered res in function names 2 Column WRES weighted residual; rendered wres in function names 3 Column CWRES refers to conditional weighted residual; rendered cwres in function names 4 Column TIME refers to model time; rendered time in function names 5 Column TAFD refers to time after first dose; rendered tafd in function names 6 Column TAD refers to time after dose; rendered tad in function names 7 Column DV refers to observed data; rendered dv in function names 8 Column PRED refers to population level predictions; rendered pred in function names 9 Column IPRED refers to individual level predictions; rendered ipred in function names Plots generated 10 Functions dv_time, dv_tafd, and dv_tad plot DV versus the appropriate time measure; both lines and points are plotted 11 Functions dv_pred and dv_ipred plot DV versus the appropriate predicted value; a line of identity is added as well as a loess smothing line; both the x- and y-axis maybe be transformed to log scale with the loglog argument; if loglog is used, only positive values are retained for the plot 12 Functions res_time, res_tafd, and res_tad plots residual versus the appropriate time measure; a reference line is added at res=0 as well as a loess smoothing line 13 Functions wres_time, wres_tafd, and wres_tad plots weighted residual versus the appropriate time measure; a reference line is added at wres=0 as well as a loess smoothing line 14 Functions cwres_time, cwres_tafd, and cwres_tad plots conditional weighted residual versus the appropriate time measure; a reference line is added at cwres=0 as well as a loess smoothing line 15 Functions res_pred, wres_pred and cwres_pred plot the appropriate residual versus population model predictions (PRED); a horizontal reference line is added at c/w/res=0 as well as a loess smoothing line 16 Functions res_cont, wres_cont, and cwres_cont plot the appropriate residual versus a continuous covariate in the data set; a horizontal reference line is added at c/w/res=0 as well as a loess smoothing line 17 Functions res_cat, wres_cat, and cwres_cat makes a boxplot of the appropriate residual versus a categorical data set column 18 Function wres_q and cwres_q generates quantile-quantile plots of the appropriate residual value; a refereince identity line is added 19 Function eta_hist generates histograms of model ETAs and returns a list gg/ggplot objects 20 Function eta_cont generates a scatterplot of model ETAs versus a continuous variable in the data set; a horizontal reference line at ETAn=0 and loess smoothing line are also added to the plot 21 Function eta_cat generates boxplot summaries of model ETAs by a categorical variable in the data set 22 Function eta_pairs generates pairs plots using the ggpairs function from the GGally package 23 Function splitplot splits the input data set according to a discrete data item and generates a plot according to a user-named function, returning a list of gg/ggplot objects Continuous scatter 24 x-axis options availabe in x_scale_continuous can be modified by the xs argument 25 y-axis options available in y_scale_continuous can be modified by the ys argument 26 When loess smoothing lines are generated, geom_smooth with ggplot2 default behavior is used; the smooth may be modified through the smooth argument 27 A title may be added through the title argument Boxplot summaries 28 x-axis options availabe in x_scale_discrete can be modified by the xs argument 29 y-axis options available in y_scale_continuous can be modified by the ys argument 30 Boxplot summaries are generated using geom_boxplot with ggplot2 default configuration 31 If shown is TRUE, a numeric summary of each box is included below each box. In the summary, n is the number of non-NA observations in the y column for that box and N is the number of unique ID values for that box. An error will be generated if ID does not exist in the plotting data frame when shown is TRUE. When N is equal to n in the summary, only n is shown. 32 A title may be added thought the title argument Input data 33 Data are input as data.frame or tibble 34 Data sets are expected to be filter prior to plotting, so that the input data frame only contains rows that are appropriate for the current plotting function 35 For continuous scatter plots, numeric data are required or an error is generated; data are considered discrete if they are numeric or integer 36 For boxplot summaries, discrete data are required for x-axis for boxplot summaries; data are considered discrete of they are character, factor, or logical Look and feel 37 Scatter plots are made with black points via geom_point 38 Box plots are made with white fill via geom_boxplot 39 The ggplot2 default grid lines are retained on the plot 40 Plots are made with white background 41 Loess lines are blue and dashed 42 Lines of identity and horizontal reference lines for scatter plots are solid grey R packages 43 Imports: dplyr (>= 0.7.2), rlang (>= 0.1.2) 44 Depends: ggplot2 (>= 2.2.1) 45 Suggests: testthat

metrumresearchgroup/pmplots documentation built on Oct. 15, 2024, noon