Learn R Programming

Benchmarking (version 0.10)

dea.dual: Calculates dual DEA models

Description

Calculates dual DEA models including restrictions on the ratios, acceptance regions

Usage

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

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) (not yet implemented).
XREF
input determining the technology, defaults to X
YREF
output determining the technology, defaults to Y
FRONT.IDX
Index for units determining the technology
DUAL
Matrix of order "number of input plus number of outputs minus 2" times 2. First column is the lower bound and the second column is the upper bound for the restrictions on the multiplier ratios inputs and outputs. The rations are relative to the fir
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.
CONTROL
Possible controls to lpSolveAPI, se the documentatin for that package.
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.
...
Optional parameters for something.

Value

  • effThe efficiencies
  • objvalThe objcetive value as returned from, normally just as eff
  • RTSThe return to scale assumption, just the option RTS in the call
  • ORIENTATIONThe efficiency orientation as in the call
  • TRANSPOSEAs in the call
  • uDual values, prices, for inputs
  • vDual values, prices, for outputs
  • gammaThe values of gamma, the shadow price(s) for returns to scale
  • solSolution of all variables as one component, sol=c(u,v,gamma).

encoding

UTF-8

Details

Solved as an LP program using the package lpSolveAPI. The method dea.dual.dea calls the method dea with the option DUAL=TRUE.

References

See dea

See Also

dea

Examples

Run this code
x <- matrix(c(2,5 , 1,2 , 2,2 , 3,2 , 3,1 , 4,1), ncol=2,byrow=TRUE)
y <- matrix(1,nrow=dim(x)[1])
dea.plot.isoquant(x[,1],x[,2],txt=1:dim(x)[1])
for (i in 1:dim(x)[1]) lines(c(0,x[i,1]), c(0,x[i,2]),lty="dotted")

e <- dea(x,y,RTS="crs",SLACK=TRUE)
ed <- dea.dual(x,y,RTS="crs")
# print(cbind("e"=e$eff,"ed"=ed$eff, peers(e), lambda(e), e$sx, e$sy, ed$u, ed$v),
#     digits=3)
# 
# (dual <- matrix(c(.5, 2.5), nrow=dim(x)[2]-1, ncol=2, byrow=TRUE))
# er <- dea.dual(x,y,RTS="crs", DUAL=dual)
# print(cbind("e"=e$eff,"ar"=er$eff, lambda(e), e$sx, e$sy, er$u, 
#     "ratio"=er$u[,2]/er$u[,1],er$v),digits=3)

Run the code above in your browser using DataLab