Computes data envelopment analysis (DEA) efficiency scores for a set of
decision-making units, under any of the returns-to-scale assumptions
supported by dea. The numerical work is done by
the Benchmarking package; this function wraps it so the input/output
data follow the dea_data contract and the call sits inside one
consistent entry point.
Usage
compute_efficiency(
x,
rts = c("crs", "vrs", "drs", "irs", "irs2", "fdh", "add"),
orientation = "in",
dual = TRUE,
slack = FALSE,
...
)Arguments
- x
A
dea_dataobject, or a data frame coerced byas_dea_datausing the defaulti_/o_prefix detection. For non-default column selection (explicitinputs/outputs/id), build the object first withdea_dataand pass it in.- rts
Returns to scale, one of
"crs","vrs","drs","irs","irs2","fdh"or"add".- orientation
Measurement orientation, forwarded to
dea(e.g."in","out"or"graph").- dual
Logical; if
TRUEthe multiplier (dual) solution is also returned. SetFALSEto skip it when only the scores are needed.- slack
Logical; if
TRUEslacks are computed as well.- ...
Further arguments forwarded to
dea.
Value
The Farrell object returned by
dea, whose $eff component holds the
efficiency scores.
Details
The returns-to-scale assumption is selected with rts: in particular
"crs" (constant) and "vrs" (variable) are the two most common
models, but "drs", "irs", "irs2", "fdh" and
"add" are available as well.
Examples
df <- data.frame(i_x = c(2, 3, 4), o_y = c(1, 2, 2))
compute_efficiency(df, rts = "crs")$eff
#> [1] 0.75 1.00 0.75
compute_efficiency(df, rts = "vrs")$eff
#> [1] 1.00 1.00 0.75