Environmental Model

In this example we compute the Aparicio, Pastor and Zofio (2023) environmental model for inputs X, good outputs Y, and bad outputs B, using directions Gx, Gy, and Gb. If not specified, default directions are Gx = :Zeros, Gy = :Observed, Gb = :Observed.

using DataEnvelopmentAnalysis

X = ones(5, 1);
Y = [7; 5; 1; 3; 4];
B = [2; 5; 3; 3; 2];

deaenv1 = deaenv(X, Y, B)
Environmental DEA Model 
DMUs = 5; Inputs = 1; Outputs = 1; Bad Outputs = 1
Returns to Scale = CRS
Gx = Zeros; Gy = Observed ; Gb = Observed
──────────────────────────────────────────────
   efficiency   slackX1       slackY1  slackB1
──────────────────────────────────────────────
1    0.0       0.0        0.0              0.0
2    0.4       0.0       -6.21725e-16      1.0
3    0.826087  0.73913   -1.38778e-15      0.0
4    0.555556  0.333333  -1.11022e-15      0.0
5    0.272727  0.272727   0.0              0.0
──────────────────────────────────────────────

Estimated efficiency scores are returned with the efficiency function:

efficiency(deaenv1)
5-element Vector{Float64}:
 0.0
 0.4000000000000002
 0.8260869565217392
 0.5555555555555556
 0.27272727272727276

The optimal peers, $λ$, are returned with the peers function and are returned as a DEAPeers object:

peers(deaenv1)
DEA Peers
1: 1 ( 1.0 ) 
2: 1 ( 1.0000000000000002 ) 
3: 1 ( 0.2608695652173913 ) 
4: 1 ( 0.6666666666666667 ) 
5: 1 ( 0.7272727272727273 ) 

deaenv Function Documentation

DataEnvelopmentAnalysis.deaenvFunction
deaenv(X, Y, B; Gx, Gy, Gb)

Compute data envelopment analysis environmental model for inputs X, good outputs Y, and bad outputs B, using directions Gx, Gy, and Gb.

Direction specification:

The directions Gx, Gy, and Gb can be one of the following symbols.

  • :Zeros: use zeros.
  • :Ones: use ones.
  • :Observed: use observed values.
  • :Mean: use column means.

Alternatively, a vector or matrix with the desired directions can be supplied.

Optional Arguments

  • slack=true: computes input and output slacks.
  • Xref=X: Identifies the reference set of inputs against which the units are evaluated.
  • Yref=Y: Identifies the reference set of good outputs against which the units are evaluated.
  • Bref=B: Identifies the reference set of bad outputs against which the units are evaluated.
  • names: a vector of strings with the names of the decision making units.
source