Calculates additive efficiency as sum of input and output slacks within different DEA models
dea.add(X, Y, RTS="vrs", XREF=NULL, YREF=NULL, 
        FRONT.IDX=NULL, param=NULL, TRANSPOSE=FALSE, LP=FALSE)
Sum of all slacks for each firm,
     sum=sum(sx)+sum(sy).
A non-NULL vector of logical variables, TRUE if
     there is slack for the corresponding firm, and FALSE if
     the there is no slack, i.e. the sum of slacks is zero.
A matrix of input slacks for each firm
A matrix of output slack for each firm
The lambdas, i.e. the weights of the peers for each firm
Inputs of firms to be evaluated, a K x m matrix
  of observations of K firms with m inputs (firm x input).  In case
  TRANSPOSE=TRUE the input matrix is transposed to input x
  firm.
Outputs of firms to be evaluated, a K x n matrix
  of observations of K firms with n outputs (firm x input).  In case
  TRANSPOSE=TRUE the output matrix is transposed to output x
  firm.
Text string or a number defining the underlying DEA technology / returns to scale assumption.
| 0 | fdh | Free disposability hull, no convexity assumption | 
| 1 | vrs | Variable returns to scale, convexity and free disposability | 
| 2 | drs | Decreasing returns to scale, convexity, down-scaling and free disposability | 
| 3 | crs | Constant returns to scale, convexity and free disposability | 
| 4 | irs | Increasing returns to scale, (up-scaling, but not down-scaling), convexity and free disposability | 
| 5 | add | Additivity (scaling up and down, but only with integers), and free disposability | 
Inputs of the firms determining the technology, defaults
    to X
Outputs of the firms determining the technology, defaults
    to Y
Index for firms determining the technology
Possible parameters. At the moment only used for
    RTS="fdh+" to set low and high values for restrictions on lambda;
    see the section details and examples for its use. Future versions
    might also use param for other purposes.
Input and output matrices are treated as firms
      times goods matrices for the default value TRANSPOSE=FALSE
      corresponding to the standard in R for statistical models.  When
      TRUE data matrices are transposed to good times firms
      matrices as is normally used in LP formulation of the problem.
Only for debugging. If LP=TRUE then input and output
   for the LP program are written to standard output for each unit.
Peter Bogetoft and Lars Otto larsot23@gmail.com
The sum of the slacks is maximized in a LP formulation of the DEA technology. The sum of the slacks can be seen as distance to the frontier when you only move parallel to the axes of inputs and outputs, i.e. not a usual Euclidean distance, but what is also known as an L1 norm.
Since it is the sum of slacks that is calculated, there is no exogenous ORIENTATION in the problem. Rather, there is generally both an input and an output direction in the slacks. The model considers the input excess and output shortfall simultaneously and finds a point on the frontier that is most distant to the point being evaluated.
Bogetoft and Otto; Benchmarking with DEA, SFA, and R; Springer 2011
Cooper, Seiford, and Tone; Data Envelopment Analysis: A Comprehensive Text with Models, Applications, References and DEA-Solver Software; Second edition, Springer 2007
x <- matrix(c(2,3,2,4,6,5,6,8),ncol=1)
y <- matrix(c(1,3,2,3,5,2,3,5),ncol=1)
dea.plot.frontier(x,y,txt=1:dim(x)[1])
sb <- dea.add(x,y,RTS="vrs")
data.frame("sx"=sb$sx,"sy"=sb$sy,"sum"=sb$sum,"slack"=sb$slack)
Run the code above in your browser using DataLab