1. The difference between the two methods
1.1 SFA
Stochastic frontier analysis (SFA) is a technique that can be used to study the performance of economic data, and the relationship between them. It can help economists better analyze the risks and returns of investment portfolios in investment decisions
1.2 DEA
Data Envelopment Analysis (DEA) is an analytical technique used to evaluate organizational performance. It can be used to compare the performance of different organizations and to compare its performance with that of other organizations. It can also be used to determine which organizations are performing the best and which are the worst
1.3 Function
Both allow for efficiency analysis (a measure of total factor productivity) based on input-output data. Human words, used to construct your core explanatory or explained variables.
1.4 Summary
project | SFA | DEA |
---|---|---|
method type | parameter based | nonparametric based |
Whether to consider randomness | yes | no |
Firm Efficiency Hypothesis | existential inefficiency | existential inefficiency |
required variable | Log (quantity of input and output) - logarithmic processing | Quantity of input and output |
Supported Data Formats | Cross Sections and Panels | Cross Sections and Panels |
Input-Output Goals | Support multiple inputs and single outputs (similar to regression) | Support multiple inputs and outputs |
Sample size | Small | big |
1.5 Complementarity defects
- DEA can measure the efficiency of multiple inputs and multiple outputs, but ignores the impact of random errors (Sun et al., 2015; Han Dongya and Liu Hongwei, 2019)
- The advantage of SFA over DEA is that it considers the impact of the existence of random errors on the results, determines the production function form in advance and then studies the production process of the enterprise, which can improve the accuracy of the calculation of technical efficiency, and can also analyze the relationship between efficiency and influencing factors relevance.
2. Code implementation
step 1
delog your data
step 2
Adjust according to the following data format
step 3
Bring in the code
% import data of Wang and Ho (2010)
dta=xlsread('Wang(2010)_data.csv');% 读取数据
%Esitamtion
para0=[0.5;0.5;0.1;0.1;0.1;0.5;0.5]; % 设置参数,这里可以用OLS估计出 直接替换
[parameter,ste,robste,LL,BCindex]=PSFA2010(dta,3,para0); % dta 你的数据,3是自变量个数 ,para0初始参数
parameter
这是主函数代码
Realized based on MATLAB
step 4
Result export
Since there are three independent variables, the first three are the number of independent variables.
Multiply the original X1, X2, and X3 with the coefficient here to get
每个个体每年的效率值
the code transfer gate.