---
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) 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 summing-up condition
$u_i'\varepsilon_x + v_i'\varepsilon_y = \varepsilon_b$ ties the
disposal slacks of inputs, outputs and the bad output together.
Substituting the condition 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
optimal peer mix also delivers the projection's implied uncontrolled
emission $z^* = \sum_l \lambda_l z_l$, with
$z_l = u_l'x_l - v_l'y_l$ the peer's materials-balance cap
(equal to $b_l + a_l$ when the peer's account closes), and abatement
$a^* = \sum_l \lambda_l a_l$. Faithfulness 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"`)

The factorially determined multi-output form of Rødseth (2025, Eq. 13),
with the abatement output $a$ held at the evaluated unit's own level:
$$
\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, \\
& \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 (direction $(1, 1)$), so it is unit-dependent. The model is
defined for a single intended output.

## 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 controlled emission $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.

## 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$, in the spirit of the Färe-Grosskopf-Lovell graph
measure. 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$; this is the technology
under which Chung, Färe and Grosskopf (1997) and Oh (2010) define the
index. 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
- 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
