make_deadata_fuzzy {deaR}R Documentation

make_deadata_fuzzy

Description

This function creates, from a data frame, a deadata_fuzzy structure, which is as list with fields input, output and dmunames. At the same time, input and output are lists with fields mL, mR, dL and dR.

Figure: fuzzynumbers.jpg

Usage

make_deadata_fuzzy(datadea,
                dmus = 1,
                inputs.mL = NULL,
                inputs.mR = NULL,
                inputs.dL = NULL,
                inputs.dR = NULL,
                outputs.mL = NULL,
                outputs.mR = NULL,
                outputs.dL = NULL,
                outputs.dR = NULL,
                nc_inputs = NULL,
                nc_outputs = NULL,
                nd_inputs = NULL,
                nd_outputs = NULL,
                ud_inputs = NULL,
                ud_outputs = NULL)

Arguments

datadea

Data frame with DEA data.

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 NULL.

inputs.mL

Where are (columns) the mL (left centers) of trapezoidal fuzzy inputs in datadea. If an input is triangular or crisp, we put the column where the centers or the crisp values are, respectively.

Alternatively to datadea, inputs.mL can be a matrix of size (number of inputs x number of DMUs) with the mL of trapezoidal fuzzy inputs, the centers of triangular inputs, and the crisp values of crisp inputs. In this case, DMUs names are taken from the columns names.

inputs.mR

Where are (columns) the mR (right centers) of trapezoidal fuzzy inputs in datadea. If an input is triangular or crisp, we put NA.

Alternatively to datadea, inputs.mR can be a matrix of size (number of inputs x number of DMUs) with the mR of trapezoidal fuzzy inputs, the centers of triangular inputs, and the crisp values of crisp inputs. If all inputs are triangular or crisp, then inputs.mR must be NULL (default) or equal to inputs.mL.

inputs.dL

Where are (columns) the dL (left radii) of trapezoidal and triangular fuzzy inputs in datadea. If an input is symmetric, we put the column where the radii are. If an input is rectangular or crisp, we put NA.

Alternatively to datadea, inputs.dL can be a matrix of size (number of inputs x number of DMUs) with the dL of trapezoidal and triangular fuzzy inputs. If an input is rectangular or crisp, its radius is zero. If all inputs are rectangular or crisp, then inputs.dL must be NULL (default) or a zero matrix.

inputs.dR

Where are (columns) the dR (right radii) of trapezoidal and triangular fuzzy inputs in datadea. If an input is symmetric, rectangular or crisp, we put NA.

Alternatively to datadea, inputs.dR can be a matrix of size (number of inputs x number of DMUs) with the dR of trapezoidal and triangular fuzzy inputs. If an input is rectangular or crisp, its radius is zero. If all inputs are symmetric, rectangular or crisp, then inputs.dR must be NULL (default) or equal to inputs.dL.

outputs.mL

Analogous to inputs.mL, but relating to outputs.

outputs.mR

Analogous to inputs.mR, but relating to outputs.

outputs.dL

Analogous to inputs.dL, but relating to outputs.

outputs.dR

Analogous to inputs.dR, but relating to outputs.

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.

Value

An object of class deadata_fuzzy.

Examples

# Example 1. If inputs and/or outputs are symmetric triangular fuzzy numbers
data("Leon2003")
data_example <- make_deadata_fuzzy(datadea = Leon2003, 
                                   inputs.mL = 2,
                                   inputs.dL = 3,
                                   outputs.mL = 4,
                                   outputs.dL = 5)
# Example 2. If inputs and/or outputs are non-symmetric triangular fuzzy numbers
data("Kao_Liu_2003")
data_example <- make_deadata_fuzzy(Kao_Liu_2003, 
                                   inputs.mL = 2, 
                                   outputs.mL = 3:7, 
                                   outputs.dL = c(NA, NA, 8, NA, 10),
                                   outputs.dR = c(NA, NA, 9, NA, 11))
                                

[Package deaR version 1.4.1 Index]