Learn R Programming

sfa (version 1.2.0)

efficiency: Technical Efficiency Scores

Description

Extracts observation-specific technical efficiency from a fitted frontier, choosing among the three usual point predictors and between the two scales the dependent variable may be on.

Usage

efficiency(object, type = c("bc", "jlms", "mode"), logDepVar = TRUE,
           newdata = NULL)

Value

A numeric vector of efficiency scores, one per observation used in the fit.

Arguments

object

An "sfareg" fit.

type

Which predictor of \(u_i\) to use. "bc" (the default) is Battese--Coelli, \(E[\exp(-u_i) \mid \varepsilon_i]\); "jlms" is Jondrow et al., \(\exp(-E[u_i \mid \varepsilon_i])\); "mode" uses the mode of the posterior of \(u_i\).

logDepVar

TRUE (the default) if the dependent variable is on a log scale, so that efficiency is \(\exp(-u_i)\); FALSE if it is on a level scale, giving \(1 - u_i / f(x_i)\).

newdata

Data to rebuild the fitted frontier from, needed only when logDepVar = FALSE. Supply it when the data used for the fit can no longer be recovered from the stored call.

Details

Which predictor. The three differ in what they report about the same posterior, not in how well they are estimated. \(E[\exp(-u)] \ge \exp(-E[u])\) by Jensen's inequality, so "bc" is never below "jlms"; the gap widens as the posterior spreads out. "mode" is the only one that can equal exactly 1, and it does so for every observation whose posterior mean is negative -- typically much of the efficient tail. That is a property of the predictor rather than a defect: where the posterior mean of \(u\) is negative the single most likely value really is the boundary. It is available only for the models whose posterior is a truncated normal ("NHN", "NHN_Z", "NE", "NTN").

Which scale. The package elsewhere assumes throughout that the dependent variable is logged, which is the usual case and makes \(u\) a proportional shortfall. logDepVar = FALSE instead forms \((f(x_i) - u_i)/f(x_i)\). That is a ratio of two estimated quantities and is less well behaved than the log version: it is undefined where the fitted frontier is zero and negative where \(u\) exceeds it, both of which happen near zero output. A warning is issued if any score comes back negative or non-finite, since silence there would be the real failure.

See Also

efficiency_ci for interval estimates of the same quantity.

Examples

Run this code
# \donttest{
set.seed(2)
n  <- 400
x1 <- rnorm(n); x2 <- rnorm(n)
y  <- 6 + 0.5 * x1 + 0.5 * x2 + rnorm(n, 0, 0.3) - abs(rnorm(n, 0, 0.8))
d  <- data.frame(y = y, x1 = x1, x2 = x2)

fit <- sfm(y ~ x1 + x2, model_name = "NHN", data = d)

summary(efficiency(fit))                      # Battese-Coelli, log scale
summary(efficiency(fit, type = "jlms"))       # never above the above
summary(efficiency(fit, type = "mode"))       # reaches exactly 1
summary(efficiency(fit, logDepVar = FALSE, newdata = d))
# }

Run the code above in your browser using DataLab