Learn R Programming

sfa (version 1.2.0)

meanefficiency: Model-Implied Mean Efficiency

Description

The mean efficiency implied by the fitted distribution of inefficiency, \(E[\exp(-U)]\), and the mean efficiency among the most efficient \(p\) of that distribution.

Usage

meanefficiency(object,
               p = c(0.01, 0.05, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99),
               use_closed_form = TRUE)

Value

A list with model, distribution, the parameters used, mean_efficiency, the method used to obtain it, and supra, a data frame of p against mean efficiency.

Arguments

object

An "sfareg" fit.

p

Proportions in \((0, 1]\) at which to report supra-percentile mean efficiency. p = 1 is the whole distribution and returns the unconditional mean.

use_closed_form

Use the closed-form expression where one exists. Setting it to FALSE forces numerical integration of the same density, which is how the closed forms are checked.

Details

A different quantity from the reported average. print and summary report the average of the per-observation conditional predictions \(E[\exp(-u_i) \mid \varepsilon_i]\). That is a property of the sample in hand. \(E[\exp(-U)]\) is a property of the fitted model, and it is the number that can be compared across studies.

Closed forms. Available for the half-normal (\(2e^{\sigma_U^2/2}\Phi(-\sigma_U)\)), exponential (\(1/(1+\sigma_U)\)), truncated normal, Rayleigh, gamma (\((1+\theta)^{-k}\)), uniform (\((1-e^{-\theta})/\theta\)) and generalized exponential (\(2/((\sigma_U+1)(\sigma_U+2))\)). The lognormal, Weibull and Nakagami have none in elementary terms and are integrated numerically; method in the returned list says which route was taken.

Every closed form is checked against numerical integration of the same density in the package's tests, and the density is separately checked against its own quantile function by simulation. The first catches an algebraic slip; the second catches a parameter being read off the fit incorrectly, which would otherwise make both routes agree and both be wrong.

Supra-percentile means are always integrated. Efficiency is decreasing in \(u\), so the most efficient \(p\) are the smallest \(p\) of \(u\): the reported value is \(p^{-1}\int_0^{Q(p)} e^{-u}f(u)\,du\). It necessarily exceeds the unconditional mean and falls as \(p\) rises.

See Also

efficiency for the per-observation predictors.

Examples

Run this code
# \donttest{
d <- data_gen_cs(N = 400, rand = 1, sig_u = 1, sig_v = 0.3, cons = 0.5,
                 beta1 = 0.5, beta2 = 0.5, a = 1, mu = 0.5)
fit <- sfm(y_pcs ~ x1 + x2, model_name = "NHN", data = d)

r <- meanefficiency(fit)
r$mean_efficiency
r$supra
# }

Run the code above in your browser using DataLab