make_deadata | R Documentation |
This function creates, from a data frame, a deadata
structure,
which is as list with fields input
, output
, dmunames
,
nc_inputs
, nc_outputs
, nd_inputs
, nd_outputs
.
make_deadata(datadea = NULL,
ni = NULL,
no = NULL,
dmus = 1,
inputs = NULL,
outputs = NULL,
nc_inputs = NULL,
nc_outputs = NULL,
nd_inputs = NULL,
nd_outputs = NULL,
ud_inputs = NULL,
ud_outputs = NULL)
datadea |
Data frame with DEA data. |
ni |
Number of inputs, if inputs are in columns 2:( |
no |
Number of outputs, if outputs are in columns ( |
dmus |
Column (number or name) of DMUs (optional). By default, it is the
first column. If there is not any DMU column, then it must be |
inputs |
Columns (numbers or names) of inputs (optional). It prevails over |
outputs |
Columns (numbers or names) of outputs (optional). It prevails over |
nc_inputs |
A numeric vector containing the indices of non-controllable inputs. |
nc_outputs |
A numeric vector containing the indices of non-controllable outputs. |
nd_inputs |
A numeric vector containing the indices of non-discretionary inputs. |
nd_outputs |
A numeric vector containing the indices of non-discretionary outputs. |
ud_inputs |
A numeric vector containing the indices of undesirable (good) inputs. |
ud_outputs |
A numeric vector containing the indices of undesirable (bad) outputs. |
An object of class deadata
Vicente Coll-Serrano (vicente.coll@uv.es). Quantitative Methods for Measuring Culture (MC2). Applied Economics.
Vicente Bolós (vicente.bolos@uv.es). Department of Business Mathematics
Rafael Benítez (rafael.suarez@uv.es). Department of Business Mathematics
University of Valencia (Spain)
data("Coll_Blasco_2006")
data_example <- make_deadata(datadea = Coll_Blasco_2006,
ni = 2,
no = 2)
# This is the same as:
data_example <- make_deadata(Coll_Blasco_2006,
inputs = 2:3,
outputs = 4:5)
# And the same as:
dmunames <- c("A", "B", "C", "D", "E", "F")
nd <- length(dmunames) # Number of DMUs
inputnames <- c("Employees", "Capital")
ni <- length(inputnames) # Number of Inputs
outputnames <- c("Vehicles", "Orders")
no <- length(outputnames) # Number of Outputs
inputs <- matrix(c(8, 8, 11, 15, 14, 12, 12, 13, 11, 18, 18, 20),
nrow = ni, ncol = nd, dimnames = list(inputnames, dmunames))
outputs <- matrix(c(14, 20, 25, 42, 8, 30, 25, 8, 40, 22, 24, 30),
nrow = no, ncol = nd, dimnames = list(outputnames, dmunames))
data_example <- make_deadata(inputs = inputs,
outputs = outputs)
# If the first input is a non-controllable input:
data_example <- make_deadata(Coll_Blasco_2006,
inputs = 2:3,
outputs = 4:5,
nc_inputs = 1)
# If the second output is a non-discretionary output:
data_example <- make_deadata(Coll_Blasco_2006,
inputs = 2:3,
outputs = 4:5,
nd_outputs = 2)
# If the second input is a non-discretionary input and the second output is an undesirable:
data_example <- make_deadata(Coll_Blasco_2006,
inputs = 2:3,
outputs = 4:5,
nd_inputs = 2,
ud_outputs = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.