当前位置:网站首页>Detailed explanation of data envelopment analysis (DEA) (taking the 8th Ningxia provincial competition as an example)
Detailed explanation of data envelopment analysis (DEA) (taking the 8th Ningxia provincial competition as an example)
2022-06-12 05:11:00 【Breeding apes】
Catalog
One 、 Basic introduction
1.1 principle
There are many models for data envelopment analysis , Mainly for :CCR Model ,BBC Model 、 Cross model 、A&P Model . Look at the various models of this method , The specific mathematical reasoning process of each model is basically the same , The standard linear programming formulas are also similar , The difference between them is mainly reflected in the different conditions applicable to each model . Beyond seas , This method was used in banks and hospitals earlier 、 Evaluation of the efficiency of cities and other aspects . In recent years , This method has also achieved a lot of application results in many fields of social economy in China . Because the method has relatively loose requirements for the evaluation object , Apply it to evaluate the same type DMU The relative effectiveness of the dominant position , It is difficult to be replaced by other methods .
1.2CCR Model
CCR A model is a reference to DMU adopt “ Input a certain amount of production factors , And produce a certain number of products ” To judge the relative rationality and effectiveness of each unit . From the point of view of investing resources , At the current level of output , Compare the use of invested resources , Take this as the basis for benefit evaluation , This pattern is called “ Input oriented mode ”.
Define the decision making unit j The efficiency evaluation index of is :
![]()
For the above formula, the weight coefficient can be appropriately taken v and u, bring
, Right.
Three decision-making units are used for efficiency evaluation , Generally speaking
The larger it is, the greater it is
Be able to get relatively more output with relatively less input . Therefore, only the maximum value of demand , You can explore
Here n individual DUM Is it relatively optimal .

1.3BCC Model
BCC The model discusses efficiency from the perspective of output , That is, under the same input level , Compare the achievement of output resources , This pattern is called “ Input oriented mode ”. What you get is “ Technical benefits ”,DEA=1 be called “ Technology works ”, Optimal solution
It is a decision-making unit j Of “ Technical benefits ”.

Two 、 Code
2.1MATLAB Code
clear
clc
format long
data=[14.40 0.65 31.30 3621.00 0.00
16.90 0.72 32.20 3943.00 0.09
15.53 0.72 31.87 4086.67 0.07
15.40 0.76 32.23 4904.67 0.13
14.17 0.76 32.40 6311.67 0.37
13.33 0.69 30.77 8173.33 0.59
12.83 0.61 29.23 10236.00 0.51
13.00 0.63 28.20 12094.33 0.44
13.40 0.75 28.80 13603.33 0.58
14.00 0.84 29.10 14841.00 1.00]';
X=data([1:3],:);%X For input variables
Y=data([4:5],:);%Y Is the output variable
[m,n]=size(X);
s=size(Y,1);
A=[-X' Y'];% Because the objective function is minimized , there -X It turns into seeking the maximum
b=zeros(n,1);
LB=zeros(m+s,1);UB=[];
for i=1:n
f=[zeros(1,m) -Y(:,i)'];
Aeq=[X(:,i)',zeros(1,s)];
beq=1;
w(:,i)=linprog(f,A,b,Aeq,beq,LB,UB);% front 3 Listed as input coefficient , after 2 Listed as output coefficient
E(i,i)=Y(:,i)'*w(m+1:m+s,i);% Output value * Output coefficient
end
theta=diag(E)';
fprintf(' use DEA The relative evaluation result of this method is :\n');
disp(theta);2.2Python Code
import gurobipy
import pandas as pd
# Display data in pages , Set to False Paging is not allowed
pd.set_option('display.expand_frame_repr', False)
# Maximum number of columns to display , Set to None Show all columns
pd.set_option('display.max_columns', None)
# Maximum number of rows to display , Set to None Show all rows
pd.set_option('display.max_rows', None)
class DEA(object):
def __init__(self, DMUs_Name, X, Y, AP=False):
self.m1, self.m1_name, self.m2, self.m2_name, self.AP = X.shape[1], X.columns.tolist(), Y.shape[1], Y.columns.tolist(), AP
self.DMUs, self.X, self.Y = gurobipy.multidict({DMU: [X.loc[DMU].tolist(), Y.loc[DMU].tolist()] for DMU in DMUs_Name})
print(f'DEA(AP={AP}) MODEL RUNING...')
def __CCR(self):
for k in self.DMUs:
MODEL = gurobipy.Model()
OE, lambdas, s_negitive, s_positive = MODEL.addVar(), MODEL.addVars(self.DMUs), MODEL.addVars(self.m1), MODEL.addVars(self.m2)
MODEL.update()
MODEL.setObjectiveN(OE, index=0, priority=1)
MODEL.setObjectiveN(-(sum(s_negitive) + sum(s_positive)), index=1, priority=0)
MODEL.addConstrs(gurobipy.quicksum(lambdas[i] * self.X[i][j] for i in self.DMUs if i != k or not self.AP) + s_negitive[j] == OE * self.X[k][j] for j in range(self.m1))
MODEL.addConstrs(gurobipy.quicksum(lambdas[i] * self.Y[i][j] for i in self.DMUs if i != k or not self.AP) - s_positive[j] == self.Y[k][j] for j in range(self.m2))
MODEL.setParam('OutputFlag', 0)
MODEL.optimize()
self.Result.at[k, (' Benefit analysis ', ' Comprehensive technical benefits (CCR)')] = MODEL.objVal
self.Result.at[k, (' Return to scale analysis ', ' effectiveness ')] = ' Not DEA It works ' if MODEL.objVal < 1 else 'DEA Weak effective ' if s_negitive.sum().getValue() + s_positive.sum().getValue() else 'DEA Strongly effective '
self.Result.at[k, (' Return to scale analysis ', ' type ')] = ' The return to scale is fixed ' if lambdas.sum().getValue() == 1 else ' Increasing returns to scale ' if lambdas.sum().getValue() < 1 else ' Diminishing returns to scale '
for m in range(self.m1):
self.Result.at[k, (' Variance analysis ', f'{self.m1_name[m]}')] = s_negitive[m].X
self.Result.at[k, (' Input redundancy rate ', f'{self.m1_name[m]}')] = 'N/A' if self.X[k][m] == 0 else s_negitive[m].X / self.X[k][m]
for m in range(self.m2):
self.Result.at[k, (' Variance analysis ', f'{self.m2_name[m]}')] = s_positive[m].X
self.Result.at[k, (' Under output rate ', f'{self.m2_name[m]}')] = 'N/A' if self.Y[k][m] == 0 else s_positive[m].X / self.Y[k][m]
return self.Result
def __BCC(self):
for k in self.DMUs:
MODEL = gurobipy.Model()
TE, lambdas = MODEL.addVar(), MODEL.addVars(self.DMUs)
MODEL.update()
MODEL.setObjective(TE, sense=gurobipy.GRB.MINIMIZE)
MODEL.addConstrs(gurobipy.quicksum(lambdas[i] * self.X[i][j] for i in self.DMUs if i != k or not self.AP) <= TE * self.X[k][j] for j in range(self.m1))
MODEL.addConstrs(gurobipy.quicksum(lambdas[i] * self.Y[i][j] for i in self.DMUs if i != k or not self.AP) >= self.Y[k][j] for j in range(self.m2))
MODEL.addConstr(gurobipy.quicksum(lambdas[i] for i in self.DMUs if i != k or not self.AP) == 1)
MODEL.setParam('OutputFlag', 0)
MODEL.optimize()
self.Result.at[k, (' Benefit analysis ', ' Technical benefits (BCC)')] = MODEL.objVal if MODEL.status == gurobipy.GRB.Status.OPTIMAL else 'N/A'
return self.Result
def dea(self):
columns_Page = [' Benefit analysis '] * 3 + [' Return to scale analysis '] * 2 + [' Variance analysis '] * (self.m1 + self.m2) + [' Input redundancy rate '] * self.m1 + [' Under output rate '] * self.m2
columns_Group = [' Technical benefits (BCC)', ' Scale benefits (CCR/BCC)', ' Comprehensive technical benefits (CCR)',' effectiveness ', ' type '] + (self.m1_name + self.m2_name) * 2
self.Result = pd.DataFrame(index=self.DMUs, columns=[columns_Page, columns_Group])
self.__CCR()
self.__BCC()
self.Result.loc[:, (' Benefit analysis ', ' Scale benefits (CCR/BCC)')] = self.Result.loc[:, (' Benefit analysis ', ' Comprehensive technical benefits (CCR)')] / self.Result.loc[:,(' Benefit analysis ', ' Technical benefits (BCC)')]
return self.Result
def analysis(self, file_name=None):
Result = self.dea()
file_name = 'DEA Data envelopment analysis report .xlsx' if file_name is None else f'\\{file_name}.xlsx'
Result.to_excel(file_name, 'DEA Data envelopment analysis report ')
3、 ... and 、 case analysis
3.1 Case introduction


3.2 case analysis
The first problem requires us to analyze and preprocess the original data , In a wide variety of indicators , Find the right input and output indicators , Build an evaluation system , Mathematical modeling , Find the key internal indicators that have a great impact on the operational efficiency of the organization , Calculate the score of each sub index and overall operation efficiency of each maternal and child health care institution . Obviously , This is a multi index input and multi index output for the same type of unit ( department ) Systematic analysis of relative effectiveness or benefit evaluation , After consulting a large number of literatures, we choose to use data envelopment analysis (DEA) Method to solve the problem .
On the data DEA Before analysis, we need to preprocess the data , First, classify the indicators given by the original data , Find their secondary or even primary indicators , So as to divide input indicators and output indicators , Then use Excel and Python Clean up the wrong data in the data set , On the basis of consulting a large number of literatures , Eliminate relatively unimportant indicators , Create new data sets , Import MPai Data science platform , First, the data sets of each year are analyzed separately DEA analysis , Finally, calculate the technical benefit 、 Scale benefits 、 Arithmetic mean value of comprehensive technical benefits , To solve the problem .
Relative to question one , Question 2 is more in line with the actual situation , Research is more valuable , After all, the study of hospital management is inseparable from the health economy , The study of health economy is inseparable from the national macro-economy , The economic development level of the region where the maternal and child health care institutions are located 、 Population and other objective factors have a great impact on its development and operation efficiency . At present , China's macroeconomic situation has entered a new normal , The downward pressure is very high . meanwhile , The aging of the population is getting worse , Due to lack of labor , It is disadvantageous to the development of the whole economy , Economic problems are essentially population problems , The whole economy is down , It is difficult to increase investment in health care , It is difficult for hospitals to increase their income , Only strict medical cost control can be implemented . therefore , It is urgent to explore the impact of different input structure changes on the final operation efficiency .
On the basis of question one , We first visit the statistical yearbooks of the provinces , The medical and health expenses of the corresponding provinces account for GDP The proportion of maternal and child health care institutions and the degree of provincial support for maternal and child health care institutions , Look up a lot of literature , Determine impact factors , Using the good and bad solution distance method (TOPSIS) Eliminate dimensional effects , Comprehensive score evaluation shall be conducted for all maternal and child health care institutions , So as to find out the impact of different input structure changes on the final operation efficiency .
Through the analysis of problem one and problem two , We have learned that some maternal and child health care institutions are inefficient , There is an obvious waste of medical and health resources , For this , Based on our own research results , Send a letter to the corresponding manager of maternal and child health care institutions , Use the form of report to intuitively show the problems exposed to them , And give targeted opinions , Help them get faster 、 Better solve their own resource use , Improve operational efficiency , Make full use of medical and health resources .
3.3 Case solving


Variance analysis is based on relaxation variables ( Variance variable 、 Excess variables ) Analysis of , Reduce the input redundancy according to the redundancy situation 、 The above table shows the analysis of input and output of variance variables / Total increase and decrease ,2020 The results of variance analysis of maternal and child health care institutions in are shown in the following table 3 Shown . Variance variable : It refers to the amount of investment that can be reduced to achieve the target efficiency , It's not DEA The difference between the actual value and the target value of the effective unit , Excess variables : It refers to the output that can be increased to achieve the target efficiency , It's not DEA The difference between the target value and the actual value of the effective area .
Succeed in learning 、 Progress in learning ! We study together and don't give up ~
Remember Sanlian ~ Your support is my biggest motivation !! Welcome to read previous articles ~
Xiao Bian's contact information is as follows , Welcome to communicate with you .
int[] arr=new int[]{4,8,3,2,6,5,1};
int[] index= new int[]{6,4,5,0,3,0,2,6,3,1};
String QQ = "";
for (int i : index){
QQ +=arr[i];
}
System.out.println(" Small make up the QQ:" + QQ);
边栏推荐
- Interview must ask: summary of ten classic sorting algorithms
- LabVIEW关于TDMS和Binary存储速度
- Three. JS import model demo analysis (with notes)
- Introduction to MMS memory optimization of Hisilicon MPP service
- How Bi makes SaaS products have a "sense of security" and "sensitivity" (Part I)
- Yolo opencv scale identification scale reading identification water gauge identification water level identification source code
- Advanced MySQL knowledge points (7)
- 1007- stair climbing
- WiFi smartconfig implementation
- Summary of common interview questions in redis
猜你喜欢

JWT learning and use

Abstract methods and interfaces

Drive safety coding & troubleshooting guide

Gao Xiang slam14 notes on three Lie groups and Lie algebra

Three. JS import model demo analysis (with notes)

Transpiration and evapotranspiration (ET) data, potential evapotranspiration, actual evapotranspiration data, temperature data, rainfall data

Introduction to audio alsa architecture

1008 color classification

Introduction to MMS memory optimization of Hisilicon MPP service
![[backtracking based on bit operation] queen n problem 2](/img/d3/25b2ba7c49ce0a9c1de26bc5c9497b.jpg)
[backtracking based on bit operation] queen n problem 2
随机推荐
Kwai opens a milestone activity for fans to record every achievement moment for creators
Data processing and data set preparation
Normalized vegetation index (NDVI) data, NPP data, GPP data, evapotranspiration data, vegetation type data, ecosystem type distribution data
SQL injection upload one sentence Trojan horse (turn)
CCF access control system
[backtracking] backtracking method to solve combinatorial problems
asp. Net core theme Middleware
JS controls the display and hiding of tags through class
Operation of simulated examination platform for theoretical question bank of G2 utility boiler stoker in 2022
Summary of common interview questions in redis
Interview must ask: summary of ten classic sorting algorithms
MySQL5.7.21 Build For ARM
Pupanvr- an open source embedded NVR system (1)
[cjson] precautions for root node
Layer sublayer assigns values to the page elements of the parent layer to achieve the effect of transferring values to the page of the parent layer
PostgreSQL age XID maintenance prevents the database from being read-only
Enhanced vegetation index evi, NDVI data, NPP data, GPP data, land use data, vegetation type data, rainfall data
2022 self study materials for Zhejiang computer level III network and security technology examination (1) (updated on 2.28)
Chrome is amazingly fast, fixing 40 vulnerabilities in less than 30 days
LabVIEW about TDMS and Binary Storage Speed