Skip to contents

Histogram of model residuals

Usage

residuals_hist_plot(
  model,
  type = c("deviance", "pearson", "response"),
  n_bins = c("sturges", "scott", "fd"),
  ylab = NULL,
  xlab = NULL,
  title = NULL,
  subtitle = NULL,
  caption = NULL
)

Arguments

model

a fitted model. Currently only class "gam".

type

character; type of residuals to use. Only "deviance", "response", and "pearson" residuals are allowed.

n_bins

character or numeric; either the number of bins or a string indicating how to calculate the number of bins.

ylab

character or expression; the label for the y axis. If not supplied, a suitable label will be generated.

xlab

character or expression; the label for the y axis. If not supplied, a suitable label will be generated.

title

character or expression; the title for the plot. See ggplot2::labs().

subtitle

character or expression; the subtitle for the plot. See ggplot2::labs().

caption

character or expression; the plot caption. See ggplot2::labs().