Benchmarking-package: Data Envelopment Analyses (DEA) and Stochastic Frontier...

Benchmarking-packageR Documentation

Data Envelopment Analyses (DEA) and Stochastic Frontier Analyses (SFA) – Model Estimations and Efficiency Measuring

Description

The Benchmarking package contains methods to estimate technologies and measure efficiencies using DEA and SFA. Data Envelopment Analysis (DEA) are supported under different technology assumptions (fdh, vrs, drs, crs, irs, add), and using different efficiency measures (input based, output based, hyperbolic graph, additive, super, directional). Peers are available, partial price information can be included, and optimal cost, revenue and profit can be calculated. Evaluation of mergers are also supported. Comparative methods for estimating stochastic frontier function (SFA) efficiencies and for convex nonparametric least squares here for convex functions (StoNED) are also included. The methods can solve not only standard models, but also many other model variants, and they can be modified to solve new models.

The package also support simple plots of DEA technologies with two goods; either as a transformation curve (2 outputs), an isoquant (2 inputs), or a production function (1 input and 1 output). When more inputs and outputs are available they are aggregated using weights (prices, relative prices).

The package complements the book, Bogetoft and Otto, Benchmarking with DEA, SFA, and R, Springer-Verlag 2011, but can of course also be used as a stand-alone package.

Details

Package: Benchmarking
Type: Package
Version: 0.30 ($Revision: 233 $)
Date: $Date: 2020-08-10 18:43:17 +0200 (ma, 10 aug 2020) $
License: Copyright
dea DEA input or output efficience measures, peers, lambdas and slacks
dea.dual Dual weights (prices), including restrictions on weights
dea.direct Directional efficiency
sdea Super efficiency.
dea.add Additive efficiency; sum of slacks in DEA technology.
mea Multidirectional efficiency analysis or potential improvements.
eff Efficiency from an object returned from any of the dea or sfa functions.
slack Slacks in DEA models
excess Calculates excess input or output compared to DEA frontier.
peers get the peers for each firm.
dea.boot Bootstrap DEA models
cost.opt Optimal input for given output and prices.
revenue.opt Optimal output for given input and prices.
profit.opt Optimal input and output for given input and output prices.
dea.plot Graphs of DEA technologies under alternative technology assumptions.
dea.plot.frontier Specialized for 1 input and 1 output.
dea.plot.isoquant Specialized for 2 inputs.
dea.plot.transform Specialized for 2 outputs.
eladder Efficiency ladder for a single firm.
eladder.plot Plot efficiency ladder for a single firm.
make.merge Make an aggregation matrix to perform mergers.
dea.merge Decompose efficiency from a merger of firms
sfa Stochastic frontier analysis, production, distance, and cost function (SFA)
stoned Convex nonparametric least squares here for convex function function
outlierC.ap, outlier.ap Detection of outliers
eff.dens Estimate and plot kernel density of efficiencies
critValue Critical values calculated from bootstrap DEA models.
typeIerror Probability of a type I error for a test in bootstrap DEA models.

Note

The interface for the methods are very much like the interface to the methods in the package FEAR (Wilson 2008). One change is that the data now are transposed to reflect how data is usually available in applications, i.e. we have firms on rows, and inputs and output in the columns. Also, the argument for the options RTS and ORIENTATION can be given as memotechnical strings, and there are more options to control output.

The input and output matrices can contain negative numbers, and the methods can thereby manage restricted or fixed input or output.

The return is not just the efficiency, but also slacks, dual values (shadow prices), peers, and lambdas (weights).

Author(s)

Peter Bogetoft and Lars Otto larsot23@gmail.com

References

Bogetoft and Otto; Benchmarking with DEA, SFA, and R; Springer 2011

Paul W. Wilson (2008), “FEAR 1.0: A Software Package for Frontier Efficiency Analysis with R,” Socio-Economic Planning Sciences 42, 247–254

Examples

# Plot of different technologies
x <- matrix(c(100,200,300,500),ncol=1,dimnames=list(LETTERS[1:4],"x"))
y <- matrix(c(75,100,300,400),ncol=1,dimnames=list(LETTERS[1:4],"y"))
dea.plot(x,y,RTS="vrs",ORIENTATION="in-out",txt=rownames(x))
dea.plot(x,y,RTS="drs",ORIENTATION="in-out",add=TRUE,lty="dashed",lwd=2)
dea.plot(x,y,RTS="crs",ORIENTATION="in-out",add=TRUE,lty="dotted")
                      
dea.plot(x,y,RTS="fdh",ORIENTATION="in-out",txt=rownames(x),main="fdh")
dea.plot(x,y,RTS="irs",ORIENTATION="in-out",txt=TRUE,main="irs")
dea.plot(x,y,RTS="irs2",ORIENTATION="in-out",txt=rownames(x),main="irs2")
dea.plot(x,y,RTS="add",ORIENTATION="in-out",txt=rownames(x),main="add")

#  A quick frontier with 1 input and 1 output
dea.plot(x,y, main="Basic plot of frontier")

# Calculating efficiency
dea(x,y, RTS="vrs", ORIENTATION="in")
e <- dea(x,y, RTS="vrs", ORIENTATION="in")
e
eff(e)
peers(e)
peers(e, NAMES=TRUE)
print(peers(e, NAMES=TRUE), quote=FALSE)
lambda(e)
summary(e)


# Calculating super efficiency
esuper <- sdea(x,y, RTS="vrs", ORIENTATION="in")
esuper
print(peers(esuper,NAMES=TRUE),quote=FALSE)
# Technology for super efficiency for firm number 3/C 
# Note that drop=FALSE is necessary for XREF and YREF to be matrices
# when one of the dimensions is or is reduced to 1.
e3 <- dea(x,y, XREF=x[-3,,drop=FALSE], YREF=y[-3,,drop=FALSE])
dea.plot(x[-3],y[-3],RTS="vrs",ORIENTATION="in-out",txt=LETTERS[c(1,2,4)])
points(x[3],y[3],cex=2)
text(x[3],y[3],LETTERS[3],adj=c(-.75,.75))
e3 <- dea(x,y, XREF=x[-3,,drop=FALSE], YREF=y[-3,,drop=FALSE])
eff(e3)
peers(e3)
print(peers(e3,NAMES=TRUE),quote=FALSE)
lambda(e3)
e3$lambda

# Taking care of slacks
x <- matrix(c(100,200,300,500,100,600),ncol=1,
        dimnames=list(LETTERS[1:6],"x"))
y <- matrix(c(75,100,300,400,50,400),ncol=1,
        dimnames=list(LETTERS[1:6],"y"))

# Phase one, calculate efficiency
e <- dea(x,y)
print(e)
peers(e)
lambda(e)
# Phase two, calculate slacks (maximize sum of slacks)
sl <- slack(x,y,e)
data.frame(sl$sx,sl$sy)
peers(sl)
lambda(sl)
sl$lambda
summary(sl)

# The two phases in one function call
e2 <- dea(x,y,SLACK=TRUE)
print(e2)
data.frame(eff(e2),e2$slack,e2$sx,e2$sy,lambda(e2))
peers(e2)
lambda(e2)
e2$lambda

Benchmarking documentation built on Nov. 10, 2022, 5:56 p.m.