malmquist_meta: Metafrontier Malmquist Productivity Index

View source: R/malmquist.R

malmquist_metaR Documentation

Metafrontier Malmquist Productivity Index

Description

Computes the metafrontier Malmquist total factor productivity (TFP) index and its three-way decomposition into technical efficiency change (TEC), technology gap change (TGC), and metafrontier technical change (TC*) for panel data, following O'Donnell, Rao, and Battese (2008).

Usage

malmquist_meta(
  formula = NULL,
  data = NULL,
  group = NULL,
  time = NULL,
  id = NULL,
  method = c("dea", "sfa"),
  dist = c("hnormal", "tnormal", "exponential"),
  estimator = c("bc88", "jlms"),
  orientation = c("output", "input"),
  rts = c("crs", "vrs", "drs", "irs", "fdh"),
  control = list(),
  ...
)

Arguments

formula

an object of class Formula. Left-hand side specifies the output(s); right-hand side specifies the inputs. Example: y ~ x1 + x2.

data

a data frame containing all variables, plus the grouping and time variables.

group

a character string naming the column in data that identifies technology groups, or a vector of group indicators.

time

a character string naming the column in data that identifies time periods, or a vector of time indicators. Periods must be consecutive integers or sortable.

id

optional. A character string naming the column in data that identifies firms across periods, or a vector of firm identifiers. When supplied, firms are matched across consecutive periods by identifier within each group. When NULL (default), firms are matched by row position within each group, which is valid only for balanced panels sorted identically in every period (see Details).

method

character. "dea" (default) for DEA-based distance functions or "sfa" for SFA-based parametric distance functions (an approximation; see Details).

dist

character. Distribution of the inefficiency term when method = "sfa": "hnormal" (default), "tnormal", or "exponential".

estimator

character. Technical efficiency estimator used when method = "sfa": "bc88" (default) for the Battese and Coelli (1988) estimator E[\exp(-u)|\varepsilon], or "jlms" for the Jondrow et al. (1982) estimator \exp(-E[u|\varepsilon]). Passed to the group SFA fitter.

orientation

character. "output" (default) or "input".

rts

character. Returns to scale assumption: "crs" (default), "vrs", "drs", "irs", or "fdh".

control

a list of control parameters for the SFA optimiser.

...

additional arguments (currently unused).

Details

The metafrontier Malmquist TFP index decomposes productivity change into three components:

M^* = TEC \times TGC \times TC^*

where:

  • TEC = TE^{group}_{t+1} / TE^{group}_t: technical efficiency change relative to the group frontier

  • TGC = TGR_{t+1} / TGR_t: technology gap change, capturing whether a group's frontier is catching up to or falling behind the metafrontier

  • TC^*: metafrontier technical change, measuring the shift of the global production possibility frontier

Firm matching: when id is supplied, firms are matched across consecutive periods by identifier within each technology group. Duplicated (id, period) combinations within a group are an error. Observations without a within-group match in the adjacent period, either because the panel is unbalanced or because a firm switches group between periods, are dropped, and a single consolidated warning reports the number dropped per period pair. When id is NULL, firms are matched by row position within each group; this is valid only for balanced panels sorted identically in every period, so a message is emitted as a reminder, and a warning is issued when group sizes differ across a period pair (the unmatched observations are dropped). Supplying id is recommended.

DEA-based computation (method = "dea"): for each consecutive pair of periods (s, t), eight sets of LP problems are solved: within-group and pooled efficiencies at each period, plus cross-period evaluations for the geometric mean formulation of technical change. Distances to the metafrontier are exact distances to the pooled-data frontier, as in O'Donnell, Rao and Battese (2008).

SFA-based computation is an approximation (method = "sfa"): period-specific group SFA frontiers are estimated, and each observation's metafrontier distance is approximated by the pointwise maximum of the estimated group frontier functions evaluated at its inputs; no enveloping metafrontier is re-estimated. This coincides with the O'Donnell et al. (2008) metafrontier wherever a single group frontier dominates, but can understate the metafrontier where group frontiers cross, which affects TGC and TC*. Prefer method = "dea" when an exact decomposition is required.

Infeasible cross-period programs: under rts = "vrs", "drs", "irs", or "fdh", cross-period LPs can be genuinely infeasible because the reference technology cannot reach the evaluated observation. Such cases yield NA (never Inf), are excluded from the reported means, and are counted in a single consolidated warning; the counts are stored in the n_infeasible and infeasible_by_period components. rts = "crs" avoids the issue, as does the hyperbolic orientation available in metafrontier.

Note that the standard Malmquist index is not a ‘proper’ (multiplicatively complete and transitive) TFP index in the sense of O'Donnell (2012), so chained comparisons of index levels across more than two periods should be avoided.

Value

An object of class "malmquist_meta", a list with components:

malmquist

data frame with columns: id, group, period_from, period_to, MPI (metafrontier Malmquist TFP index), TEC (technical efficiency change), TGC (technology gap change), TC (metafrontier technical change). The id column holds the supplied firm identifiers when id is given, and the within-group match position otherwise.

group_malmquist

data frame with the within-group Malmquist index decomposition: MPI_group, EC_group, TC_group

meta_malmquist

data frame with the metafrontier Malmquist index: MPI_meta, EC_meta, TC_meta

tgr

data frame with technology gap ratios at each period endpoint: id, group, period_from, period_to, TGR_from (TGR at the start period), TGR_to (TGR at the end period), and TGC (technology gap change, TGR_to / TGR_from)

call

the matched function call

method

the estimation method used ("dea" or "sfa")

orientation

the orientation used

rts

the returns to scale assumption

groups

group labels

periods

time periods

n_infeasible

total number of infeasible cross-period DEA programs (always 0 for method = "sfa")

infeasible_by_period

data frame with the number of infeasible cross-period DEA programs per period pair (method = "dea" only)

References

O'Donnell, C.J., Rao, D.S.P. and Battese, G.E. (2008). Metafrontier frameworks for the study of firm-level efficiencies and technology ratios. Empirical Economics, 34(2), 231–255. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s00181-007-0119-4")}

O'Donnell, C.J. (2012). An aggregate quantity framework for measuring and decomposing productivity change. Journal of Productivity Analysis, 38(3), 255–272. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11123-012-0275-1")}

Examples

# Simulate panel data for 2 groups, 3 time periods
set.seed(42)
panels <- lapply(1:3, function(t) {
  sim <- simulate_metafrontier(
    n_groups = 2, n_per_group = 30,
    tech_gap = c(0, 0.3 + 0.05 * t),
    sigma_u = c(0.2, 0.3),
    seed = 42 + t
  )
  sim$data$time <- t
  sim$data$id <- seq_len(nrow(sim$data))
  sim$data
})
panel_data <- do.call(rbind, panels)

# Compute metafrontier Malmquist index, matching firms by id
malm <- malmquist_meta(
  log_y ~ log_x1 + log_x2,
  data = panel_data,
  group = "group",
  time = "time",
  id = "id"
)
summary(malm)


metafrontier documentation built on Aug. 19, 2026, 5:08 p.m.