Basic Programming Procedures for DEA Models
摘要
This chapter presents a systematic workflow for programming DEA models in Stata, showing how to translate theoretical formulations into executable commands. It begins by standardizing DEA models into LP form, aligning objective functions and constraints with Stata’s Mata class. Step-by-step examples demonstrate solving a single DMU efficiency score, then iterating over all DMUs, and finally encapsulating the process into reusable Mata functions. The chapter explains integration between Mata and Stata, enabling direct variable referencing and in-place storage of results. Enhancements include conditional evaluation, specification of alternative reference sets, and flexible input–output variable. Complete code listings show how to compile Mata functions as .mo files for persistent use, design ado commands for automation, and extend syntax for user-friendly interaction. By the end, readers can build, customize, and deploy DEA commands that handle varied datasets, orientations, and reference sets, facilitating efficient, reproducible efficiency analysis in applied research.