Skip to contents

Exposure-response plots

The compositional mini-grammar for designing exposure-response plots, dividing plot structure into distinct layers for the data, the model, the quantile summaries, textual summaries, and the exposure group plots.

er_plot()
The exposure-response plotting mini-language
er_plot_add_model()
Add a fitted-model curve/ribbon layer
er_plot_add_summary()
Add a summary annotation layer
er_plot_add_quantiles()
Add a quantile-binned response summary layer
er_plot_add_data()
Add a raw-data layer
er_plot_add_groups()
Add a grouped exposure-distribution panel
er_plot_theme()
Adjust theme/labels for an exposure-response plot
er_plot_build()
Build and render an exposure-response plot

Time-to-event plots

The compositional mini-grammar for designing Kaplan-Meier/survival-over-time plots, dividing plot structure distinct layers for survival curves, censoring markers, risk tables, textual summaries, and the survival model.

er_tte()
The time-to-event plotting mini-language
er_tte_add_curve()
Add a Kaplan-Meier curve layer
er_tte_add_censor()
Add a censoring-marks layer
er_tte_add_risktable()
Add a number-at-risk panel
er_tte_add_summary()
Add a summary annotation layer
er_tte_add_model()
Add a model-based survival curve overlay
er_tte_theme()
Adjust theme/labels for a time-to-event plot
er_tte_build()
Build and render a time-to-event plot

Visual predictive check plots

The compositional mini-grammar for designing visual predictive check plots, dividing plot structure into distinct layers for the observed data and the simulated data.

er_vpc()
The exposure-response VPC mini-language
er_vpc_add_observed()
Add the observed-data layer to a VPC plot
er_vpc_add_simulated()
Add the simulated-data layer to a VPC plot
er_vpc_theme()
Adjust theme/labels for a VPC plot
er_vpc_build()
Build and render a VPC plot

Builder functions for exposure-response plots

Low level functions to draw specific components of an exposure-response plot. Each function supports one option for the style argument to the corresponding layer in the exposure-response plot.

Builder functions for time-to-event plots

Low level functions to draw specific components of a time-to-event plot. Each function supports one option for the style argument to the corresponding layer in the time-to-event plot.

er_style_tte
Builder functions for time-to-event plots
er_style_tte_curve_km()
Kaplan-Meier curve builders for the TTE grammar
er_style_tte_censor_ticks()
Censoring-mark builders for the TTE grammar
er_style_tte_risktable_text()
Number-at-risk builders for the TTE grammar
er_style_tte_summary_logrank() er_style_tte_summary_n() er_style_tte_summary_coefficients() er_style_tte_summary_gof()
Summary annotation builders for the TTE grammar
er_style_tte_model_line()
Model-curve builders for the TTE grammar

Builder functions for visual predictive check plots

Low level functions to draw specific components of a VPC plot. Each function supports one option for the style argument to the corresponding layer in the VPC plot.

Builder function metadata

Functions used to tag a new builder function with the required metadata and report on that metadata.

er_style_tag()
Register a builder's structural/aesthetic metadata
er_style_labels()
List builders registered for string-based style dispatch

Confidence intervals

Helper functions to compute confidence intervals.

ci_clopper_pearson()
Clopper-Pearson confidence interval for binary data
ci_poisson()
Exact Poisson confidence interval for a count rate
ci_t()
t-interval confidence interval for the mean of continuous data
ci_quantile()
Distribution-free confidence interval for a sample quantile

Model interface

Generic functions that define the interface between models and plots.

er_predict() er_simulate() er_summary() er_predict_survival()
Model interface for exposure-response plots

Other

Other functions and objects.

cut_exposure_quantile() cut_quantile()
Cut a continuous variable into quantiles
erplots_data
Simulated exposure-response data