Plots the DMUs in three dimensions, with each axis and the point colour set
to any input/output variable or any DEA efficiency model (so a returns-to-
scale efficiency such as "crs" or "vrs" can be used as a
dimension). Efficiencies are computed only when referenced, each at most
once. This plot is always interactive (plotly); it has no static form.
Usage
plot_io_3dscatter(
x,
dim_x,
dim_y,
dim_z,
color = "crs",
orientation = "in",
labels = "none",
max.overlaps.value = 10,
transparency = 0.7,
subtitle = NULL,
title = NULL,
...
)Arguments
- x
A
dea_dataobject, or a data frame coerced byas_dea_data.- dim_x, dim_y, dim_z
Names of the quantities to map to the three axes. Each is either an input/output variable name or an efficiency model (
"crs","vrs","drs","irs","fdh","add"; a trailing"_efficiency"is also accepted).- color
Quantity mapping to point colour (same options as the axes; default
"crs").- orientation
Measurement orientation for efficiency scores, passed to
compute_efficiency(default"in").- labels
Which DMUs to label:
"none"(default),"all"/"max.overlaps"(label every point), or the name/id of a single DMU to label only that one.- max.overlaps.value
Accepted for API consistency; unused here (default
10).- transparency
Opacity of the markers/areas, a single number in
[0, 1](default0.7).- subtitle
Optional subtitle shown beneath the title.
- title
Optional plot title.
- ...
Additional arguments passed to
plotly::plot_ly.
Examples
df <- data.frame(
dmu = paste0("D", 1:6),
i_x1 = c(4, 7, 8, 4, 2, 5),
i_x2 = c(3, 3, 1, 2, 4, 2),
o_y = c(5, 8, 6, 7, 3, 9)
)
plot_io_3dscatter(df, dim_x = "x1", dim_y = "x2", dim_z = "y", color = "crs")