autoplot.metafrontier: Autoplot Method for Metafrontier Objects

View source: R/ggplot.R

autoplot.metafrontierR Documentation

Autoplot Method for Metafrontier Objects

Description

Creates diagnostic and summary plots for metafrontier objects using ggplot2.

Usage

## S3 method for class 'metafrontier'
autoplot(
  object,
  which = c("tgr", "efficiency", "decomposition", "frontier"),
  ...
)

Arguments

object

a "metafrontier" object.

which

character. Which plot to produce: "tgr" (default) for TGR density distributions by group (degenerate groups with zero-variance TGR are annotated and excluded from the density), "efficiency" for the TE/TGR/TE* decomposition (boxplots), "decomposition" for grouped bars of mean TE, TGR, and TE*, "frontier" for metafrontier vs group frontiers scatter plot.

...

additional arguments (currently unused).

Value

A ggplot object.

Examples


if (requireNamespace("ggplot2", quietly = TRUE)) {
  sim <- simulate_metafrontier(n_groups = 2, n_per_group = 50, seed = 42)
  fit <- metafrontier(log_y ~ log_x1 + log_x2, data = sim$data,
                      group = "group")
  ggplot2::autoplot(fit, which = "tgr")
  ggplot2::autoplot(fit, which = "decomposition")
}



metafrontier documentation built on Aug. 19, 2026, 5:08 p.m.