Learn R Programming

PEAXAI (version 0.1.0)

label_efficiency: Data preprocessing and efficiency labeling with Additive DEA

Description

Labels each DMU (Decision Making Unit) as efficient or not using the Additive DEA model, optionally after basic data preprocessing. The resulting factor class_efficiency has levels c("not_efficient","efficient"), where "efficient" is the positive class for downstream modeling.

Usage

label_efficiency(data, REF = data, x, y, RTS = "vrs")

Value

A data.frame equal to data (retaining all input x and output y columns) plus a new factor column class_efficiency

with levels c("not_efficient","efficient").

Arguments

data

A data.frame or matrix containing all variables.

REF

Optional reference set of inputs that defines the technology (defaults to the columns indicated by x in data). Must have the same number of rows as data.

x

Integer vector with column indices of input variables in data.

y

Integer vector with column indices of output variables in data.

RTS

Character or integer specifying the DEA technology / returns-to-scale assumption (default: "vrs"). Accepted values:

0 / "fdh"

Free disposability hull (no convexity).

1 / "vrs"

Variable returns to scale (convexity + free disposability).

2 / "drs"

Decreasing returns to scale (convexity, down-scaling, free disposability).

3 / "crs"

Constant returns to scale (convexity + free disposability).

4 / "irs"

Increasing returns to scale (up-scaling only, convexity + free disposability).

5 / "add"

Additivity (integer up/down scaling) with free disposability.

Details

Internally relies on dea.add to compute Additive DEA scores and derive the binary efficiency label.

See Also

dea.add

Examples

Run this code
# Example (assuming columns 1:2 are inputs and 3 is output):
# out <- my_fun(data = df, x = 1:2, y = 3, RTS = "vrs")
# table(out$class_efficiency)

Run the code above in your browser using DataLab