Learn R Programming

sfa (version 1.2.0)

density_weights: Density-power weights from a robust frontier fit

Description

Returns the weight each observation receives in the estimating equation of a maximum \(L_q\)-likelihood or minimum density-power divergence fit. The weight is the fitted density raised to the power \(c\), normalised so the largest is one.

Usage

density_weights(object, sigma_v = NULL, sigma_u = NULL, c = NULL,
                normalize = TRUE)

Value

A numeric vector of weights in \((0, 1]\), one per observation.

Arguments

object

A fitted frontier model, or a numeric vector of composed residuals.

sigma_v, sigma_u

Scale parameters. Required when object is a numeric vector; taken from the fit otherwise.

c

Robustness tuning parameter. Taken from the fit when available.

normalize

Logical; scale so the maximum weight is one. Default TRUE.

What this diagnostic can and cannot find

The weight is a function of the fitted density at the observation, so it responds to observations lying far from the fitted surface. It has no purchase on an observation that is wrong in a regressor and, because the fitted surface bends toward it, ends up close to that surface. A mis-recorded input can therefore be highly influential and still receive a weight near one. This is not a defect of the implementation: the bounded influence of these estimators is bounded with respect to response contamination, conditional on a fixed or bounded design. Pair this with a leverage diagnostic, and with case deletion, before concluding that an observation is or is not driving a result.

References

Bernstein, D.H., Parmeter, C.F. and Wright, I.A. (2026). On Robust Estimation of the Stochastic Frontier Model. Working paper.

See Also

hscore_select, calibrate_c

Examples

Run this code
set.seed(1)
e <- rnorm(200, 0, 0.3) - abs(rnorm(200, 0, 0.6))
w <- density_weights(e, sigma_v = 0.3, sigma_u = 0.6, c = 0.217)
summary(w)
head(order(w), 10)   # the observations the estimator discounts most

Run the code above in your browser using DataLab