DEAP2.1——数据包络分析(DEA——CCR、BCC)

本文介绍了如何使用DEAP软件进行DEA(数据包络分析)分析。通过设置参数,可以运行CCR模型和BCC模型,并提供了2012年投入产出数据的实际案例,展示了不同模型下的效率评估结果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1 软件介绍

基础文件有DEAP.EXE DEAP.000 两个文件,有则可以正常运行。

1.将excel数据复制进data.DTA文件(用笔记本txt打开):产出指标数据在前

2.在1.ins输入参数设置(用笔记本txt打开)

3.打开deap.exe程序,在程序中输入1.ins回车即可

4.在文件夹中可看到1.out文件(用笔记本txt打开)

  •  参数设置
data.dta        DATA FILE NAME
1.out           OUTPUT FILE NAME
38              NUMBER OF FIRMS
4		        NUMBER OF TIME PERIODS 
1               NUMBER OF OUTPUTS
5               NUMBER OF INPUTS
0               0=INPUT AND 1=OUTPUT ORIENTATED
1		0=CRS AND 1=VRS
0		0=DEA(MULTI-STAGE), 1=COST-DEA, 2=MALMQUIST-DEA, 3=DEA(1-STAGE), 4=DEA(2-STAGE)
  • 参数解释 

DATA FILE NAME——数据文件名
OUTPUT FILE NAME——输出文件名
NUMBER OF FIRMS——决策单元数量
NUMBER OF TIME PERIODS——截面数据选1;面板根据年份设置几期,且最后一行指令需为2=MALMQUIST-DEA
NUMBER OF OUTPUTS——产出指标个数
NUMBER OF INPUTS——投入指标个数
0=INPUT AND 1=OUTPUT ORIENTATED ——0:投入主导模型,1:产出主导模型,一般默认0
0=CRS AND 1=VRS——0:CCR模型(不考虑规模效益),1:BCC模型(考虑规模收益)
0=DEA(MULTI-STAGE), 1=COST-DEA, 2=MALMQUIST-DEA, 3=DEA(1-STAGE), 4=DEA(2-STAGE)——一般默认0。DEA(MULTI-STAGE)使用在投入产出项为数量或质性资料,可计算管理效率、规模效率;COST-DEA使用在使用投入、产出为成本资料下,可计算管理效率、规模效率、配置效率;MALMQUIST-DEA使用在面板数据,可计算生产力的变动,包含技术变动(technological change)、规模效率变动(scale efficiency change)、管理效率变动(technical efficiency change)。指令3或4是在多个样本有多项投入或产出的值为0或10^{-6}时使用,

2 实例

 以2012年投入产出数据为例,投入指标为5个,产出指标为1个。

DEA-CCR模型:

data.dta            DATA FILE NAME
1.out            OUTPUT FILE NAME
38               NUMBER OF FIRMS
1		NUMBER OF TIME PERIODS 
1               NUMBER OF OUTPUTS
5               NUMBER OF INPUTS
0               0=INPUT AND 1=OUTPUT ORIENTATED
0		0=CRS AND 1=VRS
0		0=DEA(MULTI-STAGE), 1=COST-DEA, 2=MALMQUIST-DEA, 3=DEA(1-STAGE), 4=DEA(2-STAGE)

输出结果:

Results from DEAP Version 2.1
 
Instruction file = 1.ins       
Data file          = data.dta    
 
 Input orientated DEA
 
 Scale assumption: CRS
 
 Slacks calculated using multi-stage method
 
 
 EFFICIENCY SUMMARY:
 
  firm     te
    1  0.083
    2  0.067
    3  0.078
    4  0.040
    5  0.148
    6  0.328
    7  0.509
    8  0.239
    9  1.000
   10  0.335
   11  0.311
   12  0.466
   13  1.000
   14  0.666
   15  0.329
   16  0.900
   17  1.000
   18  0.264
   19  0.667
   20  1.000
   21  0.687
   22  0.906
   23  0.425
   24  0.630
   25  0.895
   26  0.852
   27  0.750
   28  0.880
   29  0.442
   30  0.355
   31  0.973
   32  1.000
   33  1.000
   34  0.726
   35  0.268
   36  0.113
   37  0.106
   38  0.031
 
 mean  0.539

 DEA-BCC模型:

data.dta            DATA FILE NAME
1.out            OUTPUT FILE NAME
38               NUMBER OF FIRMS
1		NUMBER OF TIME PERIODS 
1               NUMBER OF OUTPUTS
5               NUMBER OF INPUTS
0               0=INPUT AND 1=OUTPUT ORIENTATED
1		0=CRS AND 1=VRS
0		0=DEA(MULTI-STAGE), 1=COST-DEA, 2=MALMQUIST-DEA, 3=DEA(1-STAGE), 4=DEA(2-STAGE)

结果: 

 Results from DEAP Version 2.1
 
Instruction file = 1.ins       
Data file          = data.dta    
 
 Input orientated DEA
 
 Scale assumption: VRS
 
 Slacks calculated using multi-stage method
 
 
 EFFICIENCY SUMMARY:
 
  firm  crste  vrste  scale
 
    1  0.083  0.711  0.117 irs
    2  0.067  0.798  0.084 irs
    3  0.078  0.986  0.079 irs
    4  0.040  0.929  0.043 irs
    5  0.148  1.000  0.148 irs
    6  0.328  1.000  0.328 irs
    7  0.509  1.000  0.509 irs
    8  0.239  0.943  0.253 irs
    9  1.000  1.000  1.000  - 
   10  0.335  1.000  0.335 irs
   11  0.311  1.000  0.311 irs
   12  0.466  1.000  0.466 irs
   13  1.000  1.000  1.000  - 
   14  0.666  1.000  0.666 irs
   15  0.329  0.888  0.371 irs
   16  0.900  1.000  0.900 irs
   17  1.000  1.000  1.000  - 
   18  0.264  0.895  0.295 irs
   19  0.667  0.840  0.794 irs
   20  1.000  1.000  1.000  - 
   21  0.687  1.000  0.687 irs
   22  0.906  1.000  0.906 irs
   23  0.425  0.825  0.515 irs
   24  0.630  1.000  0.630 irs
   25  0.895  1.000  0.895 irs
   26  0.852  0.877  0.971 irs
   27  0.750  0.831  0.903 irs
   28  0.880  0.886  0.993 irs
   29  0.442  0.719  0.614 irs
   30  0.355  0.745  0.476 irs
   31  0.973  0.975  0.998 drs
   32  1.000  1.000  1.000  - 
   33  1.000  1.000  1.000  - 
   34  0.726  1.000  0.726 irs
   35  0.268  1.000  0.268 irs
   36  0.113  0.755  0.150 irs
   37  0.106  1.000  0.106 irs
   38  0.031  0.952  0.033 irs
 
 mean  0.539  0.936  0.568

第一列数据达到1则说明该单元dea有效。 

一、软件的具体操作 1.建一个文件夹,里面必须有四个文件(Dblank;deapdeap.000;123.dta)前三个文件在一般下载的DEAP Version 2.1中都有,直接复制过来就可以,第四个文件是一个数据文件,一般先在excel中先输入,再复制到一个记事本下就可以,注意在记事本下的数据只有数据,不包括决策单元的名称和投入、产出的名称,并且一定要先放产出,后是投入。例子具体见123电子表格和123记事本。 2.对命令Dblank文件进行修改,修改后保存为123.ins文件 3.打开deap软件,运行123.ins 4,回车后自动会有123.out 注意事项:(1) 123.dta;Dblank;123.ins都用记事本打开; (2)数据文件名和命令文件名一定要一样,如例子中都用123 (3)文件夹中一定要包括deap.000文件,如果没有这个文件,打开deap软件,就会出现一闪就没有了的情况。 二,结果的分析 在文件夹中打开123.out,看如下: 1) firm crste vrste scale 1 0.687 1.000 0.687 drs 2 0.814 1.000 0.814 drs 3 0.319 0.709 0.450 drs 4 1.000 1.000 1.000 - 5 1.000 1.000 1.000 - 6 0.336 0.425 0.791 drs 7 0.642 0.648 0.991 irs 8 0.379 0.381 0.994 irs 9 0.702 0.750 0.936 irs 10 1.000 1.000 1.000 - 11 0.304 0.461 0.659 irs 12 0.352 1.000 0.352 irs 13 1.000 1.000 1.000 - 14 0.594 0.929 0.639 irs 15 0.402 1.000 0.402 irs mean 0.635 0.820 0.781 firm:代表例子中的15的样本 crste:技术效率,也叫综合效率 vrste:纯技术效率 scale:规模效率(drs:规模报酬递减;-:规模报酬不变;irs:规模报酬递增) crste=vrste×scale 2) Results for firm: 3 Technical efficiency = 0.709 Scale efficiency = 0.450 (drs) PROJECTION SUMMARY: variable original radial slack projected value movement movement value output 1 7326.380 0.000 0.000 7326.380 output 2 119.910 0.000 0.000 119.910 input 1 15427.000 -4496.010 0.000 10930.990 input 2 5257.970 -1532.371 -1643.828 2081.771 第三个样本的具体分析如下: 纯技术效率=0.709 规模效率=0.450 (drs):规模报酬应该递减 第三个样本的投入产出情况分析: 第一、二产出均没有冗余情况(因为其 radial movement 和 slack movement 均为零) 第一个投入要素有投入冗余4496.010;第二投入要素有投入冗余3176.199=1532.371+1643.828 这个意思是说按第三个样本现在的产出冗余第一个投入要素可以减少4496.010,第二个投入要素可以减少3176.199 Results for firm: 8 Technical efficiency = 0.381 Scale efficiency = 0.994 (irs) PROJECTION SUMMARY: variable original radial slack projected value movement movement value output 1 235.860 0.000 0.000 235.860 output 2 3.760 0.000 6.995 10.755 input 1 777.000 -480.651 0.000 296.349 input 2 132.550 -81.995 0.000 50.555 第八个样本则出现了产出不足的情况,即第二个产出应该比现在增加 6.995 如果投入因素是决策单元可的决定的,而产出因素是不能决定的时,我们分析就可以考虑投入是否能减少,不管产出是否能增加(因为产出是决策单元不可控的因素) 如果产出因素是决策单元可的决定的,而投入因素是不能决定的时,我们分析就可以考虑产出是否能增加,不管投入是否能减少(因为投入是决策单元不可控的因素) 如果样本单元的纯技术效率为1,而规模效率小于1时,这说明样本单元本身的技术效率而言没有投入需要减少、没有产出需要增加;样本单元的综合效率没有达到有效(1),是因为其规模和投入、产出不相匹配,需要增加规模或减少规模。如例子中的第二个样本单元,其规模应该缩小。
DEAP Version 2.1 **************** A DATA ENVELOPMENT ANALYSIS PROGRAM by Tim Coelli Centre for Efficiency and Productivity Analysis School of Economics University of Queensland Brisbane, QLD 4072 Australia. email: t.coelli@economics.uq.edu.au Web: http://www.uq.edu.au/economics/cepa/ GETTING STARTED: 1. Open the WINDOWS EXPLORER program on your PC. 2. Create a new folder on your hard drive, for example called DEAP, by using the File/New/Folder option. 3. Copy ALL the files associated with DEAP into this folder, using the File/Copy option or by "drag-and-drop". 4. If the files are stored in a DEAP.ZIP file, you will then need to unzip (extract) the files by double-clicking on the zip file and extracting the contents of the zip file into the DEAP folder. FILES USED BY DEAP DEAP uses three text files when it conducts an analysis. These are: - a data file (eg. named eg1-dta.txt) - an instruction file (eg. named eg1-ins.txt) - an output file (eg. named eg1-out.txt) All of these files are text files. They can be edited using many programs. For example, NOTEPAD, WORDPAD, WORD, WORD PERFECT, etc. We suggest you use WORDPAD to view and edit these files. HOW TO RUN THE PROGRAM To practice running DEAP double-click on the DEAP.EXE file name. The program will then ask for an instruction file name. Type in eg1-ins.txt (and hit the RETURN key). DEAP will only take a few seconds to complete this small example. To look at the output file (eg1-out.txt) you then simply double-click on the eg1-out.txt file name. FILE NAMES IN DOS DEAP is a DOS computer program. In DOS all file names must satisfy certain restrictions: - no more than 12 characters - no more than 3 characters after the period (".") - no more than 8 characters before the period That is, the largest possible file name has the form: XXXXXXXX.XXX Since we use text files, the file name will always have "txt" after the period. That is: XXXXXXXX.txt DATA FILE STRUCTURE All data, instruction and output files are text files. In the data file the output columns are listed first followed by the input columns (left to right across the file). If you are doing a cost eff DEA the input price columns are listed to the right of these. If you are doing Malmquist DEA all observations for year 1 are listed first, then those for year 2, and so on down the file. Note that there should be no column names in the data file, only numbers. For further details see the manual. CREATING A NEW INSTRUCTION/COMMAND FILE The easiest way to create a new instruction file is to open an existing instruction file (eg. eg1-ins.txt) using WORDPAD and then save it under a new name (eg. abc2-ins.txt). This is done by using the File/SaveAs option in WORDPAD. Then you can edit the contents of this new file to suit your new analysis. CREATING DATA FILES USING EXCEL Many people store their data in Excel files. To construct a text file from an Excel file, open the file in Excel and then use the File/SaveAs option in Excel and save it as a text file. However, be sure to remove any column names first - the data file should only contain numbers. MANUAL Coelli, T. (1996) 'A Guide to DEAP Version 2.1: A Data Envelopment Analysis (Computer) Program', CEPA Working Paper 96/08, Centre for Efficiency and Productivity Analysis, University of New England. A COPY OF THIS GUIDE IS PROVIDED IN THE FILE: DEAP.PDF. For more on these DEA methods see Chapters 6, 7 and 10 in Coelli, Rao and Battese (1998), An Introduction to Efficiency and Productivity Analysis, Kluwer Academic Publishers, Boston. LIABILITY Every effort has been made to ensure that this software is free of errors. However, the software is supplied without any warranty as to the performance or fitness of the program for any particular purpose. All risk relating to the results and performance of this program is assumed by the user. CEPA shall not be liable for any damages resulting from the use of this product.
抱歉,我无法提供完整的代码。但是,我可以给你一些关于DEA-BCC模型的基本原理和步骤的解释,以帮助你编写自己的MATLAB代码。 DEA-BCC模型是一种用于数据包络分析DEA)的方法,用于评估多个输入和输出变量的相对效率。以下是DEA-BCC模型的基本步骤: 1. 收集数据:收集包含各个决策单元(DMU)的输入和输出数据的数据库。 2. 定义DMU:确定参与评估的每个决策单元(如公司、组织或个人)。 3. 确定输入和输出:根据评估目标,选择适当的输入和输出变量。输入变量是影响决策单元效率的因素,输出变量是决策单元的结果或产出。 4. 标准化数据:将数据进行标准化处理,以便在不同单位之间进行比较。常见的标准化方法包括范围缩放、最小-最大标准化或z-score标准化。 5. 构建包络模型:使用包络分析方法,根据每个DMU的输入和输出数据构建包络模型。DEA-BCC模型是一种常用的包络模型之一。 6. 确定相对效率:使用DEA-BCC模型计算每个DMU的相对效率得分。相对效率得分表示每个DMU相对于其他DMU的效率。 编写MATLAB代码时,可以使用线性规划函数(如linprog)来求解DEA-BCC模型的优化问题。你可以定义输入和输出向量、构建约束条件矩阵和计算相对效率得分。 这只是一个简单的概述,DEA-BCC模型的实现可能会更加复杂,具体取决于你的数据和研究问题。希望这些信息对你有所帮助!如果有任何进一步的问题,请随时提问。
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值