Pape 274-25 An Extension to SAS/OR fo Decision System Suppot Ali Emouznead Highe Education Funding Council fo England, Nothavon house, Coldhabou Lane, Bistol, BS16 1QD U.K. ABSTRACT This pape exploes the use of the optimisation pocedues in SAS/OR softwae with application to the decision system suppot using Data Envelopment Analysis (DEA) techniques. Data Envelopment Analysis is a linea pogamming method fo assessing the efficiency and poductivity of Decision Making Units. Ove the last decade DEA has gained consideable attention as a manageial tool fo measuing pefomance of oganisations and it has been used widely fo assessing the efficiency of public and pivate sectos such as banks, ailines, hospitals, univesities and manufactues. As a esult, new applications with moe vaiables and moe complicated models ae being intoduced. On the othe hand, the SAS System has numeous optimisation outines that handle the standad optimisation poblems such as linea pogamming with all types of constaints. To facilitate the use of DEA by SAS uses, a SAS/DEA code was implemented in the SAS pogamming language. The SAS maco developed in this pape selects the chosen vaiables fom a SAS data file and constucts a Lineapogamming model based on the selected DEA. An example is given to illustate how could one use the code to measue the efficiency of oganisations. KEYWORDS: SAS, Data Envelopment Analysis, Linea Pogamming INTRODUCTION Data Envelopment Analysis (DEA) 1 is a linea pogamming method fo assessing the efficiency and poductivity of Decision Making Units. DEA continues to gow in impotance as manageial tools become moe eliable and handle pefomance measuement of oganisations. As a esult, new applications with moe vaiables and moe complicated models ae being intoduced. On the othe hand, the SAS System has numeous optimisation outines that handle the standad optimisation poblems such as linea pogamming with all types of constaints 2. The main pupose of this pape is to implement a SAS/DEA System. This is followed by an illustation of how the use could use this system. The pape unfolds as follows. Next section descibes the pocedues of the SAS System and SAS/OR poducts. In section 2 the DEA models and method of calculations in DEA ae explained. The emainde of this pape illustates featues that have been added to the SAS System fo the pupose of DEA modeling, call it SAS/DEA. These include pocedues fo data handling, model building and epoting the esults of DEA model. Finally, this pape uses a small data set to show some of the featues of the SAS/DEA system. ABOUT SAS Today SAS is ecognised as a one of the lead packages fo statistical analysis and as a poweful tool fo data base systems in many oganisations, both in public and pivate sectos. SAS uses come fom evey mao industy (banking to phamaceuticals, manufactuing to telecommunications,... ) all with the same basic needs to make bette stategic decisions and to gain a competitive edge. Thee ae many applications in SAS that the uses ecognised as poweful tools in oganisational management. Fo example the SAS/OR System has numeous optimisation pocedues which handle the standad poblems such as linea and non-linea pogamming with all types of constaints. These capabilities ae exposed to the SAS uses in a vaiety of places such as in pocedues LP and NLP 3. In addition to the standad pocedues available in SAS System applications such as neual netwok, simulation 4 and contol poect management 5 ae intoduced. The absence of Data Envelopment Analysis code in SAS foce the uses to use the othe packages while the SAS/OR is vey poweful and has capability of handling all types of DEA models. Theefoe this pape aims to intoduce a new application in SAS System fo pefomance measuement of Decision Making Units using Data Envelopment Analysis (DEA) technique. ABOUT DEA Decision Making Units (DMUs) ae units of oganisations such as banks, univesities, and hospitals, which typically pefom the same function. A DMU usually uses a set of inputs (esouces) to secue a set of outputs (poducts). DEA is a method fo measuing efficiency of DMUs using linea pogamming techniques to envelop obseved input - output vectos as tightly as possible 6. One main advantage of DEA is that it allows seveal inputs and seveal outputs to be consideed at the same time. In this case, efficiency is measued in tems of inputs o outputs along a ay fom the oigin. Assume a set of obseved DMUs, {DMU ; =1,...,n}, associated with m inputs, {x i ; i=1,...,m}, and s outputs, {y ; =1,...s}. In the method oiginally poposed by Chanes, Coope, Rhodes (1978) 1 the efficiency of the DMU 0 is defined as follows. s.t. Model 1. Output oiented - CRS model Max h S + i λ x λ y, S λ 0 - i + S S 0 + i - = x i0 = hy 0 i,. i Whee; x i = the amount of the i th input at DMU, y = the amount of the th output fom DMU and 0 = the DMU to be assessed. If h * is the optimum value of h, then DMU 0 is said to be Paeto
efficient iff h * =1 and the optimal values of S i - & S + ae zeo fo all i & 1. This means no othe DMU o combination of DMUs exist which can poduce at least the same amount of output as DMU 0, with less fo some esouces and/o no moe fo any othe esouces. In Model (1), S i and S epesent slack vaiables. Thus a slack in an input i, i.e. S i * > 0, epesents an additional inefficiency use of input i. A slack in an output, i.e. S * > 0, epesents an additional inefficiency in the poduction of output. The DEA Model (1) is known as output - oiented model because it expands output of DMU 0 within the poduction space. It should be solved n times once fo each DMU being evaluated to geneate n optimal values of (h *, λ * ). Fo DMU 0 If adial expansion is possible Model (1) will yield h * 0 >1, If adial expansion is not possible Model (1) will yield h * 0 =1. The positive elements of the optimal values in λ identify the set of dominating DMUs located on the constucted poduction fontie, against which the DMU 0 is evaluated. This subset of DMUs is called pees to DMU 0 6. Fom Model (1) it is clea that the model defines the elative efficiency of a DMU in tems of output maximisation. The input oiented model of DEA can be defined in a simila way. Min φ s.t. Model 2. Input oiented - CRS model + λ x + S = φx i i i i0 - λ y S = y 0 + - S i, S 0 i, λ 0. Whee; x i = the amount of the i th input at DMU, y = the amount of the th output fom DMU and 0 = the DMU to be assessed. Assume that φ * is the optimum value of φ. DMU 0 is said to be Paeto efficient iff φ * = 1 and the optimal value of S + i and S - ae zeo ( i, ). Besides developing DEA in theoy, pactitiones in a numbe of fields have quickly ecognised that DEA is a useful methodology fo measuing poductivity and efficiency. Theefoe a numbe of softwae was developed. Some of the well known packages which eseaches fequently use is: Wawick DEA Softwae, Fontie Analysis, IDEAS and GAMAS DEA 7. The fist thee ae commecial and they allow some DEA analysis to be undetaken, thee ae only few options to change in details of the model used 8,9. Wawick DEA softwae has ability to calculate the effect of weight estiction and taget setting 10. The advantage of GAMS DEA is that it has the capability of building othe DEA models. Howeve GAMS is not popula softwae in oganisational management. Many of the oganisations such as Banks, Univesities, Hospitals, Telecommunications, Ailines and so on use SAS softwae as a data base system o statistical analysis. The SAS/DEA intoduced in this pape povides a poweful management tool fo assessing the efficiency of oganisations in SAS system. SAS/DEA The SAS/ DEA softwae developed in this pape solves DEA models. The pogam can handle both input minimisation and output maximisation. To enhance model thee ae seveal paametes. The use can select the desied paametes accoding to the paticula model that is equied. Uses familia with SAS can add thei own featues to build othe DEA models. Uses not familia with SAS need only to un the pogam with thei model specification pio unning the system. The SAS/DEA equies two initial data sets that contain the input and output vaiables fo obseved units. The data descibing inputs/outputs must be pesented in the fomat that vaiables appea in columns and units in ows and saved as.txt file (Tab delimited). The pogam has the ability to accommodate unlimited numbe of inputs/outputs with unlimited numbe of DMUs. The only limitation is the memoy of compute used to un the SAS/DEA. The SAS/DEA softwae then convets data sets to a DEA model selected. Based on the data and paametes specified in the SAS/DEA, the code fist ceate the usual linea pogam then it use "Poc LP" to solve the model. Results then will be tansfeed to epot files. The SAS/DEA poduces a table of efficiencies of DMUs. It also supplies much othe valuable infomation including lambdas in pimal and weights in dual DEA models. These infomation ae vey useful fo analysing the inefficient units, whee the souce of inefficiency comes fom and how could impove an inefficient unit to the desied level. Figue (1) illustates the data flow in the SAS/DEA. It shows the input and output vaiables data sets that ae equied fo SAS/DEA. the paametes that SAS/DEA needs to define the model. The macos; (%data, %model and %epot) and the esult data sets that ae available fo pint o can be used fo futhe analysis. DATA SAS/DEA RESULT Input vaiables data file Output vaiables data file Figue 1. Data flow in SAS/DEA In the est of this pape the pocedue of implementation of SAS/DEA togethe with an example ae explained. DEFINITION OF TERMS AND TYPOGRAPHICAL CONVENTIONS In the est of this pape and paticulaly in the SAS/DEA code we will see seveal type styles used. Style conventions ae summaised below: Couie font _Undescoe Undescoe Data handling (%data) Paametes Model building (%model) Repot witing (%epot) Repot1 (pimal mode)l Repot2 (dual model) Table of efficiency is used to show example of SAS statements. In most cases, this pape uses lowecase type fo SAS code. The use can ente own SAS code in lowecase, uppecase o a mixtue of the two. Ente any titles and footnotes exactly as you want them to appea on the pintout. Vaiable name that ae suound by _ ae specifically used as paametes to the SAS. In all case these vaiables must be used without any change. Vaiable name that ae stated with _ ae specifically used as paametes to the SAS/DEA. In all case these vaiables can be edundant if default values ae adopted. The tems in Table 1 ae used fo defining paametes needed in SAS/DEA. All these paametes ae abitay and in absence of them the default value will be assigned.
Table 1. The tems used fo defining paametes in SAS/DEA Paamete _InpData _NoInut _OutData _NoOutput _Oienta Meaning Specifies the file name of input vaiables Specifies the numbe of the input vaiables in the optimisation DEA model Specifies the file name of output vaiables Specifies the numbe of the output vaiables in the optimisation DEA model This paamete is used to specify the oientation of the DEA model to be solved. "InputMin" fo input minimisation model and "OutputMax" fo output maximisation model The SAS/DEA uns thee macos fo data handling (%data), model building (%model) and epot witing (%epot). DATA HANDLING (%DATA) This pat of SAS/DEA efomats the data to a suitable fomat that can be used in SAS/OR. The SAS/DEA equies two data sets including input and output vaiables. Both data sets need to be.txt files saved as text tab delimited. Vaiables must be pesented in columns and units in ows. The unit names must stat with a lette and may contain up to 50 chaactes and must be listed in the fist column of the data file. The othe columns ae including numeic values of vaiables. These vaiables can be enteed into the file in any ode. The fist ow of the data file epesents the name of the vaiables. An example of data file fo input vaiables is: Unit Input1 Input2 DMU1 10 20 DMU2 30 15 DMU3 15 40 The data file fo output vaiable has simila fomat. Thee ae fou paametes pio to calling the data maco: _InpData, _NoInput, _OutData, _NoOutput. The pupose of each paamete is pesented in Table 1. SAS pocedue fo data handling is as follows. %maco data; data NY; infile &_OutData delimite='09'x missove dsd ; aay NYaay(&_nOutput) $ NY1- NY&_nOutput ; NYaay(*) $ ; if _n_ eq 1 then output ; dop unitname; data AY DMUs; infile &_OutData delimite='09'x missove dsd; aay AYaay(&_nOutput) AY1-AY&_nOutput; AYaay(*) ; if _n_ gt 1 then output ; data NX; infile &_InData delimite='09'x missove dsd ; aay NXaay(&_nInput)$ NX1-NX&_NInput ; NXaay(*) $ ; if _n_ eq 1 then dop unitname; data AX; infile &_InData delimite='09'x missove dsd ; aay AXaay(&_nInput) AX1-AX&_nInput; AXaay(*) ; if _n_ gt 1 then call symput('_ndmu',_n_-1); data DMUs; set AY (keep=unitname); U0=_n_; %mend data; MODEL BUILDING (%MODEL) This pat of SAS/DEA builds the equested DEA model in the fomat suitable fo SAS/OR and fo pupose of calling "Poc LP". Thee is one paamete pio calling the pocedues: _Oienta Fo example, fo solving a standad input minimisation model the use should set the paametes to: _Oienta=InputMin; and fo solving output maximisation model the use should set the paametes to: _Oienta=OutputMax; SAS pocedue fo model building is as follows. %maco model; %local i 0; data MODEL1; %let _nunit=&_ndmu; aay NYaay(&_nOutput)$ NY1-NY&_nOutput ; aay AYaay(&_nOutput) AY1-AY&_nOutput; aay NXaay(&_nInput) $ NX1-NX&_NInput ; aay AXaay(&_nInput) AX1-AX&_nInput; aay Jaay(&_nUnit) U1-U&_nUnit ; length _ow_ $ 50 _col_ $ 50 _type_ $ 8 ; keep _ow col type coef_ ; J0=&; /* Jo is unit unde assessment*/ if &_Oienta='InputMin' then do; _type_='min'; _col_='.'; _coef_=.; _col_ ='FI'; _coef_=1; link ReadNX; do = 1 to &_nunit; link ReadAX;
do i= 1 to &_ninput; _col_='la' put(,3.); _ow_=nxaay(i); _coef_=axaay(i); if =J0 then do; select(&_oienta); when('inputmin') do; _ow_=nxaay(i); _coef_=-axaay(i); _col_='fi'; _ow_=nxaay(i); _type_='le'; *LE; when('outputmax') do; _ow_=nxaay(i); _type_='le'; _coef_=axaay(i); othewise; ReadNX: set NX; etun; ReadAX: set AX; etun; data MODEL2; %let _nunit=&_ndmu; aay NYaay(&_nOutput)$ NY1-NY&_nOutput ; aay AYaay(&_nOutput) AY1-AY&_nOutput; aay NXaay(&_nInput) $ NX1-NX&_NInput ; aay AXaay(&_nInput) AX1-AX&_nInput; aay Jaay(&_nUnit) U1-U&_nUnit ; length _ow_ $ 50 _col_ $ 50 _type_ $ 8 ; keep _ow col type coef_ ; J0=&; * Jo is unit unde assessment; if &_Oienta='OutputMax' then do; _type_='max'; _col_='.'; _coef_=.; _col_ ='FI'; _coef_=1; link ReadNY; do = 1 to &_nunit; link ReadAY; do = 1 to &_noutput; _col_='la' put(j,3.); _coef_=ayaay(); if =J0 then do; select(&_oienta); when('inputmin') do; _type_='ge'; _coef_=ayaay(); when('outputmax') do; _col_='fi'; _coef_=-ayaay(); _type_='ge'; othewise; ReadNY: set NY; etun; ReadAY: set AY; etun; data MODEL; set MODEL1 MODEL2 ; %mend model ; SAS/DEA REPORT WRITING (%REPORT) The SAS/DEA esults ae including table of efficiencies of DMUs in two fomats soted by the most efficient DMU and soted alphabetically by the name of DMUs. All othe infomation like slacks and lambdas in model (1 o 2) ae saved in file "Repot1". All infomation on the dual to model (1 o 2) including weights ae saved in file "Repot2". SAS pocedue fo epot witing is as follows. %maco epot; data eff(dop=u0); mege DMUs Eff; by U0; poc sot data=eff; by eff; poc pint data=eff; poc sot data=eff; by UnitName; poc pint data=eff; %mend epot; SAS/DEA MACRO To make the system as ease as possible the %sasdea maco put all the above code togethe. %maco sasdea; libname sasdea 'C:\sasdea'; poc datasets nolist; delete Eff Repot1 epot2; %data; %let _nunit=&_ndmu; %do =1 %to &_nunit; %model; poc lp data=model nopint spasedata pimalout=lp2 dualout=lp3 ; data EffJ0(keep=U0 eff); set lp2 (whee= (_va_='obj')); U0=&; if &_Oienta='OutputMax' and _value_ ne 0 then Eff=1/_value_;else Eff=_value_; poc datasets nolist; append base=eff
data=effj0; data lp2; set lp2; U0=&; poc datasets nolist; append base=repot1 data=lp2; data lp3; set lp3; U0=&; poc datasets nolist; append base=repot2 data=lp3; % %epot; %mend sasdea; In the above code the %sasdea maco is used to manage all peviously explained codes including data handling, model building and epot witing. To get the esult, use needs to set up the paametes and un only one statement: %sasdea; AN EXAMPLE OF SAS/DEA In this section I pesent a simple example of two inputs two outputs and 6 DMUs fo illustation of SAS/DEA. This example wee taken fom Sexton 11, page 19, and will allow us to compae the SAS/DEA esults with that of epoted by Sexton. He used this example fo assessing six nusing homes. A DEA model with 2 inputs and 2 outputs wee used. The inputs ae Staff hous pe day (StH), including nuses, physician, theapists, and so on. Supplies pe day (Supp) which ae measued in thousands of dollas. The outputs ae Total Medicae plus Medicaid-eimbused patient days (MCPD) Total pivately paid patient days (PPPD). The inputs ae measued on a daily basis, while the outputs ae annual totals. It is possible to expess all inputs and outputs in the same units, but this is not necessay, since the basic DEA model assumes constant etuns to scale. Fo moe infomation see pages 19-23 of Sexton 11. The input and output vaiables ae saved in files "InVa.txt" and "OutVa.txt" espectively and ae as follows. "InVa.txt" file DMU StH Supp A 150 0.2 B 400 0.7 C 320 1.2 D 520 2.0 E 350 1.2 F 320 0.7 "OutVa.txt" file DMU MCPD PPPD A 14000 3500 B 14000 21000 C 42000 10500 D 28000 42000 E 19000 25000 F 14000 15000 A use needs to set the paametes as equied and un the following code fo input oientation model. %let _InData='C:\sasdea\InVa.TXT'; %let _ninput=2; %let _OutData='C:\sasdea\Outva.TXT' ; %let _noutput=2; %let _Oienta='InputMin'; %sasdea; The above code manages to get the esult based on the specified paametes and data files. SAMPLE RESULTS FROM SAS/DEA The esult of unning above code is pesented below. The thid column shows the efficiency scoe. The SAS System OBS UNITNAME EFF 1 A 1.00000 2 B 1.00000 3 C 1.00000 4 D 1.00000 5 E 0.97750 6 F 0.86745 As this table shows units E and F ae inefficient units, all othe units ae efficient. This is exactly matched with the esults epoted by Sexton in Table 5 (page 22). Unit F is less efficient than unit E. The best that unit F can do is 0.867, while the maximum of unit E is 0.977. SAS/DEA also ceates a wealth of infomation and saved them in two files, epot1 and epot2. By using these in SAS system we can specify a management stategy indicating by how much each unit should educe each input and/ o incease each output in ode to became pefectly efficient. To see this we need the value of slacks and lambdas in pimal models (1 o 2) and value of weights in dual to each. These all ae saved in files epot1 and epot2 espectively. It is impotant to use these epots effectively to deive the measue equied fo manageial pupose. Fo example the lambdas' value fo unit E can be obtained fom epot1 by using fields _va_ and _value_. It can be seen that the value of lambdas fo unit E ae as follows The SAS System OBS _VAR VALUE_ 3 LA A 0.20000 4 LA B 0.08048 5 LA C 0.00000 6 LA D 0.53833 7 LA E 0.00000 8 LA F 0.00000 What these values suggest is that the taget fo unit E has an input output levels that ae 0.2 times those fo unit A plus 0.8048 times those fo unit B plus 0.53833 those fo unit D. Theefoe the optimum value of input output vaiables fo unit E ae: StH Supp MCPD PPPD 342 1.17 19000 25000 Thus unit E should ty to educe its input levels by 2.3% without educing eithe output levels. (Note that, 342 equals 97.7% of 350 and 1.17 equals 97.7% of 1.2). CONCLUSION Today many oganisations ecognised SAS as a one of the lead packages fo data base system and statistical analysis. In
paticula, optimisation pocedues in SAS/OR ae exposed to the use in a vaiety of places such as "Poc LP" and "Poc NLP". Theefoe many applications such as neual netwok and contol poect management ae intoduced. SAS/DEA as intoduced in this pape is a new application in SAS/OR that is a poweful manageial tool fo measuing the efficiency and poductivity of Decision Making Units. The SAS/DEA application has seveal advantages including: It can be used by SAS uses with no exta cost to buy any DEA softwae. It is vey poweful with no limitation on the input and output vaiables o numbe of DMUS. The only limitation is the memoy and disk space of the compute uses. It is flexible to add othe DEA model. A SAS/DEA fo end use is as ease as to un one statement: %sasdea. And impotantly is SAS has poweful manageial tools fo epot witing and statistical analysis as well as optimisation pocedues. The SAS/DEA epot's files can diectly feed to othe SAS outines fo futhe analysis. The esults can dynamically be used in conunction with cost eduction o pofit maximisation in decision system suppot. Judy Akinbolu fo thei valuable comments and suggestions. Acknowledgement is also due to "Highe Education Funding Council fo England" fo thei financial suppot. CONTACT INFORMATION Autho: Ali Emouznead Highe Education Funding Council fo England, Nothavon house, Coldhabou Lane, Bistol, BS16 1QD U.K. Email: A.Emouznead@wawick.ac.uk Web: http://www.wawick.ac.uk/~bslu/ REFERENCES 1 Chanes, A., W. W. Coope, and E. Rhodes. (1978), "Measuing the Efficiency of Decision Making Units," Euopean Jounal of Opeations Reseach 2(6) pp 429-44. 2 SAS Institute Inc. (1989), SAS/OR Use s Guide, Vesion 6, Fist Edition, Cay, NC: SAS Institute Inc. 3 Tevo Keaney (1999), "Advances in Mathematical Pogamming and Optimisation in the SAS System," SUGI24 Poceedings, Cay, NC: SAS Institute Inc. 4 Cohen, Mac-david and Phil Meano (1995), QSIM Application Discete Event Queuing Simulation, Release 6.11, Cay, NC: SAS Institute Inc. 5 SAS Institute Inc. (1993), SAS/OR Use s Guide, Poect Management, Vesion 6, Fist Edition, Cay, NC: SAS Institute Inc. 6 Boussofiane, A, R. Dyson and E Thanassoulis, (1991), "Applied data envelopment analysis," Euopean Jounal of Opeational Reseach vol. 52, pp. 1-15. 7 Olesen and Petesen (1995), "A pesentation of GAMS fo DEA," Computes & Opeations Reseach 23(4) pp 323-339. 8 Hollingswoth, B. (1997), "A eview of data envelopment analysis softwae," The Economic Jounal 107(443) pp 1268-70. 9 Hollingswoth, B. (1999). "Data Envelopment Analysis and Poductivity Analysis: a eview of the options," The Economic Jounal 109(456) pp 458-62. 10 Thanassoulis E. and A. Emouznead (1998), Wawick DEA Softwae, Use's Guide, ISBN: 0902610635, Wawick Business school, Wawick Univesity, UK. 11 Sexton, Thomas R. (1986), "The Methodology of Data Envelopment Analysis," in Silkman, Richaed H. (Edito) Measuing Efficiency: An Assessment of Data Envelopment Analysis. New Diections fo Pogam Evaluation, no 32, San Fancisco: Jossey-Bass, 1986. ACKNOWLEDGMENTS The autho wishes to expess his thanks to John Thompson and