Skip to contents

Draws the production surface for a chosen pair of inputs and a single output: the decision-making units in three-dimensional space, and the efficient frontier as a semi-transparent piecewise-linear surface. This is the three-dimensional counterpart of plot_io_frontier, and it follows the same principle: the frontier, the colour scale and the peer arrows are all derived from a self-consistent DEA sub-model fitted to the three chosen variables.

Usage

plot_io_3dfrontier(
  x,
  inputs,
  output,
  rts = c("crs", "vrs"),
  orientation = c("in", "out"),
  peers_network = FALSE,
  arrow_target = c("peer", "projection"),
  surface_opacity = 0.4,
  point_size = 4,
  transparency = 0.8,
  label_frontier = TRUE,
  labels = "none",
  subtitle = NULL,
  title = NULL,
  ...
)

Arguments

x

A dea_data object, or data coercible by as_dea_data.

inputs

The two inputs to plot, given as column names or as integer positions among the inputs.

output

The single output to plot, given as a column name or as an integer position among the outputs.

rts

Returns to scale for the frontier and the efficiency scores: "crs" (default) or "vrs".

orientation

"in" (default) or "out"; affects the efficiency scores and the direction of the projection arrows.

peers_network

Logical; if TRUE, draw arrows from inefficient units to their efficient reference set. Default FALSE. With a single DMU named in labels, only that unit's arrows are drawn.

arrow_target

"peer" (default) draws an arrow to each efficient peer DMU, with opacity proportional to its envelopment weight (\(\lambda\)); "projection" draws one arrow per inefficient unit to its projected point on the surface, at uniform opacity.

surface_opacity

Opacity of the frontier surface, a number in [0, 1]. Default 0.4.

point_size

Marker size. Default 4.

transparency

Base marker opacity, a number in [0, 1]. Default 0.8.

label_frontier

Logical; label the efficient (frontier) units. Default TRUE.

labels

Labelling mode: "none" (default), "all", "id", or the name of a single DMU to highlight.

subtitle

Plot subtitle. NULL (default) names the sub-model; pass a string to override, or NA to suppress.

title

Plot title.

...

Currently ignored.

Value

A plotly object.

Details

Under rts = "vrs" the frontier is the upper envelope of the convex hull of the observed points: a set of triangular facets meeting at the efficient units. Under rts = "crs" it is the cone spanned by the most productive units, so that scaling any point of the surface by a positive factor gives another point of the surface. The surface is not a single plane except in degenerate cases.

The plot is interactive by construction and requires plotly; a static projection of a surface would hide facets and mislead. Computing the hull requires geometry.

Examples

d <- dea_data(
  chinese_cities,
  inputs  = c("industrial_labour_force", "working_funds", "investments"),
  outputs = c("gross_industrial_output", "profit_and_tax", "retail_sales"),
  id      = "DMU"
)
plot_io_3dfrontier(d, inputs = c("working_funds", "investments"),
                   output = "retail_sales", rts = "vrs")