pgt implements nonparametric efficiency analysis for
pollution-generating technologies under the materials-balance
principle. It packages the competing axiom systems for modelling bad
outputs behind one interface, with a pre-estimation audit of every
materials-balance account, source and metafrontier decompositions,
bad-output shadow prices, marginal abatement cost curves, a
productivity index and subsampling sensitivity intervals.
The materials-balance principle goes back to Ayres and Kneese (1969);
Lauwers (2009) makes the case for building it into frontier models, and
Dakpo, Jeanneaux and Latruffe (2016) survey the modelling landscape.
Existing R packages handle undesirable outputs by data translation
(deaR's Seiford-Zhu undesirable-output models, alongside a
directional formulation) or by weak
disposability and directional distances (Benchmarking::dea.direct,
nonparaeff's directional-distance routines), but, to our knowledge,
no maintained package in R or any other major statistical ecosystem
ships materials-balance-constrained DEA; applied studies implement
these estimators in ad-hoc optimisation code. pgt packages them
behind one coherent API.
Technologies may carry several good outputs, several pollutants (with
their own materials-balance accounts) and DMU-specific material flow
coefficients; the directional model and pgt_ml() are defined for a
single good output. The efficiency estimators treat the rows as an
independent cross-section: panel structure enters only through
pgt_ml()'s pooled global frontier, and boot_pgt() warns when a
panel technology is subsampled.
# from CRAN
install.packages("pgt")
# development version
# remotes::install_github("iik1/pgt")
install.packages("pgt", repos = c('https://iik1.r-universe.dev', 'https://cloud.r-project.org'))
Cite the package with citation("pgt").
library(pgt)
data(steeldemo) # synthetic steel-plant panel shipped with the package
# 1. Build the technology: inputs in CO2-potential units (u = 1),
# v = carbon retained in the product, captured CO2 as the observed
# abatement output and the capture energy as its control input.
tech <- pgt_tech(
x = steeldemo[, c("coal_coke", "other_fuel", "raw_material", "flux",
"capture_energy")],
y = steeldemo$production,
b = steeldemo$emissions,
a = steeldemo$captured,
v = 0.01467,
x_abate = "capture_energy",
group = steeldemo$route,
id = steeldemo$plant
)
# 2. Audit the materials-balance identity before estimating; with an
# observed abatement output it closes exactly: u'x - v y = b + a.
mb_check(tech)
# 3. Fit the weak-G-disposability model (Rodseth 2025, Eq. 6) and its
# directional representation (Eqs. 12 and 13), which needs the closed account.
fit <- pgt(tech, model = "wgd")
summary(fit)
summary(pgt(tech, model = "fdmo"))
# 4. Decompose environmental efficiency: across production routes, and
# into Rodseth's five sources (the abatement components need `a`).
summary(pgt_decompose(tech, type = "envelope"))
summary(pgt_decompose(tech, type = "rodseth"))
# 5. Shadow prices and the marginal abatement cost curve.
head(shadow_prices(fit))
plot(mac_curve(fit, price = 550))
# 6. Compare competing axiom systems on the same data.
compare_models(tech, models = c("wgd", "byprod", "mb_cost", "wd"))
| Function | What it does |
|---|---|
pgt_tech() |
Technology constructor: inputs, good/bad outputs, material flow coefficients u, v, abatement a, technology groups, panel period
|
mb_check() |
Audit of u'x - v y >= b per DMU and pollutant, and of the closed identity u'x - v y = b + a when abatement is observed |
pgt(model = "wgd") |
Hampf and Rodseth (2015) weak-G-disposability technology, scored by the minimal-emission programme of Rodseth (2025) Eq. 6 in a reduced form |
pgt(model = "wgd_input_fixed") |
Input-fixed benchmark with the materials-balance cap (the pre-0.6.0 wgd) |
pgt(model = "envelope") |
The v = 0 case of Eq. 6: convex lower (y, b) envelope |
pgt(model = "fdmo") |
Rodseth (2025) directional representation, Eq. 13 (indirect form of Eq. 12) with abatement fixed (alias "ddf") |
pgt(model = "mb_cost") |
Coelli et al. (2007) materials-balance cost model, EE = TE x EAE
|
pgt(model = "byprod") |
Murty-Russell-Levkoff (2012) by-production intersection technology |
pgt(model = "wd") |
Kuosmanen (2005) weak-disposability reference model |
pgt_decompose() |
Decompositions: envelope WR x TGR metafrontier; five-component Rodseth (2025, Eq. 11) |
compare_models() |
Competing axiom systems on identical data, with rank agreement |
pgt_ml() |
Global Malmquist-Luenberger productivity index (Oh 2010; experimental) |
boot_pgt() |
Subsampling inference for scores and group means (heuristic intervals) |
shadow_prices(), mac_curve()
|
Constraint duals and marginal abatement cost curves |
DMU-specific material flow coefficients, multiple pollutants and
several good outputs are supported: pass u as a matrix or list, b
as a matrix, and y as a matrix.
Validation runs as unit tests on every check, at three levels of strength.
pgt(model = "wgd") reproduces the
Rødseth (2025) Table 2 minimal controlled emissions
(16, 16, 16, 20, 16) and the implied uncontrolled-emission and
abatement targets for every farm,
pgt(model = "fdmo") the Table 3 directional
scores for farms A to D exactly (farm E is discussed in the
replication vignette), and pgt(model = "byprod") the analytic
efficiency scores of Murty, Russell and Levkoff's (2012) Example 1.
The package ships the pig-finishing example as data(pigfarms).mb_cost and envelope models are
verified against small problems solved by hand, the wd model
against a constructed example in which the minimum-emission unit
scores one and a dominated unit scores below one, and the wgd
kernel against an independent reference implementation in the test
suite. The mb_cost check uses the
phosphorus material-flow coefficients of Coelli, Lauwers and Van
Huylenbroeck (2007) and confirms the EE = TE x EAE decomposition
(an internal-consistency check, not a replication of a printed
table).GML = EC x BPC, score ranges and infeasibility
semantics are asserted on fixed-seed randomised fixtures and the
shipped data sets.The vignettes reproduce the published-table replications in the open:
vignette("replication", "pgt").
introduction: the core workflow on the synthetic steel panel and a
rice nitrogen-balance example.models: the estimating linear programs, stated in full.replication: the published-result replications above.comparing-axioms: compare_models() across the axiom systems.multiple-pollutants: multi-pollutant technologies, DMU-specific
coefficients, several intended outputs and the five-component
decomposition.productivity: pgt_ml() productivity change and boot_pgt()
inference.