| Title: | Stochastic Data Envelopment Analysis |
|---|---|
| Description: | Set of functions for Stochastic Data Envelopment Analysis. Chance constrained versions of radial, directional and additive DEA models are implemented, as long as super-efficiency models. See: Cooper, W.W.; Deng, H.; Huang, Z.; Li, S.X. (2002). <doi:10.1057/palgrave.jors.2601433>, Bolós, V.J.; Benítez, R.; Coll-Serrano, V. (2024) <doi:10.1016/j.orp.2024.100307>. |
| Authors: | Vicente Bolós [aut, cre], Vicente Coll-Serrano [aut], Rafael Benítez Suárez [aut] |
| Maintainer: | Vicente Bolós <[email protected]> |
| License: | GPL |
| Version: | 1.0.2 |
| Built: | 2026-05-15 10:16:36 UTC |
| Source: | https://github.com/cran/SdeaR |
Data of automobile industries collected from the Statistical Year Book of China of the Chinese Bureau of Statistics. Each year is treated as a DMU.
data("Automobile")data("Automobile")
Data frame with 17 rows and 4 columns. Definition of inputs (X) and output (Y):
Expressed in units of 1000 persons.
Stated in units of 1 million Ren Min Bi (Chinese monetary unit) adjusted to 1991 prices.
Stated in units of 1 million Ren Min Bi (Chinese monetary unit) adjusted to 1991 prices.
Vicente Bolos ([email protected]). Department of Business Mathematics
Rafael Benitez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Cooper, W.W.; Denga, H.; Gua, B.; Lib, S.; Thrall, R.M. (2001). "Using DEA to improve the management of congestion in Chinese industries (1981-1997)", Socio-Economic Planning Sciences, 35(4), 227-242.
make_deadata_stoch, modelstoch_radial
Extract the scores (optimal objective values) of the evaluated DMUs from a stochastic DEA solution. Note that these scores may not always be interpreted as efficiencies.
## S3 method for class 'dea_stoch' efficiencies(x, ...)## S3 method for class 'dea_stoch' efficiencies(x, ...)
x |
Object of class |
... |
Other options (for compatibility reasons) |
A matrix with the scores (optimal objective values).
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstoch <- modelstoch_radial(data_stoch, dmu_eval = 6) efficiencies(Collstoch)# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstoch <- modelstoch_radial(data_stoch, dmu_eval = 6) efficiencies(Collstoch)
This function creates, from a deadata object, a
deadata_stoch object by adding the corresponding covariance matrices.
These objects are prepared to be passed to a modelstoch_* function.
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values.
We suppose that and follow a multivariate
probability distribution with means ,
and covariance matrix
where , ,
and are matrices, for
and , such that
with .
- If we have the covariances matrix in the general form above, it can be introduced
directly by parameter cov_matrix. Since this matrix is supposed to be
symmetric, only values above the diagonal are read, ignoring values below the diagonal.
- Alternatively, we can introduce the covariances matrix using parameters cov_II,
cov_OO and cov_IO, that are 4-dimensional arrays of size , and ,
respectively, such that
for and . Since matrices and are supposed to be symmetric, only values above the diagonal are
read, ignoring values below the diagonal. Moreover, since
is the transpose of , and is
the transpose of , only matrices
and with and are necessary,
ignoring those with and .
- If covariances between different inputs/outputs are zero, we can make use of
parameters cov_input and cov_output, that are arrays of size
and , respectively, such that
for and . By symmetry of and , only values above the diagonal are
read, ignoring values below the diagonal.
- Finally, if all the variables are independent then the covariances matrix is
diagonal. Hence, we might use parameters var_input and var_output,
that are matrices of size and , respectively,
such that
for , and .
make_deadata_stoch(datadea = NULL, var_input = NULL, var_output = NULL, cov_input = NULL, cov_output = NULL, cov_II = NULL, cov_OO = NULL, cov_IO = NULL, cov_matrix = NULL)make_deadata_stoch(datadea = NULL, var_input = NULL, var_output = NULL, cov_input = NULL, cov_output = NULL, cov_II = NULL, cov_OO = NULL, cov_IO = NULL, cov_matrix = NULL)
datadea |
The |
var_input |
A matrix of size |
var_output |
A matrix of size |
cov_input |
An array of size |
cov_output |
An array of size |
cov_II |
An array of size |
cov_OO |
An array of size |
cov_IO |
An array of size |
cov_matrix |
A matrix of size |
An object of class deadata_stoch.
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Cooper, W.W.; Huang, Z.; Lelas, V.; Li, S.X.; Olesen, O.B. (1998). “Chance Constrained Programming Formulations for Stochastic Characterizations of Efficiency and Dominance in DEA", Journal of Productivity Analysis, 9, 53-79.
Land, K.C; Lovell, C.A.K.; Thore, S. (1993). "Chance-constrained data envelopment analysis", Managerial and Decision Economics, Vol. 14, No. 6, 541-554.
# Example 1 library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs # All variances are 1. var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # All covariances are 1. cov_input <- array(1, dim = c(ni, nd, nd)) cov_output <- array(1, dim = c(no, nd, nd)) data_stoch2 <- make_deadata_stoch(datadea = data_example, cov_input = cov_input, cov_output = cov_output) # Example 2. Deterministic data with one stochastic input. library(deaR) dmunames <- c("A", "B", "C") nd <- length(dmunames) # Number of DMUs inputnames <- c("Input_1", "Input_2") ni <- length(inputnames) # Number of Inputs outputnames <- c("Output_1", "Output_2", "Output_3") no <- length(outputnames) # Number of Outputs X <- matrix(c(5, 14, 8, 15, 7, 12), nrow = ni, ncol = nd, dimnames = list(inputnames, dmunames)) Y <- matrix(c(9, 4, 16, 5, 7, 10, 4, 9, 13), nrow = no, ncol = nd, dimnames = list(outputnames, dmunames)) datadea <- make_deadata(inputs = X, outputs = Y) covX <- array(0, dim = c(2, 3, 3)) # The 2nd input is stochastic. # Since the corresponding 3x3 covariances matrix is symmetric, only values # above the diagonal are necessary. covX[2, 1, ] <- c(1.4, 0.9, 0.6) covX[2, 2, 2:3] <- c(1.5, 0.7) covX[2, 3, 3] <- 1.2 # Alternatively (note that values below the diagonal are ignored). covX[2, , ] <- matrix(c(1.4, 0.9, 0.6, 0, 1.5, 0.7, 0, 0, 1.2), nrow = 3, byrow = TRUE) datadea_stoch <- make_deadata_stoch(datadea, cov_input = covX) # Example 3. Replication of Program Follow Through data in Land et al. (1993) library(deaR) data("PFT1981") # Selecting DMUs in Program Follow Through (PFT) PFT <- PFT1981[1:49, ] PFT <- make_deadata(PFT, inputs = 2:6, outputs = 7:9) c <- 0.5 var_output <- matrix(c^2, nrow = 3, ncol = 49) PFT_stoch <- make_deadata_stoch(datadea = PFT, var_output = var_output) # Example 4. 5 random observations of 3 DMUs with 2 inputs and 2 outputs. library(deaR) # Generate random observations. input1 <- data.frame(I1D1 = rnorm(5, mean = sample(5:10, 1)), I1D2 = rnorm(5, mean = sample(5:10, 1)), I1D3 = rnorm(5, mean = sample(5:10, 1))) input2 <- data.frame(I2D1 = rnorm(5, mean = sample(5:10, 1)), I2D2 = rnorm(5, mean = sample(5:10, 1)), I2D3 = rnorm(5, mean = sample(5:10, 1))) output1 <- data.frame(O1D1 = rnorm(5, mean = sample(5:10, 1)), O1D2 = rnorm(5, mean = sample(5:10, 1)), O1D3 = rnorm(5, mean = sample(5:10, 1))) output2 <- data.frame(O2D1 = rnorm(5, mean = sample(5:10, 1)), O2D2 = rnorm(5, mean = sample(5:10, 1)), O2D3 = rnorm(5, mean = sample(5:10, 1))) # Generate deadata with means of observations. inputs <- matrix(mapply(mean, cbind(input1, input2)), nrow = 2, ncol = 3, byrow = TRUE, dimnames = list(c("I1", "I2"), c("D1", "D2", "D3"))) outputs <- matrix(mapply(mean, cbind(output1, output2)), nrow = 2, ncol = 3, byrow = TRUE, dimnames = list(c("O1", "O2"), c("D1", "D2", "D3"))) datadea <- make_deadata(inputs = inputs, outputs = outputs) # Generate covariances matrix cov_matrix. cov_matrix <- cov(cbind(input1, input2, output1, output2)) # Generate deadata_stoch datadea_stoch <- make_deadata_stoch(datadea, cov_matrix = cov_matrix)# Example 1 library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs # All variances are 1. var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # All covariances are 1. cov_input <- array(1, dim = c(ni, nd, nd)) cov_output <- array(1, dim = c(no, nd, nd)) data_stoch2 <- make_deadata_stoch(datadea = data_example, cov_input = cov_input, cov_output = cov_output) # Example 2. Deterministic data with one stochastic input. library(deaR) dmunames <- c("A", "B", "C") nd <- length(dmunames) # Number of DMUs inputnames <- c("Input_1", "Input_2") ni <- length(inputnames) # Number of Inputs outputnames <- c("Output_1", "Output_2", "Output_3") no <- length(outputnames) # Number of Outputs X <- matrix(c(5, 14, 8, 15, 7, 12), nrow = ni, ncol = nd, dimnames = list(inputnames, dmunames)) Y <- matrix(c(9, 4, 16, 5, 7, 10, 4, 9, 13), nrow = no, ncol = nd, dimnames = list(outputnames, dmunames)) datadea <- make_deadata(inputs = X, outputs = Y) covX <- array(0, dim = c(2, 3, 3)) # The 2nd input is stochastic. # Since the corresponding 3x3 covariances matrix is symmetric, only values # above the diagonal are necessary. covX[2, 1, ] <- c(1.4, 0.9, 0.6) covX[2, 2, 2:3] <- c(1.5, 0.7) covX[2, 3, 3] <- 1.2 # Alternatively (note that values below the diagonal are ignored). covX[2, , ] <- matrix(c(1.4, 0.9, 0.6, 0, 1.5, 0.7, 0, 0, 1.2), nrow = 3, byrow = TRUE) datadea_stoch <- make_deadata_stoch(datadea, cov_input = covX) # Example 3. Replication of Program Follow Through data in Land et al. (1993) library(deaR) data("PFT1981") # Selecting DMUs in Program Follow Through (PFT) PFT <- PFT1981[1:49, ] PFT <- make_deadata(PFT, inputs = 2:6, outputs = 7:9) c <- 0.5 var_output <- matrix(c^2, nrow = 3, ncol = 49) PFT_stoch <- make_deadata_stoch(datadea = PFT, var_output = var_output) # Example 4. 5 random observations of 3 DMUs with 2 inputs and 2 outputs. library(deaR) # Generate random observations. input1 <- data.frame(I1D1 = rnorm(5, mean = sample(5:10, 1)), I1D2 = rnorm(5, mean = sample(5:10, 1)), I1D3 = rnorm(5, mean = sample(5:10, 1))) input2 <- data.frame(I2D1 = rnorm(5, mean = sample(5:10, 1)), I2D2 = rnorm(5, mean = sample(5:10, 1)), I2D3 = rnorm(5, mean = sample(5:10, 1))) output1 <- data.frame(O1D1 = rnorm(5, mean = sample(5:10, 1)), O1D2 = rnorm(5, mean = sample(5:10, 1)), O1D3 = rnorm(5, mean = sample(5:10, 1))) output2 <- data.frame(O2D1 = rnorm(5, mean = sample(5:10, 1)), O2D2 = rnorm(5, mean = sample(5:10, 1)), O2D3 = rnorm(5, mean = sample(5:10, 1))) # Generate deadata with means of observations. inputs <- matrix(mapply(mean, cbind(input1, input2)), nrow = 2, ncol = 3, byrow = TRUE, dimnames = list(c("I1", "I2"), c("D1", "D2", "D3"))) outputs <- matrix(mapply(mean, cbind(output1, output2)), nrow = 2, ncol = 3, byrow = TRUE, dimnames = list(c("O1", "O2"), c("D1", "D2", "D3"))) datadea <- make_deadata(inputs = inputs, outputs = outputs) # Generate covariances matrix cov_matrix. cov_matrix <- cov(cbind(input1, input2, output1, output2)) # Generate deadata_stoch datadea_stoch <- make_deadata_stoch(datadea, cov_matrix = cov_matrix)
It solves the chance constrained additive E-model based on the deterministic additive model from Charnes et al. (1985), under constant and non-constant returns to scale.
Besides, the user can set weights for the input and/or output slacks. So, it is also possible to solve chance constrained versions of weighted additive models like Measure of Inefficiency Proportions (MIP) or Range Adjusted Measure (RAM), see Cooper et al. (1999).
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values. In general, we denote vectors by bold-face letters and
they are considered as column vectors unless otherwise stated. The -vector
is denoted by and the context determines its dimension.
Given , the program for with
constant returns to scale is given by
where , and are column vectors. Moreover,
are column vectors with the slacks,
and are positive row vectors with the weights
for the slacks.
Different returns to scale can be easily considered by adding the corresponding
constraints: (VRS), (NIRS), (NDRS) or (GRS), with and , where
is a row vector.
The deterministic equivalent for a multivariate normal distribution of inputs/outputs is given by
where is the standard normal distribution, and
modelstoch_additive(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = NULL, weight_slack_i = 1, weight_slack_o = 1, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, returnqp = FALSE, ...)modelstoch_additive(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = NULL, weight_slack_i = 1, weight_slack_o = 1, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, returnqp = FALSE, ...)
datadea |
The data of class |
alpha |
A value for parameter alpha. |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation reference set.
If |
orientation |
This parameter is either |
weight_slack_i |
A value, vector of length |
weight_slack_o |
A value, vector of length |
rts |
A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing), "ndrs" (non-decreasing) or "grs" (generalized). |
L |
Lower bound for the generalized returns to scale (grs). |
U |
Upper bound for the generalized returns to scale (grs). |
solver |
Character string with the name of the solver used by function |
give_X |
Logical. If it is |
n_attempts_max |
A value with the maximum number of attempts if the solver does not converge. Each attempt uses a different initial vector. |
returnqp |
Logical. If it is |
... |
Other parameters, like the initial vector |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
A DMU is -stochastically efficient if and only if the optimal
objective value of the problem, (objval), is zero (or less than zero).
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Charnes, A.; Cooper, W.W.; Golany, B.; Seiford, L.; Stuz, J. (1985) "Foundations of Data Envelopment Analysis for Pareto-Koopmans Efficient Empirical Production Functions", Journal of Econometrics, 30(1-2), 91-107. doi:10.1016/0304-4076(85)90133-2
Cooper, W.W.; Park, K.S.; Pastor, J.T. (1999). "RAM: A Range Adjusted Measure of Inefficiencies for Use with Additive Models, and Relations to Other Models and Measures in DEA". Journal of Productivity Analysis, 11, p. 5-42. doi:10.1023/A:1007701304281
It solves the "max" version of the "almost 100 chance constrained problem from Cooper et al. (1998), under constant and non-constant returns to scale.
Besides, the user can set weights for the input and/or output slacks. So, it is also possible to solve chance constrained versions of weighted additive models like Measure of Inefficiency Proportions (MIP) or Range Adjusted Measure (RAM), see Cooper et al. (1999).
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values. In general, we denote vectors by bold-face letters and
they are considered as column vectors unless otherwise stated. The -vector
is denoted by and the context determines its dimension.
Given and a positive non-Archimedean infinitesimal,
the program for with constant returns to scale is given by
where , and are column vectors. Moreover,
are positive row vectors with the weights
for the slacks.
Different returns to scale can be easily considered by adding the corresponding
constraints: (VRS), (NIRS), (NDRS) or (GRS), with and , where
is a row vector.
The deterministic equivalent for a multivariate normal distribution of inputs/outputs is given by
where is the standard normal distribution, and
such that
with .
modelstoch_additive_p(datadea, alpha = 0.05, epsilon = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = NULL, weight_slack_i = 1, weight_slack_o = 1, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, returnqp = FALSE, ...)modelstoch_additive_p(datadea, alpha = 0.05, epsilon = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = NULL, weight_slack_i = 1, weight_slack_o = 1, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, returnqp = FALSE, ...)
datadea |
The data of class |
alpha |
A value for parameter alpha. |
epsilon |
A value for parameter epsilon. |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation reference set.
If |
orientation |
This parameter is either |
weight_slack_i |
A value, vector of length |
weight_slack_o |
A value, vector of length |
rts |
A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing), "ndrs" (non-decreasing) or "grs" (generalized). |
L |
Lower bound for the generalized returns to scale (grs). |
U |
Upper bound for the generalized returns to scale (grs). |
solver |
Character string with the name of the solver used by function |
give_X |
Logical. If it is |
n_attempts_max |
A value with the maximum number of attempts if the solver does not converge. Each attempt uses a different initial vector. |
returnqp |
Logical. If it is |
... |
Other parameters, like the initial vector |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
The model in this function is the "max" version of the model in Cooper
et al. (1998), in the sense that maximizes the sum of positive slacks like
the conventional additive model in Cooper et al. (1985). Hence, a DMU is
-stochastically efficient if and only if the optimal objective value of
the problem, (objval), is zero (or less than zero).
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Charnes, A.; Cooper, W.W.; Golany, B.; Seiford, L.; Stuz, J. (1985) "Foundations of Data Envelopment Analysis for Pareto-Koopmans Efficient Empirical Production Functions", Journal of Econometrics, 30(1-2), 91-107. doi:10.1016/0304-4076(85)90133-2
Cooper, W.W.; Huang, Z.; Lelas, V.; Li, S.X.; Olesen, O.B. (1998) "Chance Constrained Programming Formulations for Stochastic Characterizations of Efficiency and Dominance in DEA", Journal of Productivity Analysis, 9, 53–79. doi:10.1023/A:1018320430249
Cooper, W.W.; Park, K.S.; Pastor, J.T. (1999). "RAM: A Range Adjusted Measure of Inefficiencies for Use with Additive Models, and Relations to Other Models and Measures in DEA". Journal of Productivity Analysis, 11, p. 5-42. doi:10.1023/A:1007701304281
It solves the chance constrained super-efficiency additive E-model based on the deterministic super-efficiency additive model from Du et al. (2010), under constant and non-constant returns to scale. Besides, the user can set weights for the input and/or output slacks.
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values. In general, we denote vectors by bold-face letters and
they are considered as column vectors unless otherwise stated. The -vector
is denoted by and the context determines its dimension.
Given , the program for with
constant returns to scale is given by
where are the input and output data matrices, respectively,
defined by , ,
and
are
column vectors. Moreover, are column vectors
with the slacks, and are positive row vectors
with the weights for the slacks.
Different returns to scale can be easily considered by adding the corresponding
constraints: (VRS), (NIRS), (NDRS) or (GRS), with and , where
is a row vector.
The deterministic equivalent for a multivariate normal distribution of inputs/outputs is given by
where is the standard normal distribution, and
modelstoch_addsupereff(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = NULL, weight_slack_i = NULL, weight_slack_o = NULL, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), n_attempts_max = 5, compute_target = TRUE, returnqp = FALSE, ...)modelstoch_addsupereff(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = NULL, weight_slack_i = NULL, weight_slack_o = NULL, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), n_attempts_max = 5, compute_target = TRUE, returnqp = FALSE, ...)
datadea |
The data of class |
alpha |
A value for parameter alpha. |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation reference set.
If |
orientation |
This parameter is either |
weight_slack_i |
A value, vector of length |
weight_slack_o |
A value, vector of length |
rts |
A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing), "ndrs" (non-decreasing) or "grs" (generalized). |
L |
Lower bound for the generalized returns to scale (grs). |
U |
Upper bound for the generalized returns to scale (grs). |
solver |
Character string with the name of the solver used by function |
n_attempts_max |
A value with the maximum number of attempts if the solver does not converge. Each attempt uses a different initial vector. |
compute_target |
Logical. If it is |
returnqp |
Logical. If it is |
... |
Other parameters, like the initial vector |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
A DMU is -stochastically efficient if and only if the optimal
objective value of the problem, (objval), is zero (or less than zero).
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Du, J.; Liang, L.; Zhu, J. (2010). "A Slacks-based Measure of Super-efficiency in Data Envelopment Analysis. A Comment", European Journal of Operational Research, 204, 694-697. doi:10.1016/j.ejor.2009.12.007
It solves chance constrained directional models with stochastic directions, under constant, variable, non-increasing, non-decreasing or generalized returns to scale. Inputs and outputs must follow a multivariate normal distribution. By default, models are solved in a two-stage process (slacks are maximized).
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values. In general, we denote vectors by bold-face letters and
they are considered as column vectors unless otherwise stated. The -vector
is denoted by and the context determines its dimension.
Given , the first stage program for with
constant returns to scale is given by
where , and are column vectors,
, (with identity matrices), and , are diagonal matrices
with orientation parameters .
Different returns to scale can be easily considered by adding the corresponding
constraints: (VRS), (NIRS), (NDRS) or (GRS), with and , where
is a row vector.
The corresponding second stage program is given by
where is the optimal objective function of the first stage
program, are column vectors with the slacks,
and are positive row vectors with the weights
for the slacks.
The deterministic equivalents for a multivariate normal distribution of inputs/outputs are given by
and for the second stage,
where is the standard normal distribution, and
modelstoch_dir(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, d_input = 1, d_output = 1, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, maxslack = FALSE, weight_slack_i = 1, weight_slack_o = 1, compute_target = TRUE, returnqp = FALSE, silent_ud = FALSE, ...)modelstoch_dir(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, d_input = 1, d_output = 1, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, maxslack = FALSE, weight_slack_i = 1, weight_slack_o = 1, compute_target = TRUE, returnqp = FALSE, silent_ud = FALSE, ...)
datadea |
The data of class |
alpha |
A value for parameter alpha. |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation
reference set.
If |
d_input |
A value, vector of length |
d_output |
A value, vector of length |
rts |
A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing), "ndrs" (non-decreasing) or "grs" (generalized). |
L |
Lower bound for the generalized returns to scale (grs). |
U |
Upper bound for the generalized returns to scale (grs). |
solver |
Character string with the name of the solver used by function |
give_X |
Logical. If it is |
n_attempts_max |
A value with the maximum number of attempts if the solver does not converge. Each attempt uses a different initial vector. |
maxslack |
Logical. If it is |
weight_slack_i |
A value, vector of length |
weight_slack_o |
A value, vector of length |
compute_target |
Logical. If it is |
returnqp |
Logical. If it is |
silent_ud |
Logical, to avoid warnings related with undesirable variables. |
... |
Other parameters, like the initial vector |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Bolós, V.J.; Benítez, R.; Coll-Serrano, V. (2024). “Chance constrained directional models in stochastic data envelopment analysis", Operations Research Perspectives, 12, 100307.. doi:10.1016/j.orp.2024.100307
# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstochdir <- modelstoch_dir(data_stoch, dmu_eval = 6) efficiencies(Collstochdir)# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstochdir <- modelstoch_dir(data_stoch, dmu_eval = 6) efficiencies(Collstochdir)
It solves chance constrained directional models with deterministic directions, under constant, variable, non-increasing, non-decreasing or generalized returns to scale. Inputs and outputs must follow a multivariate normal distribution. By default, models are solved in a two-stage process (slacks are maximized).
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values. In general, we denote vectors by bold-face letters and
they are considered as column vectors unless otherwise stated. The -vector
is denoted by and the context determines its dimension.
Given , the first stage program for with
constant returns to scale is given by
where , and are column vectors, and
is a preassigned direction
(with and
non-negative column vectors).
Different returns to scale can be easily considered by adding the corresponding
constraints: (VRS), (NIRS), (NDRS) or (GRS), with and , where
is a row vector.
The corresponding second stage program is given by
where is the optimal objective function of the first stage
program, are column vectors with the slacks,
and are positive row vectors with the weights
for the slacks.
The deterministic equivalents for a multivariate normal distribution of inputs/outputs are given by
and for the second stage,
where is the standard normal distribution, and
modelstoch_dir_dd(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, dir_input = NULL, dir_output = NULL, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, maxslack = FALSE, weight_slack_i = 1, weight_slack_o = 1, compute_target = TRUE, returnqp = FALSE, silent_ud = FALSE, ...)modelstoch_dir_dd(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, dir_input = NULL, dir_output = NULL, rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, maxslack = FALSE, weight_slack_i = 1, weight_slack_o = 1, compute_target = TRUE, returnqp = FALSE, silent_ud = FALSE, ...)
datadea |
The data of class |
alpha |
A value for parameter alpha. |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation
reference set.
If |
dir_input |
A value, vector of length |
dir_output |
A value, vector of length |
rts |
A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing), "ndrs" (non-decreasing) or "grs" (generalized). |
L |
Lower bound for the generalized returns to scale (grs). |
U |
Upper bound for the generalized returns to scale (grs). |
solver |
Character string with the name of the solver used by function |
give_X |
Logical. If it is |
n_attempts_max |
A value with the maximum number of attempts if the solver does not converge. Each attempt uses a different initial vector. |
maxslack |
Logical. If it is |
weight_slack_i |
A value, vector of length |
weight_slack_o |
A value, vector of length |
compute_target |
Logical. If it is |
returnqp |
Logical. If it is |
silent_ud |
Logical, to avoid warnings related with undesirable variables. |
... |
Other parameters, like the initial vector |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Bolós, V.J.; Benítez, R.; Coll-Serrano, V. (2024). “Chance constrained directional models in stochastic data envelopment analysis", Operations Research Perspectives, 12, 100307.. doi:10.1016/j.orp.2024.100307
# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstochdirdd <- modelstoch_dir_dd(data_stoch, dmu_eval = 6) efficiencies(Collstochdirdd)# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstochdirdd <- modelstoch_dir_dd(data_stoch, dmu_eval = 6) efficiencies(Collstochdirdd)
It solves input and output oriented chance constrained radial DEA models under constant (CCR model), variable (BCC model), non-increasing, non-decreasing or generalized returns to scale, based on the model in Cooper et al. (2002). By default, models are solved in a two-stage process (slacks are maximized).
We consider
a set of DMUs with stochastic inputs and stochastic outputs.
Matrices and
are the input and output data matrices, respectively, where
and represent the -th input and -th output
of the -th DMU. Moreover, we denote by and
their expected values. In general, we denote vectors by bold-face letters and
they are considered as column vectors unless otherwise stated. The -vector
is denoted by and the context determines its dimension.
Given , the first stage program for with
constant returns to scale is given by
where , and are column vectors.
Different returns to scale can be easily considered by adding the corresponding
constraints: (VRS), (NIRS), (NDRS) or (GRS), with and , where
is a row vector.
The corresponding second stage program is given by
where is the optimal objective function of the first stage
program, are column vectors with the slacks,
and are positive row vectors with the weights
for the slacks.
The deterministic equivalents for a multivariate normal distribution of inputs/outputs are given by
and for the second stage,
where is the standard normal distribution, and
modelstoch_radial(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = c("io", "oo"), rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, maxslack = FALSE, weight_slack_i = 1, weight_slack_o = 1, vtrans_i = NULL, vtrans_o = NULL, compute_target = TRUE, returnqp = FALSE, silent_ud = FALSE, ...)modelstoch_radial(datadea, alpha = 0.05, dmu_eval = NULL, dmu_ref = NULL, orientation = c("io", "oo"), rts = c("crs", "vrs", "nirs", "ndrs", "grs"), L = 1, U = 1, solver = c("alabama", "cccp", "cccp2", "slsqp"), give_X = TRUE, n_attempts_max = 5, maxslack = FALSE, weight_slack_i = 1, weight_slack_o = 1, vtrans_i = NULL, vtrans_o = NULL, compute_target = TRUE, returnqp = FALSE, silent_ud = FALSE, ...)
datadea |
The data of class |
alpha |
A value for parameter alpha. |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation
reference set.
If |
orientation |
A string, equal to "io" (input oriented) or "oo" (output oriented). |
rts |
A string, determining the type of returns to scale, equal to "crs" (constant), "vrs" (variable), "nirs" (non-increasing), "ndrs" (non-decreasing) or "grs" (generalized). |
L |
Lower bound for the generalized returns to scale (grs). |
U |
Upper bound for the generalized returns to scale (grs). |
solver |
Character string with the name of the solver used by function |
give_X |
Logical. If it is |
n_attempts_max |
A value with the maximum number of attempts if the solver does not converge. Each attempt uses a different initial vector. |
maxslack |
Logical. If it is |
weight_slack_i |
A value, vector of length |
weight_slack_o |
A value, vector of length |
vtrans_i |
Numeric vector of translation for undesirable inputs.
If |
vtrans_o |
Numeric vector of translation for undesirable outputs,
analogous to |
compute_target |
Logical. If it is |
returnqp |
Logical. If it is |
silent_ud |
Logical, to avoid warnings related with undesirable variables. |
... |
Other parameters, like the initial vector |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Cooper, W.W.; Deng, H.; Huang, Z.; Li, S.X. (2002). “Chance constrained programming approaches to technical efficiencies and inefficiencies in stochastic data envelopment analysis", Journal of the Operational Research Society, 53:12, 1347-1356. doi:10.1057/palgrave.jors.2601433
Land, K.C; Lovell, C.A.K.; Thore, S. (1993). "Chance-constrained data envelopment analysis", Managerial and Decision Economics, Vol. 14, No. 6, 541-554.
# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstoch <- modelstoch_radial(data_stoch, dmu_eval = 6) efficiencies(Collstoch) # Example 2. Deterministic data with one stochastic input. library(deaR) dmunames <- c("A", "B", "C") nd <- length(dmunames) # Number of DMUs inputnames <- c("Input_1", "Input_2") ni <- length(inputnames) # Number of Inputs outputnames <- c("Output_1", "Output_2", "Output_3") no <- length(outputnames) # Number of Outputs X <- matrix(c(5, 14, 8, 15, 7, 12), nrow = ni, ncol = nd, dimnames = list(inputnames, dmunames)) Y <- matrix(c(9, 4, 16, 5, 7, 10, 4, 9, 13), nrow = no, ncol = nd, dimnames = list(outputnames, dmunames)) datadea <- make_deadata(inputs = X, outputs = Y) covX <- array(0, dim = c(2, 3, 3)) # The 2nd input is stochastic. # Since the corresponding 3x3 covariances matrix is symmetric, only values # above the diagonal are necessary. covX[2, 1, ] <- c(1.4, 0.9, 0.6) covX[2, 2, 2:3] <- c(1.5, 0.7) covX[2, 3, 3] <- 1.2 # Alternatively (note that values below the diagonal are ignored). covX[2, , ] <- matrix(c(1.4, 0.9, 0.6, 0, 1.5, 0.7, 0, 0, 1.2), nrow = 3, byrow = TRUE) datadea_stoch <- make_deadata_stoch(datadea, cov_input = covX) alpha <- 0.025 res <- modelstoch_radial(datadea_stoch, alpha = alpha, rts = "vrs") efficiencies(res) # Example 3. Replication of results in Land et al. (1993) library(deaR) data("PFT1981") # Selecting DMUs in Program Follow Through (PFT) PFT <- PFT1981[1:49, ] PFT <- make_deadata(PFT, inputs = 2:6, outputs = 7:9) c <- 0.5 var_output <- matrix(c^2, nrow = 3, ncol = 49) PFT_stoch <- make_deadata_stoch(datadea = PFT, var_output = var_output) # Evaluate the second DMU res <- modelstoch_radial(PFT_stoch, dmu_eval = 2) efficiencies(res)# Example 1. library(deaR) data("Coll_Blasco_2006") ni <- 2 # number of inputs no <- 2 # number of outputs data_example <- make_deadata(datadea = Coll_Blasco_2006, ni = ni, no = no) nd <- length(data_example$dmunames) # number of DMUs var_input <- matrix(1, nrow = ni, ncol = nd) var_output <- matrix(1, nrow = no, ncol = nd) data_stoch <- make_deadata_stoch(datadea = data_example, var_input = var_input, var_output = var_output) # Evaluate the sixth DMU Collstoch <- modelstoch_radial(data_stoch, dmu_eval = 6) efficiencies(Collstoch) # Example 2. Deterministic data with one stochastic input. library(deaR) dmunames <- c("A", "B", "C") nd <- length(dmunames) # Number of DMUs inputnames <- c("Input_1", "Input_2") ni <- length(inputnames) # Number of Inputs outputnames <- c("Output_1", "Output_2", "Output_3") no <- length(outputnames) # Number of Outputs X <- matrix(c(5, 14, 8, 15, 7, 12), nrow = ni, ncol = nd, dimnames = list(inputnames, dmunames)) Y <- matrix(c(9, 4, 16, 5, 7, 10, 4, 9, 13), nrow = no, ncol = nd, dimnames = list(outputnames, dmunames)) datadea <- make_deadata(inputs = X, outputs = Y) covX <- array(0, dim = c(2, 3, 3)) # The 2nd input is stochastic. # Since the corresponding 3x3 covariances matrix is symmetric, only values # above the diagonal are necessary. covX[2, 1, ] <- c(1.4, 0.9, 0.6) covX[2, 2, 2:3] <- c(1.5, 0.7) covX[2, 3, 3] <- 1.2 # Alternatively (note that values below the diagonal are ignored). covX[2, , ] <- matrix(c(1.4, 0.9, 0.6, 0, 1.5, 0.7, 0, 0, 1.2), nrow = 3, byrow = TRUE) datadea_stoch <- make_deadata_stoch(datadea, cov_input = covX) alpha <- 0.025 res <- modelstoch_radial(datadea_stoch, alpha = alpha, rts = "vrs") efficiencies(res) # Example 3. Replication of results in Land et al. (1993) library(deaR) data("PFT1981") # Selecting DMUs in Program Follow Through (PFT) PFT <- PFT1981[1:49, ] PFT <- make_deadata(PFT, inputs = 2:6, outputs = 7:9) c <- 0.5 var_output <- matrix(c^2, nrow = 3, ncol = 49) PFT_stoch <- make_deadata_stoch(datadea = PFT, var_output = var_output) # Evaluate the second DMU res <- modelstoch_radial(PFT_stoch, dmu_eval = 2) efficiencies(res)
Solve chance constrained radial super-efficiency DEA models, based on the
Cooper et al. (2002) chance constrained radial efficiency models. Analogously to the deterministic case,
it removes the evaluated DMU from the set of reference DMUs dmu_ref
with respect to which it is evaluated.
modelstoch_radial_supereff(datadea, dmu_eval = NULL, dmu_ref = NULL, ...)modelstoch_radial_supereff(datadea, dmu_eval = NULL, dmu_ref = NULL, ...)
datadea |
The data of class |
dmu_eval |
A numeric vector containing which DMUs have to be evaluated.
If |
dmu_ref |
A numeric vector containing which DMUs are the evaluation reference set.
If |
... |
Model parameters like |
A list with the results for the evaluated DMUs and other parameters for reproducibility.
Radial super-efficiency chance constrained model under non constant (vrs, nirs, ndrs, grs) returns to scale can be unfeasible for certain DMUs.
Vicente Bolós ([email protected]). Department of Business Mathematics
Rafael Benítez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Cooper, W.W.; Deng, H.; Huang, Z.; Li, S.X. (2002). “Chance constrained programming approaches to technical efficiencies and inefficiencies in stochastic data envelopment analysis", Journal of the Operational Research Society, 53:12, 1347-1356.
Data of textile industries collected from the Statistical Year Book of China of the Chinese Bureau of Statistics. Each year is treated as a DMU.
data("Textile")data("Textile")
Data frame with 17 rows and 4 columns. Definition of inputs (X) and output (Y):
Expressed in units of 1000 persons.
Stated in units of 1 million Ren Min Bi (Chinese monetary unit) adjusted to 1991 prices.
Stated in units of 1 million Ren Min Bi (Chinese monetary unit) adjusted to 1991 prices.
Vicente Bolos ([email protected]). Department of Business Mathematics
Rafael Benitez ([email protected]). Department of Business Mathematics
Vicente Coll-Serrano ([email protected]). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
University of Valencia (Spain)
Cooper, W.W.; Denga, H.; Gua, B.; Lib, S.; Thrall, R.M. (2001). "Using DEA to improve the management of congestion in Chinese industries (1981-1997)", Socio-Economic Planning Sciences, 35(4), 227-242.
make_deadata_stoch, modelstoch_radial