Skip to contents

This function draws a pair of standard residual plots consisting of a true residual plot and a null residual plot.

Usage

AUTO_VI$plot_pair(
  data = self$get_fitted_and_resid(),
  null_data = self$null_method(),
  theme = ggplot2::theme_light(),
  alpha = 1,
  size = 0.5,
  stroke = 0.5,
  remove_axis = TRUE,
  remove_legend = TRUE,
  remove_grid_line = TRUE,
  add_zero_line = TRUE
)

Arguments

data

Data frame. A data frame containing variables .resid and .fitted. See also AUTO_VI$get_fitted_and_resid().

null_data

Data frame. A data frame containing variables .resid and .fitted. See also AUTO_VI$null_method().

theme

ggtheme. A ggplot theme object. See also ggplot2::theme_light().

alpha

Numeric. Alpha of dot. Value between 0 and 1.

size

Numeric. Size of dot. Value between 0 and 1.

stroke

Numeric. Stroke of dot. Value between 0 and 1.

remove_axis

Boolean. Whether or not to remove the axis.

remove_legend

Boolean. Whether or not to remove the legend.

remove_grid_line

Boolean. Whether or not to remove the grid lines.

add_zero_line

Boolean. Whether or not to add a zero horizontal line.

Value

A ggplot.

Examples


my_vi <- auto_vi(fitted_model = lm(speed ~ dist, data = cars))
my_vi$plot_pair()