Back to the Lab

Lab / 01 · Working

DEA Efficiency Explorer

Data Envelopment Analysis compares units that turn several inputs into several outputs. It finds the best-practice frontier, scores every unit against it and shows what an inefficient unit would need to change.

The sample datasets are synthetic. They are not data or results from my own research.

Read the case study: From Research to Software

03 Results

Efficient
1/12
Weakly efficient
0
Mean efficiency
0.766
Lowest
0.571
Production frontier: input vs output
01002003004000200400600800Staff hours / weekPatients treated / weekClinic A · 0.78Clinic B · 1Clinic C · 0.57Clinic D · 0.68Clinic E · 0.8Clinic F · 0.95Clinic G · 0.64Clinic H · 0.75Clinic I · 0.79Clinic J · 0.58Clinic K · 0.85Clinic L · 0.79
  • CCR frontier
  • BCC frontier
  • Efficient
  • Inefficient
  • Target on the frontier

Unit detail

Clinic C

0.571 efficiency

θ = 0.571: all inputs could shrink to 57.1% while keeping outputs.

Reference set (λ)

  • Clinic Bλ = 0.585
ActualSlackTargetChange
Staff hours / week
2090119.4-42.9%
Patients treated / week
32603260

Efficiency ranking

Times used as a reference

  • Clinic B11

Results

UnitEfficiencyθ / ηStatusReference set (λ)
0.5710.571InefficientClinic B (0.585)
0.5840.584InefficientClinic B (0.928)
0.6420.642InefficientClinic B (0.853)
0.6850.685InefficientClinic B (0.745)
0.7530.753InefficientClinic B (1.034)
0.7780.778InefficientClinic B (0.366)
0.7850.785InefficientClinic B (1.224)
0.7870.787InefficientClinic B (1.555)
0.7980.798InefficientClinic B (0.939)
0.8490.849InefficientClinic B (1.522)
0.9540.954InefficientClinic B (1.151)
11Efficient—

The models

Each unit gets its own linear programme. The explorer solves the envelopment form in two stages: first the radial score, then the largest possible slacks with that score fixed.

CCR, input-oriented

min θ

Σj λj xij ≤ θ xio  (i = 1…m)

Σj λj yrj ≥ yro  (r = 1…s)

λj ≥ 0

CCR, output-oriented

max η

Σj λj xij ≤ xio

Σj λj yrj ≥ η yro

λj ≥ 0  ·  E = 1/η

BCC adds the convexity constraint

Σj λj = 1

Stage 2 (slacks)

max Σi s−i/x̄i + Σr s+r/ȳr

Σ λjxij + s−i = θ* xio,  Σ λjyrj − s+r = yro

Targets and improvement

x̂i = θ* xio − s−i

ŷr = yro + s+r

Δ% = (target − actual) / actual × 100

Assumptions

  • Inputs must be strictly positive; outputs must be non-negative, with at least one positive output per unit.
  • Units are comparable: same kind of activity, same variable definitions.
  • DEA scores are relative — they compare units with each other, not with an absolute standard.
  • CCR assumes constant returns to scale; BCC allows variable returns and separates scale effects.
  • Rule of thumb: at least max(m·s, 3(m + s)) units for m inputs and s outputs.

Solver and accuracy

A dense two-phase simplex written in TypeScript runs in a Web Worker. Every row is scaled by its variable mean; slacks are weighted by 1/mean so results do not depend on units. Scores are tested against SciPy’s HiGHS solver (an independent implementation) to 1e-6 and against analytic results.

Tolerances: score = 1 if abs(score − 1) ≤ 1e-7; a slack counts if slack / mean > 1e-7; a unit is a peer if λ > 1e-7.

Scores are unique. λ values and slacks can have alternative optimal solutions; the explorer reports one maximal-slack solution.

Chance-constrained DEA will be added in a later phase, after a review of the mathematics in my article and thesis.