---
title: "The estimating programmes"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{The estimating programmes}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

Every estimator in `pgt` solves one linear programme per evaluated unit
$i$ against a reference (peer) set. This vignette states each programme
as solved, so the mapping from the cited papers to the code can be
checked without reading the source. Throughout, $\lambda \ge 0$ are
intensity weights over the peers, $x$ the $N$ material inputs, $y$ the
$M$ good outputs (written as a single output where the original model
is scalar; the output rows repeat per column of $y$), $b$ the bad
output of the selected pollutant, and the variable-returns row
$\sum_l \lambda_l = 1$ is dropped under constant returns. The
materials-balance cap of unit $i$ for pollutant $p$ is
$c_{pi} = u_{pi}'x_i - v_{pi}'y_i$, with DMU-specific coefficients
$u_{pi}$ (a row of the $L \times N \times P$ array) and $v_{pi}$ (a
row of the $L \times M \times P$ array).

## Weak-G-disposability (`model = "wgd"`)

Equation 6 of Rødseth (2025), which he presents as the DEA model of
Hampf and Rødseth (2015), minimises emissions over peer mixes that
hold only the intended outputs at the evaluated unit's levels: the
inputs are decision variables, and the weak-G slack constraint
$u_i'\varepsilon_x + v_i'\varepsilon_y = \varepsilon_b$ ties the
disposal slacks of inputs, outputs and the bad output together.
Substituting the constraint and setting the input slacks to zero
collapses the programme to the reduced form solved by the package,
$$
b^*_i = \min_{\lambda}\ \textstyle\sum_l \lambda_l
\bigl(b_l + v_i'y_l\bigr) - v_i'y_i
\quad\text{s.t.}\quad
\textstyle\sum_l \lambda_l y_{ml} \ge y_{mi},\qquad
\textstyle\sum_l \lambda_l = 1,\qquad \lambda \ge 0:
$$
the peer emission envelope plus the retained content of good output
produced beyond the unit's own levels, valued at the unit's own
coefficients $v_i$. Self-reference is always feasible, so every score
$b^*_i/b_i$ lies in $(0, 1]$, and a materials-balance violation in the
data does not affect the programme (the audit in `mb_check()` remains
a data-quality check). When the abatement output is observed the fit
also reports the projection's abatement, held at the peer mix,
$a^* = \sum_l \lambda_l a_l$, and its implied uncontrolled emission
$z^* = \sum_l \lambda_l z_l + v_i'(\sum_l \lambda_l y_l - y_i)$, with
$z_l = u_l'x_l - v_l'y_l$ the peer's materials-balance cap: the
retained content of the output overshoot is disposed of as emission,
so $z^* - a^* = b^*_i$ whenever every peer's account closes
($z_l = b_l + a_l$). Correspondence to the paper is exercised
numerically: the programme reproduces the Table 2 minima of Rødseth
(2025) and agrees with an independent reference implementation in the
test suite. The reported output duals are the total derivatives
$\partial b^*_i/\partial y_{mi} = \mu_m - v_{mi}$, which can be
negative when the retained content is large: producing more output
binds more pollutant into the product.

## The input-fixed benchmark (`model = "wgd_input_fixed"`)

The model estimated as `"wgd"` before version 0.6.0 holds the
evaluated unit's inputs fixed and adds the unit's own
materials-balance cap:
$$
\begin{aligned}
\min_{\lambda,\, b_q}\quad & b_q \\
\text{s.t.}\quad
& \textstyle\sum_l \lambda_l y_{ml} \ge y_{mi}, \qquad m = 1, \dots, M,\\
& \textstyle\sum_l \lambda_l x_{nl} \le x_{ni}, \qquad n = 1, \dots, N,\\
& \textstyle\sum_l \lambda_l b_l \le b_q, \\
& b_q \le c_{pi}, \\
& \textstyle\sum_l \lambda_l b_{ql} \le c_{qi}, \qquad q \ne p,\\
& \textstyle\sum_l \lambda_l = 1, \qquad \lambda \ge 0,\ b_q \ge 0.
\end{aligned}
$$
This is not Eq. 6, whose inputs are free; it is the package's own
current-input companion: the emission reduction attainable at the
unit's observed input endowment, with the cap row keeping the
projection consistent with the unit's own pollutant potential.

With several pollutants, each remaining pollutant $q \ne p$ contributes
the single row shown above. This collapse is exact: pollutant $q$
carries no objective term, so introducing its own emission variable
$b_q'$ with $\sum_l \lambda_l b_{ql} \le b_q' \le c_{qi}$ is feasible
exactly when the combined row $\sum_l \lambda_l b_{ql} \le c_{qi}$
holds (take $b_q' = \sum_l \lambda_l b_{ql}$).

A unit whose own account violates a cap ($b_{qi} > c_{qi}$ for some
$q$) loses its self-reference: its programme is feasible only if some
peer mix satisfies every row, it may be infeasible (an `NA` score), and
its projection can emit more of pollutant $p$ than observed, so its
score can exceed 1. Units satisfying every account always solve with
scores in $(0, 1]$.

## The $(y, b)$ lower envelope (`model = "envelope"`)

Setting $v = 0$ in the `"wgd"` reduced form drops the retained-content
term and leaves the convex lower envelope of the $(y, b)$ scatter:
$$
\min_{\lambda}\ \textstyle\sum_l \lambda_l b_l
\quad\text{s.t.}\quad
\textstyle\sum_l \lambda_l y_{ml} \ge y_{mi},\qquad
\textstyle\sum_l \lambda_l = 1,\qquad \lambda \ge 0.
$$
The two programmes coincide on data whose products retain no
pollutant. Self-reference is always feasible, so every score lies in
$(0, 1]$.

## The directional representation (`model = "fdmo"`)

Rødseth (2025) writes the weak-G directional programme as Eq. 12 and,
under common coefficients (Proposition 3), its indirect form as Eq. 13.
The package fits Eq. 13 with the abatement output $a$ held at the
evaluated unit's own level and the sign restrictions
$\theta_y, \theta_b \ge 0$ of Eq. 14; Proposition 4 states that this
programme can equally be written as the factorially determined
multi-output convex regression of Eq. 14:
$$
\begin{aligned}
\max_{\lambda,\, \theta_y,\, \theta_b}\quad & \theta_y + \theta_b \\
\text{s.t.}\quad
& \textstyle\sum_l \lambda_l y_l - \theta_y \ge y_i, \\
& \textstyle\sum_l \lambda_l a_l \ge a_i, \\
& \textstyle\sum_l \lambda_l x_{nl} \le x_{ni}, \qquad n = 1, \dots, N,\\
& v_i\,\theta_y - \theta_b = c_{pi} - b_i - a_i, \qquad
  \theta_b \le b_i, \\
& \textstyle\sum_l \lambda_l = 1, \qquad
  \lambda \ge 0,\ \theta_y \ge 0,\ \theta_b \ge 0.
\end{aligned}
$$
The materials-balance row is an exact equality, so the model requires
accounts that close exactly ($c_{pi} = b_i + a_i$); open accounts
either make the programme infeasible or shift the closure gap into the
scores, and `pgt()` warns when it detects them. When the account
closes, the row forces $\theta_b = v_i\,\theta_y$. The gross
inefficiency $\theta_y + \theta_b$ adds good-output units to bad-output
units, so the reported number is unit-dependent. The optimum is not:
with closure gap $g_i = c_{pi} - b_i - a_i$ the balance row sets
$\theta_b = v_i\,\theta_y - g_i$, the objective equals
$(1 + v_i)\,\theta_y - g_i$, and a coherent change of units rescales
it to $(s + r v_i)\,\theta_y - r g_i$ with the same maximiser. The
model is defined for a single intended output.

Rødseth derives the programme for coefficients common to all units
(his Proposition 3 assumes no input or output quality differences).
The row $\theta_b \le b_i$ is the package's addition for
producer-specific coefficients: the balance row applies the evaluated
unit's coefficients to a peer mix whose members carry other
coefficients, and without the row a unit whose inputs carry little
pollutant could borrow a pollutant-rich peer's output and receive a
negative projected emission. With common coefficients and closed
accounts the projected emission is at least the peer mix's emission
$\sum_l \lambda_l b_l \ge 0$, so the row never binds.

## The decomposition stage programmes (`pgt_decompose(type = "rodseth")`)

The five components of Rødseth (2025, Eq. 11) are ratios of stage
minima of the extended representation (Eq. 9). Write
$w_l = u_i'x_l - v_i'y_l$ for peer $l$'s account valued at the
evaluated unit's coefficients, $z_l$ for its uncontrolled emission,
$q_l = z_l - w_l$ for its quality gap, and $a_l$ for its abatement.
Each stage solves
$$
\begin{aligned}
\min\quad & z - a \\
\text{s.t.}\quad
& \textstyle\sum_l \lambda_l y_{ml} - \varepsilon_{y,m} = y_{mi},
  \qquad m = 1, \dots, M,\\
& \textstyle\sum_l \lambda_l x_{nl} + \varepsilon_{x,n} = x_{ni}
  \qquad \text{for each held input } n,\\
& \rho = \textstyle\sum_l \lambda_l q_l, \qquad
  z = \textstyle\sum_l \lambda_l w_l + \rho + \varepsilon_z, \qquad
  a = \textstyle\sum_l \lambda_l a_l - \varepsilon_a, \\
& \varepsilon_z + \varepsilon_a = u_i'\varepsilon_x +
  v_i'\varepsilon_y, \\
& \textstyle\sum_l \lambda_l = 1, \qquad \lambda \ge 0,\
  \varepsilon \ge 0,
\end{aligned}
$$
where the summing-up row relaxes to $\ge$ when an input with positive
material content is freed (a freed input's disposal slack can absorb
any amount). Holding the quality variable fixes $\rho = 0$; holding
the abatement output fixes $a = a_i$; holding an input keeps its row,
and freeing it deletes the row. The stages hold everything first and
then free, in order, the quality variable, the production inputs, the
abatement output and the pollution-control inputs; the ratios of
successive minima are the five components reported by
`pgt_decompose()`, and the fully freed stage reproduces the reduced
form of Eq. 6, so the components multiply to the `wgd` efficiency
exactly.

When the abatement output is unobserved, the implied abatement
$a_l = z_l - b_l$ closes each account by construction and abatement is
left endogenous in every stage, which collapses the two abatement
components to 1. When abatement is observed but an account does not
close exactly, the stages use the measurement-consistent uncontrolled
emission $z_l = b_l + a_l$, so that peers' controlled emissions equal
their measured $b_l$; the two constructions coincide when every
account closes, the case of Rødseth (2025).

## The materials-balance cost model (`model = "mb_cost"`)

Coelli, Lauwers and Van Huylenbroeck (2007), with the material flow
coefficients in the role of prices. Two programmes: radial technical
efficiency,
$$
TE = \min\{\theta :\ \textstyle\sum_l \lambda_l x_{nl} \le \theta
x_{ni}\ \forall n,\ \sum_l \lambda_l y_l \ge y_i,\ \sum_l \lambda_l =
1\},
$$
and the material-inflow minimisation over a free input point $\chi$,
$$
EE = \frac{\min\{u_{pi}'\chi :\ \sum_l \lambda_l x_{nl} \le \chi_n\
\forall n,\ \sum_l \lambda_l y_l \ge y_i,\ \sum_l \lambda_l = 1\}}
{u_{pi}'x_i},
$$
with environmental-allocative efficiency $EAE = EE / TE$. The principal
score is $EE$, a material-inflow ratio rather than an emission ratio;
the implied minimal uncontrolled emission (material surplus)
$u_{pi}'\chi^* - v_{pi}'y_i$
is reported as `b_star` and can be negative under DMU-specific
coefficients, in which case `pgt()` warns. Coelli et al. solve both
programmes under constant returns, which `returns = "crs"` reproduces
by dropping the row $\sum_l \lambda_l = 1$.

## The by-production intersection (`model = "byprod"`)

Murty, Russell and Levkoff (2012): the technology is the intersection
of an intended-production sub-technology and a residual-generation
sub-technology over the emission-causing inputs $\mathcal{P}$. Output
efficiency inverts the maximal radial expansion of $y$,
$$
E_1 = 1 \big/ \max\{\phi :\ \textstyle\sum_l \lambda_l y_l \ge \phi
y_i,\ \sum_l \lambda_l x_{nl} \le x_{ni}\ \forall n,\ \sum_l \lambda_l
= 1\},
$$
and emission efficiency is the maximal radial contraction of $b$ with
the polluting inputs bounded below,
$$
E_2 = \min\{\psi :\ \textstyle\sum_l \mu_l b_l \le \psi b_i,\ \sum_l
\mu_l x_{nl} \ge x_{ni}\ \forall n \in \mathcal{P},\ \sum_l \mu_l =
1\}.
$$
$E_2$ is the principal environmental efficiency; `mean_eff` is the arithmetic
mean $(E_1 + E_2)/2$. With one good and one bad output it is the
by-production efficiency index of Murty, Russell and Levkoff (2012);
with several outputs their index averages output-specific factors in
the manner of the Russell measure (Färe and Lovell 1978), whereas $E_1$
is radial. If either sub-programme fails, every
score of that unit is `NA`.

## Weak disposability (`model = "wd"`)

The Kuosmanen (2005) variable-returns form, a reference system with no
materials balance. The intensity weights split into an active part $z$
(scaling good and bad outputs together) and an abatement part $w$
(scaling inputs only):
$$
\begin{aligned}
\min_{z,\, w,\, \phi}\quad & \phi \\
\text{s.t.}\quad
& \textstyle\sum_l z_l y_l \ge y_i, \qquad
  \textstyle\sum_l z_l b_l = \phi\, b_i, \\
& \textstyle\sum_l (z_l + w_l)\, x_{nl} \le x_{ni}, \qquad n = 1,
  \dots, N,\\
& \textstyle\sum_l (z_l + w_l) = 1, \qquad z, w \ge 0.
\end{aligned}
$$
The equality on the bad output is weak disposability: emissions shrink
only with a proportional scaling of the active production plan.

## The productivity-index distances (`pgt_ml()`)

The global Malmquist-Luenberger index scores every observation $k$ on a
directional distance with direction $g = (y_k, b_k)$ against a
reference set $R$ (a period or the pooled panel); the index is
defined for a single good output. Under
`technology = "wd"` the distance uses the Kuosmanen weak-disposability
technology above with $\sum_{l \in R} z_l b_l = (1 - \beta) b_k$ and
$\sum_{l \in R} z_l y_l \ge (1 + \beta) y_k$. With `returns = "crs"`
the abatement weights $w$ are redundant and, for one bad output, this
is the constant-returns technology of Chung, Färe and Grosskopf (1997,
Eq. 3.9), which Oh (2010) also uses; both papers index several bad
outputs jointly, whereas `pgt_ml()` indexes one pollutant at a time.
The variable-returns default extends it. Under `technology = "input_envelope"` and `"envelope"` the
bad-output row is the free-disposal envelope
$\sum_{l \in R} \lambda_l b_l \le (1 - \beta) b_k$, with and without
the input rows; these exploratory variants bound emissions by the
peer envelope rather than imposing weak disposability.

## References

- Chung, Y. H., Färe, R., & Grosskopf, S. (1997). Productivity and
  undesirable outputs: A directional distance function approach.
  *Journal of Environmental Management*, 51(3), 229-240.
  doi:10.1006/jema.1997.0146
- Coelli, T., Lauwers, L., & Van Huylenbroeck, G. (2007). Environmental
  efficiency measurement and the materials balance condition. *Journal
  of Productivity Analysis*, 28(1-2), 3-12. doi:10.1007/s11123-007-0052-8
- Färe, R., & Lovell, C. A. K. (1978). Measuring the technical
  efficiency of production. *Journal of Economic Theory*, 19(1),
  150-162. doi:10.1016/0022-0531(78)90060-1
- Hampf, B., & Rødseth, K. L. (2015). Carbon dioxide emission standards
  for U.S. power plants: An efficiency analysis perspective. *Energy
  Economics*, 50, 140-153. doi:10.1016/j.eneco.2015.04.001
- Kuosmanen, T. (2005). Weak disposability in nonparametric production
  analysis with undesirable outputs. *American Journal of Agricultural
  Economics*, 87(4), 1077-1082. doi:10.1111/j.1467-8276.2005.00788.x
- Murty, S., Russell, R. R., & Levkoff, S. B. (2012). On modeling
  pollution-generating technologies. *Journal of Environmental
  Economics and Management*, 64(1), 117-135.
  doi:10.1016/j.jeem.2012.02.005
- Oh, D.-h. (2010). A global Malmquist-Luenberger productivity index.
  *Journal of Productivity Analysis*, 34(3), 183-197.
  doi:10.1007/s11123-010-0178-y
- Rødseth, K. L. (2025). On the development of a unified, nonparametric
  materials balance-based efficiency analysis model and its
  applications. *Journal of Productivity Analysis*, 64(3), 305-319.
  doi:10.1007/s11123-025-00768-0
