`BDisposal.dmuEfficiency`

— Method` dmuEfficiency(I₀,O₀,I,O)`

Compute the efficiency score for a DMU using vanilla Data Envelope Analysis.

**Parameters:**

`I₀`

: This DMU inputs (nI)`O₀`

: This DMU outputs (n0)`I`

: All DMUs inputs (nDMU x nI)`O`

: All DMUs outputs (nDMU x n0)

**Returns:**

- A named tuple with:
`computed`

: a boolean to indicase wheter the underlying optimisation succeeded`eff`

: a boolean to indicate if the DMU is efficient or not`obj`

: a scalar representing the efficiency score of the DMU`wI`

: a vector of the optimal input weights`wO`

: a vector of the optimal output weights`refSet`

: a dictionary having as key the numeral of the reference DMUs and

`BDisposal.dmuEfficiencyDual`

— Method` dmuEfficiencyDual(I₀,O₀,I,O)`

Compute the efficiency score for a DMU using vanilla Data Envelope Analysis in the dual representation using the two pass method.

**Parameters:**

`I₀`

: This DMU inputs (nI)`O₀`

: This DMU outputs (n0)`I`

: All DMUs inputs (nDMU x nI)`O`

: All DMUs outputs (nDMU x n0)

**Returns:**

- A named tuple with:
`computed`

: a boolean to indicase wheter the underlying optimisation succeeded`eff`

: a boolean to indicate if the DMU is efficient or not`obj`

: a scalar representing the efficiency score of the DMU`λ`

`θ`

`dualsI`

`dualsO`

`s⁻`

`s⁺`

`BDisposal.efficiencyScores`

— Method`efficiencyScores(gI,gO,bO,bI;retToScale,prodStructure,dirGI,dirBI,dirGO,dirBO,startθ,startμ,startλ)`

Compute efficiency indicators and convexity test results considering the joined production of good and bad outputs.

Given a set of measures of inputs, "good" ("desiderable") and "bad" ("undesiderable") outputs for different decision making units, compute their distance to the production frontier, i.e. their degree of efficiency.

**Parameters:**

- Positional
`gI`

: "Good" inputs (3D matrix by DMUs, input items and periods)`gO`

: "Good" outputs (3D matrix by DMUs, input items and periods)`bO`

: "Bad" outputs (3D matrix by DMUs, input items and periods)`bI`

: "Bad" inputs (optional 3D matrix by DMUs, input items and periods) [default: empty array]

- Keyword
`retToScale`

: Wheter the returns to scale should be assumed "constant" or "variable" (default). Non-convex distance and test is computed only under the "variable" assumption, except for the`(0,0,1,-1)`

distance under multiplicative production function`prodStructure`

: Wheter the production structure should be assumed "additive" (default) or "multiplicative"`dirGI`

,`dirBI`

,`dirGO`

,`dirBO`

: The directions toward where to measure the efficiency (see notes) [default:`(0,0,1,0)`

]`startθ`

,`startμ`

,`startλ`

: Initial values in the convex optimisation problem [default:`(0,0,1.1)`

]

**Returns:**

- A named tuple with the following items:
`λs`

: The efficiency indicators coherent with the convexity test (2D matrix by DMUs and periods)`λs_convex`

: The efficiency indicators assuming a convex production frontier (2D matrix by DMUs and periods)`λs_nonconvex`

: The efficiency indicators assuming a non-convex production frontier (2D matrix by DMUs and periods)`nonConvTest`

: The result of the non-convexity test (2D matrix of boolean by DMUs and periods). Note that "true" here refers to non-convex.`nonConvTest_value`

: The value of the non-convexity test (2D matrix by DMUs and periods)

**Description of the function**

`efficiencyScores`

defines environmental efficiency indicators for a set of Decision Making Units (ie., observations). The nature of the DMUs (eg. firms, countries etc.) depends on the aim of the environmental efficiency analysis.

All the DMUs are characterized by a set of inputs and outputs separated into undesirable (eg., polluting) and desirable (eg., no polluting) ones. Note that, inputs separation into desirable (eg., non emissions-causing) and undesirable (eg., emissions-causing) components is optional for the BDisposal package.

The BDisposal DEA modelling defines the smallest environmental production process that contains all DMUs informations (inputs/outputs) and satisfies the B-disposal axiomatic pattern.

The BDisposal algorithms for efficiency assessment compute the distance to the best environmental production procedures; ie., to the efficient production frontier. These efficiency indices inherit the structure of additive and multiplicative distance functions.

Notice that the BDisposal package computes general shape of additive and multiplicative distance functions. It follows that, the Bdisposal package introduces a flexible framework for environmental efficiency assessment, with the possibility to analyse different directions for the distance functions. In addition, the BDisposal package allows to test the (economists’) properties of convexity and disposability.

**Interpretation of the results**

**Efficiency indicators**

When the additive shape of the distance function is greater than 0 then, the production unit doesn’t operate efficiently. If the additive efficiency score is equal to 0 then, the DMU is efficient. It follows that, the DMU employs one of the best production technology to transform inputs into outputs; ie., the producer is a benchmark for the other observations. A similar reasoning holds for the multiplicative distance functions.

If the multiplicative efficiency index is greater than 1 then, the DMU doesn’t perform efficiently. When the multiplicative efficiency score is equal to 1 then, the production unit is a benchmark for the other observations.

**Convexity test**

When the multiplicative test of convexity is greater than 1 (respectively, equal to 1) then, the production process frontier is non convex (respectively, convex). If the multiplicative test of disposability is greater than 1 (respectively, equal to 1) then, the frontier of the production set displays B-disposability; ie., there exists costs for undesirable component decrease. A similar reasoning applies for the additive framework.

The informations provided by these tests define the shape of the production process boundaries.

**Notes:**

- Directions toward where to measure the efficiency distance can be tuned using the
`dirGI`

,`dirBI`

,`dirGO`

and`dirBO`

parameters. - The following directions are supported:
- multiplicative pr. struct.: (-1,0,0,0), (0,-1,0,0), (0,0,1,0), (0,0,0,-1) or (0,0,1,-1)
- addittive pr. struct.: (1,0,0,0), (0,1,0,0), (0,0,1,0) or (0,0,0,1)

`startθ`

,`startμ`

,`startλ`

can be attempted)

`BDisposal.prodIndex`

— Method`prodIndex(gI,gO,bO,bI;retToScale,prodStructure,convexAssumption,startθ,startμ,startλ)`

Compute productivity indexes

Given a set of measures of inputs, "good" ("desiderable") and "bad" ("undesiderable") outputs for different decision making units, compute their productivity indexes improvements (or declines) between consecutive time periods.

**Parameters:**

- Positional
`gI`

: "Good" inputs (3D array by DMUs, input items and periods)`gO`

: "Good" outputs (3D array by DMUs, input items and periods)`bO`

: "Bad" outputs (3D array by DMUs, input items and periods)`bI`

: "Bad" inputs (optional 3D array by DMUs, input items and periods) [default: empty array]

- Keyword
`retToScale`

: Wheter the return to scales should be assumed "constant" (default) or "variable"`prodStructure`

: Wheter the production structure should be assumed "additive" (default) or "multiplicative"`convexAssumption`

: Wheter a convex production frontier should be assumed [default:`true`

]

**Returns:**

- A named touple where each element is a matrix of production indexes by DMUs and period passages (e.g. "year2 on year1" and "year3 on year2") or one of their decompositions.
- Currently the value reported are:
`prodIndexes`

: Overall production indexes`prodIndexes_G`

: Decomposition for "good" inputs and outputs`prodIndexes_B`

: Decomposition for "bad" inputs and outputs`prodIndexes_T`

: Decomposition for the technological component, overall`prodIndexes_T_O`

: Decomposition for the technological component, outputs`prodIndexes_T_G_O`

: Decomposition for the technological component, good outputs`prodIndexes_T_B_O`

: Decomposition for the technological component, bad outputs`prodIndexes_T_I`

: Decomposition for the technological component, inputs`prodIndexes_T_G_I`

: Decomposition for the technological component, good inputs`prodIndexes_T_B_I`

: Decomposition for the technological component, bad inputs`prodIndexes_E`

: Decomposition for the efficiency component, overall`prodIndexes_E_O`

: Decomposition for the efficiency component, outputs`prodIndexes_E_G_O`

: Decomposition for the efficiency component, good output`prodIndexes_E_B_O`

: Decomposition for the efficiency component, bad outputs`prodIndexes_E_I`

: Decomposition for the efficiency component, inputs`prodIndexes_E_G_I`

: Decomposition for the efficiency component, good inputs`prodIndexes_E_B_I`

: Decomposition for the efficiency component, bad inputs`prodIndexes_S`

: Decomposition for the scale (residual) component, overall`prodIndexes_S_O`

: Decomposition for the scale (residual) component, outputs`prodIndexes_S_G_O`

: Decomposition for the scale (residual) component, good output`prodIndexes_S_B_O`

: Decomposition for the scale (residual) component, bad outputs`prodIndexes_S_I`

: Decomposition for the scale (residual) component, inputs`prodIndexes_S_G_I`

: Decomposition for the scale (residual) component, good inputs`prodIndexes_S_B_I`

: Decomposition for the scale (residual) component, bad inputs

The second and third element of the tuple are respectively the "good inputs/outputs" and "bad/inputs/outputs" components.

The first matrix can be retrieved from the two components by multiplying them (for `multiplicative`

production structure) or summing them (for `additive`

production strucure).

**Description of the function**

`prodIndex()`

displays environmental productivity indices. These productivity measures are implemented for different time periods (eg., years, months etc.) or spatial units (eg., countries, cities etc.), based on the environmental efficiency indicators described in `efficiencyScores`

. Hence, the environmental productivity indices inherit the structure of additive and multiplicative productivity measures.

**Interpretation of the results**

The additive productivity indicator shows combined desirable and undesirable outputs productivity improvement (respectively decline) when it takes positive (respectively negative) values.

In the multiplicative context, if the productivity measure is greater (respectively lesser) than 1 then, desirable and undesirable outputs productivity increase (respectively decrease) arises. The BDisposal package underscores the prominent sources of environmental productivity change. The main drivers of productivity variation are technological change, technical efficiency variation and scale efficiency change. For the additive background, when the technological change is greater (respectively, lesser) than 0 then, technological improvement (respectively, deterioration) occurs. A similar reasoning applies for the additive technical and scale efficiency components.

In the multiplicative context, if the technological change is greater (respectively, lesser) than 1 then, technological increase (respectively, decrrease) arises. A similar reasonnng applies for the multiplicative technical and scale efficiency components.

**Example:**

```
julia> using BDisposal
julia> # 2 DMUs, 2 good Inputs, 2 bad inputs, 3 good outputs and 2 bad outputs. 2 periods
gI = [1; 3; 5;; 2; 4; 5;;; 1; 4; 5;; 2; 5; 5];
julia> bI = [2; 4; 2;; 3; 7; 5;;; 2; 3; 2;; 3; 6; 5];
julia> gO = [10; 30; 50;; 20; 40; 50;; 15; 8; 12;;; 12; 40; 50;; 22; 50; 50;; 16; 55; 55];
julia> bO = [2; 4; 2;; 3; 7; 5;;; 2; 3; 2;; 3; 6; 5];
julia> analysis = prodIndex(gI,gO,bO,bI,retToScale="variable",convexAssumption=false);
julia> analysis.prodIndexes
3×1 Matrix{Union{Missing, Float64}}:
1.131370849898476
3.5322587464470736
2.140872096444188
```

**Notes:**

- The decomposition by technological, efficiency and scale components is done only for the convex assumption,

as in the non-convex case the individual distance components used to compute these disaggregations are infinite.

`BDisposal.prodIndexFB`

— Method`prodIndexFB(gI,gO,bO,bI;remarcable_obs_dmu,remarcable_obs_period)`

Compute productivity indexes with a fixed base.

Given a set of measures of inputs, "good" ("desiderable") and "bad" ("undesiderable") outputs for different decision making units, and a specific dmu/time observation to consider as base ("remarcable"), provides the productivity indexes at various time periods.

**Parameters:**

- Positional
`gI`

: "Good" inputs (3D array by DMUs, input items and periods)`gO`

: "Good" outputs (3D array by DMUs, input items and periods)`bO`

: "Bad" outputs (3D array by DMUs, input items and periods)`bI`

: "Bad" inputs (optional 3D array by DMUs, input items and periods) [default: empty array]

- Keyword
`remarcable_obs_dmu`

: Which observation to consider the "remarcable" one [def:`1`

]`remarcable_obs_period`

: Which tipe period to consider the "remarcable" one [def:`1`

`]

**Returns:**

- A named touple where each element is a matrix of base-related production indexes by DMUs and time periods.
- Currently the value reported are:
`prodIndexes`

: Overall production indexes

**Description of the function**

`prodIndexFB`

is a fixed base version of the multiplicative `prodIndex`

function. As a result, `prodIndexFB`

is based upon the identification of a fixed base observation allowing to compare spatial and/or temporal observations. Specifically, the choice of the base observation for comparisons is affected by the identification of remarkable spatial and/or temporal units.

**Interpretation of the results**

`prodIndexFB`

> 1 indicates environmentally-adjusted performance improvement. In such case, the remarkable observation produces more good outputs and less bad goods than the compared observation for a given level of good and bad inputs. Alongside, less good and bad inputs are employed by the remarkable observation relatively to the compared observation for given good and bad outputs. If `prodIndexFB < 1`

, the reverse reasonning holds.

**Example**

```
julia> using BDisposal
julia> # 2 DMUs, 2 good Inputs, 2 bad inputs, 3 good outputs and 2 bad outputs. 2 periods
gI = [1; 3; 5;; 2; 4; 5;;; 1; 4; 5;; 2; 5; 5];
julia> bI = [2; 4; 2;; 3; 7; 5;;; 2; 3; 2;; 3; 6; 5];
julia> gO = [10; 30; 50;; 20; 40; 50;; 15; 8; 12;;; 12; 40; 50;; 22; 50; 50;; 16; 55; 55];
julia> bO = [2; 4; 2;; 3; 7; 5;;; 2; 3; 2;; 3; 6; 5];
julia> analysis = prodIndexFB(gI,gO,bO,bI;remarcable_obs_dmu=1, remarcable_obs_period=2);
julia> analysis.prodIndexes
3×2 Matrix{Union{Missing, Float64}}:
0.909091 1.0
3.63636 2.33766
1.2987 1.2987
```

**Notes:**

- The function assumes convex, multiplicative production functions with variable returns to scale