Skip to contents

Generates diagnostic visual inspections for small area estimation models evaluated via diagnose.

Usage

# S3 method for class 'fastsae_diagnose'
autoplot(
  object,
  type = c("all", "calibration", "rse", "residuals", "qq", "pit", "cpo"),
  ...
)

Arguments

object

An object of class "fastsae_diagnose" returned by diagnose.

type

Character string indicating the diagnostic plot type:

  • "all": Combined multi-metric inspection (Calibration and RSE reduction).

  • "calibration": Direct estimates vs SAE predictions with 1:1 identity line.

  • "rse": RSE comparison between direct estimator and model-based predictions.

  • "residuals": Standardized residuals versus fitted values.

  • "qq": Normal Q-Q plot of standardized residuals.

...

Additional arguments passed to ggplot2 layers.

Value

A ggplot object.

Examples

m <- eblup_fh(y ~ x1 + x2 + x3, vardir = "vardir", data = mys, print_result = FALSE)
d <- diagnose(m)
autoplot(d, type = "calibration")

autoplot(d, type = "qq")