cost.opt {Benchmarking} | R Documentation |
DEA optimal cost, revenue, and profit
Description
Estimates the input and/or output vector(s) that minimize cost, maximize revenue or maximize profit in the context of a DEA technology
Usage
cost.opt(XREF, YREF, W, YOBS=NULL, RTS="vrs", param=NULL,
TRANSPOSE=FALSE, LP=FALSE, CONTROL=NULL, LPK = NULL)
revenue.opt(XREF, YREF, P, XOBS=NULL, RTS="vrs", param=NULL,
TRANSPOSE = FALSE, LP = FALSE, CONTROL=NULL, LPK = NULL)
profit.opt(XREF, YREF, W, P, RTS = "vrs", param=NULL,
TRANSPOSE = FALSE, LP = FALSE, CONTROL=NULL, LPK = NULL)
Arguments
XREF |
Input of the firms defining the technology, a K x m matrix
of observations of K firms with m inputs (firm x input). In case
| |||||||||||||||||||||
YREF |
output of the firms defining the technology, a K x n
matrix of observations of K firms with n outputs (firm x input). In
case | |||||||||||||||||||||
W |
Input prices as a matrix. Either same prices for all firms or individual prices for all firms, i.e. either a 1 x m or a K x m matrix for K firms and m inputs | |||||||||||||||||||||
P |
Output prices as a matrix. Either same prices for all firms or individual prices for all firms, i.e. either a 1 x n or K x n matrix for K firms and n outputs | |||||||||||||||||||||
XOBS |
The input for which an optimal, revenue maximizing, output
vector is to be calculated. Defaults is | |||||||||||||||||||||
YOBS |
The output for which an optimal, cost minimizing input
vector is to be calculated. Defaults is | |||||||||||||||||||||
RTS |
A text string or a number defining the underlying DEA technology / returns to scale assumption.
| |||||||||||||||||||||
param |
Possible parameters. Now only used for
RTS="fdh+" to set low and high values for restrictions on lambda;
see the section details and examples in | |||||||||||||||||||||
TRANSPOSE |
Input and output matrices are treated as firms times
goods for the default value | |||||||||||||||||||||
LP |
Only for debugging. If | |||||||||||||||||||||
CONTROL |
Possible controls to lpSolveAPI, see the
documentation for that package. For examples of use see the
function | |||||||||||||||||||||
LPK |
When |
Details
Input and output matrices are in the same form as for the
method dea
.
The LP optimization problem is formulated in Bogetoft and Otto (2011, pp 35 and 102) and is solved by the LP method in the package lpSolveAPI.
The methods print
and summary
are working for
cost.opt
, revenue.opt
, and profit.opt
Value
The values returned are the optimal input, and/or optimal output. When saved in an object the following components are available:
xopt |
The optimal input, returned as a matrix by
|
yopt |
The optimal output, returned as a matrix by
|
cost |
The optimal/minimal cost. |
revenue |
The optimal/maximal revenue |
profit |
The optimal/maximal profit |
lambda |
The peer weights that determines the technology, a matrix. Each row is the lambdas for the firm corresponding to that row; for the vrs technology the rows sum to 1. A column shows for a given firm how other firms are compared to this firm, i.e. peers are firms with a positive element in their columns. |
Note
The index for peer units can be returned by the method peers
and the weights are returned in lambda
. Note that the peers
now are the firms for the optimal input and/or output allocation, not
just the technical efficient firms.
If a numerical problem occurs, status=5, or if no solution can be found,
the best solution is often to scale the input X
and output
Y
yourself or use the option CONTROL
to change scaling in
the program itself, as described in the notes for dea
.
Author(s)
Peter Bogetoft and Lars Otto larsot23@gmail.com
References
Bogetoft and Otto; Benchmarking with DEA, SFA, and R; Springer 2011
See Also
Paul W. Wilson (2008), “FEAR 1.0: A Software Package for Frontier Efficiency Analysis with R,” Socio-Economic Planning Sciences 42, 247–254
Examples
x <- matrix(c(2,12, 2,8, 5,5, 10,4, 10,6, 3,13), ncol=2, byrow=TRUE)
y <- matrix(1,nrow=dim(x)[1],ncol=1)
w <- matrix(c(1.5, 1),ncol=2)
txt <- LETTERS[1:dim(x)[1]]
dea.plot(x[,1],x[,2], ORIENTATION="in", cex=1.25)
text(x[,1],x[,2],txt,adj=c(-.7,-.2),cex=1.25)
# technical efficiency
te <- dea(x,y,RTS="vrs")
xopt <- cost.opt(x,y,w,RTS=1)
cobs <- x %*% t(w)
copt <- xopt$x %*% t(w)
# cost efficiency
ce <- copt/cobs
# allocaltive efficiency
ae <- ce/te$eff
data.frame("ce"=ce,"te"=te$eff,"ae"=ae)
print(cbind("ce"=c(ce),"te"=te$eff,"ae"=c(ae)),digits=2)
# isocost line in the technology plot
abline(a=copt[1]/w[2], b=-w[1]/w[2], lty="dashed")