model_plot: model_plot

View source: R/model_plot.R

model_plotR Documentation

model_plot

Description

model_plot

Usage

model_plot(
  data,
  x,
  actual,
  fitted,
  facet_x = NULL,
  point_size = 2,
  res_bins = NA_real_,
  size = 11
)

Arguments

data

A data.frame.

x

A named character value. Evaluates to a column.

actual

A character value. Evaluates to a logical or binary column.

fitted

A character value. Evaluates to a numeric column.

facet_x

A character value. Evaluates to a column.

point_size

Numeric. Default is 2.

res_bins

Number of bins in the residual distribution. Default value (NA) doesn't show the distribution.

size

theme size for use_theme(). Default is 14.

Value

A ggplot object.

Examples

y = rnorm(26)
df = data.frame(ID = 1:26, actual = y + rnorm(26), fitted = y, id = letters)
model_plot(df, "ID", "actual", "fitted")
model_plot(df, "id", "actual", "fitted")
model_plot(df, "ID", "actual", "fitted", res_bins = 10)
model_plot(df, "id", "actual", "fitted", res_bins = 10)

wkostelecki/ezplot documentation built on Feb. 1, 2024, 10:58 p.m.