Model check basis

All vmc plots begin with a call to mcplot(), supplying the model object and observed data. You can then add components with +.

mcplot()

Create a new mcplot

`+`(<modelcheck>)

Add components to a plot

Distribution generated from the model

The distributions generated from the model contain the predictive distribution and the distribution of push forward transformations that the model used to link the independent variables to the response variable.

mc_draw()

Define how to draw from posterior distribution

Uncertainty representation layers

An uncertainty representation layers combines a geom (and the corresponding statistical transformation), the draws representation, and the sampling. You can specify different uncertainty representations for model distribution and observed data respectively by mc_model_ and mc_obs_. You can also change the arguments of the ggplot/ggdist geoms by passing them in uncertainty representation layers.

mc_obs_auto() mc_model_auto()

Recommend a geom

mc_obs_ccdf() mc_model_ccdf()

CCDF bar plot for model predictions

mc_obs_cdf() mc_model_cdf()

CDF bar plot for model predictions

mc_obs_custom() mc_model_custom()

Customized geom

mc_obs_dots() mc_model_dots()

Dot plot for model predictions

mc_obs_dotsinterval() mc_model_dotsinterval()

Dots interval plot for model predictions

mc_obs_eye() mc_model_eye()

Eye (violin + interval) plot for model predictions

mc_obs_gradientinterval() mc_model_gradientinterval()

Gradient + interval plot for model predictions

mc_obs_halfeye() mc_model_halfeye()

Half-eye (density + interval) plot for model predictions

mc_obs_histinterval() mc_model_histinterval()

Histogram + interval plot for model predictions

mc_obs_interval() mc_model_interval()

Interval plot for model predictions

mc_obs_line() mc_model_line()

Line geom

mc_obs_lineribbon() mc_model_lineribbon()

Line + multiple-ribbon plot for model predictions

mc_obs_point() mc_model_point()

Points geom

mc_obs_pointinterval() mc_model_pointinterval()

Point + interval plot for model predictions

mc_obs_ribbon() mc_model_ribbon()

Multiple-ribbon plot for model predictions

mc_obs_slab() mc_model_slab()

Slab (ridge) plot for model predictions

mc_obs_tile() mc_model_tile()

Tile geom

mc_obs_reference_line() mc_model_reference_line()

Horizontal reference lines on y axis

Comparative layouts

The layouts used to compare the model distribution and observed data in model check.

mc_layout_juxtaposition() mc_layout_superposition() mc_layout_nested() mc_layout_encoding()

Define comparative layout in model check visualization

Conditional variable

The conditional check of the model enabled by conditioning variables on x axis, rows, and columns.

mc_condition_on()

Add marginal check to model check

Colors used in model check

The color used by vmc to distinguish the visualization of model and the visualization of data.

mc_color_palettes() mc_set_model_color() mc_set_obs_color()

Colors in model check visualization

Transformation on observed data

The transformation function to be applied on observed values of the response value.

mc_observation_transformation()

Define the transformation applied to observed data

Additional ggplot layers

Additional ggplot layers to be added in the ggplot object that is generated by vmc.

mc_gglayer()

Add a ggplot2::layer() to model check visualization

Model

vmc comes with a selection of built-in models that are used in examples to illustrate various model checks.

mpg_model

Miles/(US) gallon model