Learn R Programming

sfa (version 1.2.0)

endogeneity_test: Were the regressors endogenous after all?

Description

A Wald test of \(H_0\!: \rho = 0\) on an ivsfm fit -- the hypothesis that the noise \(v\) is uncorrelated with the reduced-form errors of the endogenous regressors, so that the endogeneity correction was not needed and a plain sfm fit would have been consistent. This is the Durbin--Wu--Hausman idea carried into the stochastic frontier, and is Equation (25) of Hou, Ramalho and Roseta-Palma (2025).

Usage

endogeneity_test(object, level = 0.05)

Value

An object of class c("sfa_endog_test", "htest") carrying statistic (the Wald \(W\)), parameter (its degrees of freedom, the number of endogenous regressors), p.value, the estimated rho with its standard errors and z-ratios, and reject.

Arguments

object

A fit from ivsfm with model_name = "IVLIML" or "IVCF". "C2SLS" is a moment estimator and carries no correction parameter, so it is refused.

level

Size used for the reported verdict.

Details

The statistic. With \(\hat\rho\) the vector of correlations between \(v\) and the reduced-form errors,

$$W = \hat\rho' \,[\widehat{\mathrm{Var}}(\hat\rho)]^{-1}\, \hat\rho \;\sim\; \chi^2(q),$$

\(q\) the number of endogenous regressors. With a single endogenous regressor it is exactly the squared z-ratio already printed for rho_ in the fit.

Why this is an ordinary chi-square. \(\rho\) lives in the open unit ball, so \(\rho = 0\) is an interior point of the parameter space. That is the opposite of the situation inefficiency_test faces, where \(\sigma_u = 0\) sits on a boundary and the null distribution is a chi-bar-square mixture. No mixture is needed here.

Standard errors for \(\rho\). ivsfm parameterises the correlations as \(\rho = t/\sqrt{1 + t't}\), which keeps them inside the unit ball for any real \(t\). Before version 1.2.0 the standard errors of \(\rho\) were reported as NA on the ground that this map has a non-diagonal Jacobian. It does, but the Jacobian is short --

$$\partial \rho_i/\partial t_j = \delta_{ij}/s - t_i t_j / s^3, \qquad s = \sqrt{1 + t't},$$

that is \(J = (I - \rho\rho')/s\) -- so \(\mathrm{Var}(\hat\rho) = J\,\mathrm{Var}(\hat t)\,J'\) by the delta method. At the null \(J = I\), which is what makes the test well calibrated there. ivsfm now reports these standard errors and carries the full \(\mathrm{Var}(\hat\rho)\) as $vcov_rho, which is what the joint test needs.

Reading a non-rejection. Failing to reject is not evidence for exogeneity. \(\rho\) is identified through the instruments, so weak instruments make \(\hat\rho\) imprecise and the test powerless; the print method says so rather than letting the p-value speak alone.

References

Hou, Z., Ramalho, J. J. S. and Roseta-Palma, C. (2025). Dealing with endogeneity in stochastic frontier models: A comparative assessment of estimators. Energy Economics 151, 108922.

Amsler, C., Prokhorov, A. and Schmidt, P. (2016). Endogeneity in stochastic frontier models. Journal of Econometrics 190(2), 280-288.

Kutlu, L. (2010). Battese-Coelli estimator with endogenous regressors. Economics Letters 109(2), 79-81.

See Also

ivsfm for the fit, inefficiency_test for the boundary-null case, spec_test and moment_range for the distributional assumptions.

Examples

Run this code
set.seed(9)
n  <- 600
z  <- rnorm(n); x1 <- rnorm(n); eps <- rnorm(n)
x2 <- z + eps
v  <- 0.6 * eps + sqrt(1 - 0.36) * rnorm(n)
d  <- data.frame(y = 0.5 * x1 + 0.5 * x2 + v - abs(rnorm(n)),
                 x1 = x1, x2 = x2, z = z)

fit <- ivsfm(y ~ x1 + x2, endogenous = ~ x2, instruments = ~ z,
             data = d, model_name = "IVCF")
endogeneity_test(fit)

Run the code above in your browser using DataLab