Skip to contents

Plot model diagnostics

Usage

plot_diagnostics(
  x,
  model = NULL,
  scope = NULL,
  subject = NULL,
  type = c("residuals", "observed", "calibration"),
  ...
)

Arguments

x

An idiographic fit.

model, scope, subject

Optional filters.

type

Diagnostic plot type: "residuals", "observed", or "calibration".

...

Passed to base plotting functions.

Value

Invisibly, the data.frame of diagnostics() that was plotted, one row per held-out occasion and model.

Examples

fit <- fit_lm(srl, y = "effort", x = "efficacy", id = "name", time = "day")
plot_diagnostics(fit, scope = "individual")

plot_diagnostics(fit, scope = "individual", type = "calibration")