Skip to contents

Exposure-response plots

Build exposure-response plots from any model that implements er_predict()

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 er_plot object
er_plot_build()
Build and render an er_plot object

Plot builder functions

Low level functions to draw specific components of an exposure-response plot

er_style
Builder functions for exposure-response plots
er_style_tag()
Tag a builder with structural/aesthetic metadata
er_style_model_ribbonline() er_style_model_line() er_style_model_spaghetti()
Model curve builders for exposure-response plots
er_style_summary_pvalue() er_style_summary_n() er_style_summary_coefficients() er_style_summary_gof()
Summary annotation builders for exposure-response plots
er_style_quantile_errorbar() er_style_quantile_errorbar_vlines() er_style_quantile_pointrange() er_style_quantile_pointrange_vlines()
Quantile summary builders for exposure-response plots
er_style_data_boxjitter() er_style_data_overlay() er_style_data_hex()
Data layer builders for exposure-response plots
er_style_group_boxplot() er_style_group_histogram() er_style_group_violin() er_style_group_linerange() er_style_group_boxjitter() er_style_group_violinjitter()
Group panel builders for exposure-response plots

VPC plots

Functions to build visual predictive check plots

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

VPC plot builder functions

Low level functions to draw specific components of a VPC plot

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

The generics a model must (or may) implement to work with erplots

er_predict() er_simulate() er_summary()
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