dea: Data envelopment analysis

Description Usage Arguments Details Value References Examples

View source: R/dea.R

Description

Basic data envelopment analysis to replace rDEA::dea due to difficulties installing rDEA on travis-ci

Usage

1
dea(XREF, YREF, X, Y, model = "output", RTS = "variable")

Arguments

XREF

Matrix of inputs for observations used for constructing the frontier

YREF

Matrix of outputs for observations used for constructing the frontier

X

Matrix of inputs for observations, for which DEA scores are estimated

Y

Matrix of outputs for observations, for which DEA scores are estimated

model

Orientation of the model; must be "input" or "output"

RTS

Returns-to-scale for the model; must be "constant", "non-increasing" or "variable"

Details

This function estimates efficiency using data envelopment analysis. The linear program is constructed as in Fare et al. (1985) and optimized using lpSolve::lp. The function was built to swap with rDEA::dea because installation of rDEA presented problems for travis-ci, due to difficulties installing glpk. Should installation of rDEA on travis-ci become possible, this function will be removed.

Value

Returns a list with the following components

thetaOpt

A vector of efficiency estimates, in [0, 1] interval

lambda

A matrix of constraint coefficients

lambda_sum

A vector of sum of lambdas; lambda_sum = 1 for variable RTS, lambda_sum <= for non-increasing RTS

model

Orientation of the model

RTS

Returns-to-scale for the model

References

\insertRef

FareDEAsnfa

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(univariate)

dea.fit <- dea(univariate$x, univariate$y,
               univariate$x, univariate$y,
               model = "output",
               RTS = "variable")
univariate$frontier <- univariate$y / dea.fit$thetaOpt

# Plot technical/allocative efficiency over time
library(ggplot2)

ggplot(univariate, aes(x, y)) +
  geom_point() +
  geom_line(aes(y = frontier), color = "red")

tkmckenzie/snfa documentation built on June 11, 2020, 4:34 a.m.