Learn R Programming

sfa (version 1.2.0)

moment_range: What skewness and excess kurtosis can a pair of distributions produce?

Description

Reports, for each pair of noise and inefficiency distributions, the set of skewness and excess kurtosis values the composed error \(\varepsilon = v \pm u\) can attain at all, and says which pairs the residual moments rule out. This is the Type II failure check of Papadopoulos and Parmeter (2021): a pair whose attainable set does not contain the sample moments is refuted without any test statistic. It needs no frontier fit.

Usage

moment_range(object = NULL,
             noise = c("normal", "logistic", "laplace", "uniform", "t"),
             inefficiency = c("halfnormal", "exponential", "genexponential",
                              "truncatednormal", "gamma"),
             inefdec = NULL, df = 8)

Value

A data frame of class "sfa_moment_range", one row per pair, with the attainable interval for the composed skewness (g1_lo, g1_hi) and excess kurtosis (g2_lo, g2_hi), logical skew_ok and kurt_ok, and a verdict of "ok", "type I (wrong skew)" or "type II (...)". The sample moments, sample size and orientation are attributes.

Arguments

object

An "sfareg" fit, whose OLS residuals are used, or a numeric vector of residuals. Omit it to get the attainable ranges alone, as a reference table.

noise

Assumed distributions of \(v\); all five by default. Only the excess kurtosis of \(v\) enters.

inefficiency

Assumed distributions of \(u\); all five by default.

inefdec

Orientation. Taken from the fit when there is one, otherwise production. A cost frontier puts the skewness on the positive side.

df

Degrees of freedom for noise = "t", whose excess kurtosis is \(6/(\nu-4)\). Must exceed 4.

Details

The two equations. With \(R = \mathrm{SNR}^2/(1+\mathrm{SNR}^2)\) the share of composed-error variance contributed by \(u\), Papadopoulos and Parmeter (2021, eqs. 5 and 10) give

$$|\gamma_1(\varepsilon)| = \gamma_1(u)\,R^{3/2}, \qquad \gamma_2(\varepsilon) = \gamma_2(v)(1-R)^2 + \gamma_2(u)R^2.$$

Because \(R\) lies in \((0,1)\), the composed skewness can never exceed the skewness of \(u\) itself, whatever the noise: the Normal-Half-Normal pair is confined to \(\gamma_1(\varepsilon) \in (-0.995, 0)\) and the Normal-Exponential pair to \((-2, 0)\). The kurtosis equation is quadratic in \(R\), so its range is not simply the interval between the two components' values -- with leptokurtic noise it dips below both before rising, reaching \(\gamma_2(v)\gamma_2(u)/(\gamma_2(v)+\gamma_2(u))\) at \(R = \gamma_2(v)/(\gamma_2(v)+\gamma_2(u))\).

Which \(u\) can fail. Half-normal, exponential and generalized exponential have fixed skewness and kurtosis, so their attainable sets are the narrowest. The truncated normal is indexed by \(\mu/\sigma_u\) and sweeps \(\gamma_1(u) \in (0,2)\) and \(\gamma_2(u) \in (-0.243, 6)\) -- it is the only one here whose composed error can be platykurtic under normal noise. The gamma has \(\gamma_1(u) = 2/\sqrt{k}\) and \(\gamma_2(u) = 6/k\), unbounded as \(k \to 0\), so a gamma inefficiency term can never suffer a Type II failure; the price, as PP2021 note, is that \(k < 1\) makes the density log-convex.

This is a diagnostic, not a test. PP2021 section 2.3 shows the range check over-rejects, and the package's own replication of their Tables 1-5 confirms it: with correctly specified Normal-Half-Normal data at \(n = 200\) and \(\mathrm{SNR} = 3\), the sample excess kurtosis falls outside its theoretical range 26% of the time, and the sample skewness 16% of the time. Use spec_test for the formal statistic, which is built on the same two equations but studentised and bootstrapped.

Relation to the wrong-skew problem. A Type I failure -- residual skewness of the wrong sign, Waldman (1982) -- is a property of the data and is reported for every row at once. Type II failures are pair-specific: they are what tells you that the residuals are too skewed, or too heavy-tailed, for the particular \(u\) you assumed. Wrong skew is handled by skewness_test and, as an estimator, by esfm.

References

Papadopoulos, A. and Parmeter, C. F. (2021). Type II failure and specification testing in the Stochastic Frontier Model. European Journal of Operational Research 293(3), 990-1001.

Waldman, D. M. (1982). A stationary point for the stochastic frontier likelihood. Journal of Econometrics 18(2), 275-279.

See Also

spec_test for the formal test built on the same two equations, skewness_test for the Type I failure, esfm for an estimator that tolerates it.

Examples

Run this code
## The reference table on its own: no data needed.
moment_range(noise = "normal")

set.seed(4)
d <- data_gen_cs(N = 400, rand = 4, sig_u = 1, sig_v = 0.5, cons = 1,
                 beta1 = 0.5, beta2 = 0.5, a = 1, mu = 0.5)

## Exponential inefficiency, read through a normal-half-normal lens: the
## residuals are more skewed than a half-normal can make them.
fit <- sfm(y_pcs_e ~ x1 + x2, data = d, model_name = "NHN")
moment_range(fit, noise = "normal")

Run the code above in your browser using DataLab