Learn R Programming

Benchmarking (version 0.10)

dea: DEA efficiency

Description

Estimate a DEA frontier and calculate input or output efficience measures, peers, lambdas and slacks

Usage

dea(X, Y, RTS = "vrs", ORIENTATION = "in", XREF = NULL, YREF = NULL,
    FRONT.IDX = NULL, SLACK = FALSE, DUAL=TRUE,
    TRANSPOSE = FALSE, FAST = FALSE, LP = FALSE, CONTROL=NULL, 
    LPK=NULL, ...)

efficiency(object)
eff(object)

print.Farrell(x, digits=4, ...) 

summary.Farrell(object, digits=4, ...)

slack(X, Y, e, XREF=NULL, YREF=NULL, FRONT.IDX=NULL, LP=FALSE)

peers(object,  NAMES=FALSE)
get.number.peers(object)
peerslambda(object)
print.peers(x, ...)
lambda(object, KEEPREF=FALSE, ...)
lambda.print(x, KEEPREF=FALSE, ...)

sdea(X, Y, RTS="vrs", ORIENTATION="in", TRANSPOSE=FALSE, LP=FALSE, ...)

Arguments

X
input where efficiency is to be calculated, a K x m matrix of observations of K firms with m inputs (firm x input). In case TRABSPOSE=TRUE the input matrix is transposed as input x firm.
Y
output where efficiency is to be calculated, a K x n matrix of observations of K firms with n outputs (firm x input). In case TRABSPOSE=TRUE the output matrix is transposed as output x firm.
RTS
A text string or a number to state the returns to scale assumption rcl{ 0 "fdh" Free disposability hull, no convexity assumption 1 "vrs" Variable returns to scale, convex and free disposability 2 "drs" Decreasing returns
ORIENTATION
Input efficiency "in" (1), output efficiency "out" (2), and graph efficiency "graph" (3).
XREF
input determining the technology, defaults to X
YREF
output determining the technology, defaults to Y
FRONT.IDX
Index for units determining the technology
SLACK
Calculate slack in a phase II calculation; the precision for clalculating slacks for orientation graph is low.
DUAL
Calculate dual variables, i.e. shadow prices; not calculated for orientation graph as that is not an LP problem.
TRANSPOSE
Input and output matrices are treated as goods times firms as defaults. If TRANSPOSE=FALSE then marices are firms times goods as is standard in R for statistical models
LP
Only for debugging. If LP=TRUE then input and output for the LP program are written to standard output for each unit.
FAST
Only calculate efficiencies and just return them as a vector, i.e. no lambda or other outout. The return when using FAST cannot be used as input for slack.
CONTROL
Possible controls to lpSolveAPI, se the documentatin for that package.
...
Optional parameters for something.
object, x
A Farrel object, the object returned from dea
KEEPREF
If TRUE then all firms are kept as reference firms even though they have all zero weights (lambda); might come handy if one needs to calculate X x lambda such that the firms in X and lambda a
NAMES
Use names if any in the return for peers.
e
Object of type Farrell returned from dea.
digits
Digits in printes output, handled by format in print.
LPK
When LPK=k then a mps file is written for firm k; it can be used as input to an alternative LP solver just to check the our results.

Value

  • The results are returned in a Farrell object with the following components. The method slack only returns the last three componnets in the list relevant for slacks.
  • effThe efficiencies
  • lambdaThe lambdas, i.e. the weight of the peers for each firm
  • objvalThe objcetive value as returned from, normally just as eff, for for slack the sum of the slacks.
  • RTSThe return to scale assumption, just the option RTS in the call
  • ORIENTATIONThe efficiency orientation as in the call
  • TRANSPOSEAs in the call
  • slackA vector with sums of the slacks for each firm.
  • sxA matrix for input slacks for each firm, only calculated if the option SLACK is TRUE or returned from the method slack
  • syA matrix for output slack, see sx
  • vxDual variable for input, only calculated if DUAL is TRUE.
  • uyDual variable for output, only calculated if DUAL is TRUE.

encoding

UTF-8

Details

The efficiency in dea is calculated by the LP method in the package lpSolveAPI. Slacks can be calculated either in the call of dea using the option SLACK=TRUE or in a following call to the method slack The methods sdea calculate super-effciency and returns the same type of object as dea. The peers returns a matrix with numbers for the peers for each firm, for firms with efficiency 1 the peers are the firm itself. If there is slack for a firm with efficiency 1 then it can be questioned if it is reasonbable to consicer the firm as a real peer, and this can be corrected with a call to slack, either directly or by option SLACK. The get.number.peers returns the number of firms that a peer is a peer of. The graph orientated efficiency is calculated by bisection between feasible and not feasible values of G. The precision in the result is less than for the other orientations.

References

Bogetoft and Otto

See Also

FEAR

Examples

Run this code
x <- matrix(c(100,200,300,500,100,200,600),ncol=1)
y <- matrix(c(75,100,300,400,25,50,400),ncol=1)
dea.plot.frontier(x,y,txt=1:dim(x)[1])

e <- dea(x,y)
effi(e)
print(e)
summary(e)
lambda(e)
peers(e)

# Input savings potential for each firm
(1-eff(e)) * x
(1-e$eff) * x

# calculate slacks
(sl <- slack(x,y,e))
data.frame(e$eff,sl$slack,sl$sx,sl$sy)

el <- dea(x,y,SLACK=TRUE)
data.frame(e$eff,el$eff,el$slack,el$sx,el$sy)

# Fully efficient units, eff==1 and no slack
which(eff(e) == 1 & !sl$slack)


# Super efficiency
se <- sdea(x,y)
data.frame(eff(e),eff(se), lambda(se))
rngx <- range(x) * c(0,1.2)
rngy <- range(y) * c(0,1.2)
n <- 3
dea.plot.frontier(x[-n],y[-n],txt=(1:4)[-n],lty=1, xlim=rngx, ylim=rngy)
points(x[n],y[n],cex=1.25,pch=16)
text(x[n],y[n],n,adj=c(-.75,.75))

Run the code above in your browser using DataLab