Skip to contents

Plot Functions

Top-level functions returning a ggplot object.

plot_dvtime()
Plot a dependent variable versus time
plot_dvconc()
Plot a dependent variable versus concentration
plot_gof()
Plot population overlay goodness-of-fit (GOF) plots
plot_vpc_cont()
Plot a visual predictive check (VPC) for continuous data with exact time bins
plot_vpc_cens()
Plot a censoring (BLQ-proportion) VPC with exact time bins
plot_doseprop()
Plot a dose-proportionality assessment via power law (log-log) regression
plot_vpc_legend()
Plot a legend for a visual predictive check (VPC)

Plot Builders

Lower-level renderers that draw plots from precomputed stats objects.

plot_build_vpc()
Build a VPC ggplot from a vpc_stats object
plot_build_doseprop()
Build a dose-proportionality ggplot from a doseprop_stats object

Theme Factories

Per-plot-family factories that return default theme objects for the theme argument.

plot_dvtime_theme()
Concentration-time plot theme
plot_dvconc_theme()
Response versus concentration plot theme
plot_gof_theme()
Population overlay GOF plot theme
plot_doseprop_theme()
Dose-proportionality plot theme
plot_vpc_theme()
VPC plot theme

Element Constructors

Typed constructors for theme overrides; map to ggplot2 geom aesthetics.

pmx_point()
Point aesthetics
pmx_line()
Line aesthetics
pmx_ribbon()
Ribbon aesthetics
pmx_errorbar()
Error bar aesthetics
pmx_trend()
Trend line aesthetics (dvconc loess/linear)
pmx_style()
Shared style for point and line layers
pmx_color()
GOF overlay color aesthetics

Layer Visibility

Constructors for the shown argument of plot functions.

plot_vpc_shown()
VPC layer visibility settings
plot_gof_shown()
GOF layer visibility settings

VPC Statistics

Compute observed and simulated quantile summaries for VPC plotting.

df_vpcstats()
Compute VPC summary statistics from raw simulation data

Dose-Proportionality Statistics

Power law (log-log) regression helpers.

df_doseprop()
Compute and tabulate estimates for log-log regression

Vectorized Helpers

Vectorized utilities intended for use inside dplyr::mutate().

var_addn()
Append counts of unique identifiers to group labels
var_dosenorm()
Internal Helper: Apply dose-normalization to a variable
var_predcorr()
Apply prediction correction

mrgsolve Wrappers

Convenience wrappers around mrgsolve model loading and simulation.

model_mread_load()
Load an mrgsolve model file from the internal model library
df_mrgsim_replicate()
Execute a visual predictive check (VPC) simulation using mrgsolve
df_mrgsim_addpred()
Add population predictions (PRED) to a data.frame

S3 Class System

Predicates, constructors, operators, and methods for the shared pmx_stats / pmx_theme base classes and their vpc_stats, doseprop_stats, and pmx_element siblings.

pmx_stats()
Construct a pmx_stats container
pmx_theme()
Construct a pmx_theme
is_pmx_stats()
Test whether an object is a pmx_stats container
is_pmx_vpc_plot()
Test whether an object is a pmx_vpc_plot
is_vpc_stats()
Test whether an object is a vpc_stats container
is_doseprop_stats()
Test whether an object is a doseprop_stats container
is_pmx_element()
Test whether an object is a pmx theme element
is_pmx_theme()
Test whether an object is a pmx plot theme
`+`(<pmx_vpc_plot>)
Add a layer to a pmx_vpc_plot with a facet warning
`+`(<pmx_theme>)
Combine two pmx plot themes
`+`(<pmx_element>)
Combine two pmx theme elements
print(<pmx_stats>)
Print method for pmx_stats
summary(<pmx_stats>)
Summary method for pmx_stats
as.data.frame(<pmx_stats>)
Coerce a pmx_stats object to a data.frame
print(<vpc_stats>)
Print method for vpc_stats
summary(<vpc_stats>)
Summary method for vpc_stats
print(<doseprop_stats>)
Print method for doseprop_stats
summary(<doseprop_stats>)
Summary method for doseprop_stats
print(<pmx_element>)
Print method for pmx theme elements
print(<pmx_theme>)
Print method for pmx plot themes

Datasets

Internal example datasets used in vignettes and worked examples.

data_sad
Example NONMEM Analysis-Ready Dataset for PK/PD Modeling of a Single Ascending Dose Study
data_sad_nca
Example NCA Parameter Dataset Output from PKNCA
data_sad_pkfit
Example NONMEM Analysis-Ready Dataset for PK Modeling of a Single Ascending Dose Study