How this calculation works
A stochastic production frontier writes logged output as a systematic frontier plus symmetric noise minus a nonnegative inefficiency term. The minus sign places inefficiency below the frontier in this production convention.
Firstversioncross-sectionalnormal-halfnormalproductionfrontier onlogoutput y=Xβ+v-u,v~N(0,σv²),u~halfNormal(σu²),independent. Residuale=y-Xβ,σ²=σv²+σu²,λ=σu/σv;logf=log2-logσ+logphi(e/σ)+logPhi(-λe/σ). Optimizeβ,logσv,logσuwithmultiple starts;explicitσu=0OLSboundary. Givenresidual,posterioru~N(muStar,sigmaStar²)truncatedu≥0 where muStar=-eσu²/σ²,sigmaStar=σuσv/σ. Eexp(-u)=exp(-muStar+.5sigmaStar²)*Phi(muStar/sigmaStar-sigmaStar)/Phi(muStar/sigmaStar),usinglogPhi forstability. Do notreplace thisbyexp(-E[u]) (Jensen difference).A worked example
With the prefilled inputs, sigmaInefficiency = 0.7515853307470826. Rows [outcome,predictors...]; normal plus half-normal cross-sectional frontier.
Good to know
Normal plus half-normal composed-error cross-sectional local maximum; conditional E[exp(−u)|residual], not exp(−E[u]). No panel structure or causal efficiency ranking.
Reference: Primary method reference or author-maintained documentation (opens in a new tab) ↗
Separate noise from a production shortfall
A stochastic production frontier writes logged output as a systematic frontier plus symmetric noise minus a nonnegative inefficiency term. The minus sign places inefficiency below the frontier in this production convention.
A cost frontier uses a different sign interpretation. Mixing the two conventions can turn an apparent efficiency estimate into the opposite of the intended economic quantity.
Compare with the Tobit censored regression calculator from observed values. Separate symmetric measurement error from one-sided inefficiency in a production frontier; Tobit models censoring and does not decompose a two-part residual.
Choose the output scale explicitly
Rows [outcome,predictors...]; normal plus half-normal cross-sectional frontier.The basic model uses log output. Entering a physical output level into an interface expecting logarithms changes the entire fitted relationship, so any internal transformation must be stated.
Predictor coding also matters: log inputs can give elasticity interpretations under a log-linear frontier, while raw inputs describe a different functional form. The calculator cannot choose that economic specification automatically. The input rows contain outcome followed by one to four predictors; a location intercept is added. In a production frontier the composed residual is normal noise minus nonnegative inefficiency. The cost-sign option reverses the inefficiency contribution while retaining the same nonnegative latent variable. Those conventions affect the sign inside the normal tail probability and must be selected before fitting. The positive noise and inefficiency scales are estimated jointly, with multiple deterministic starting ratios used to reduce dependence on one initialization.
State the error distributions
The supported model combines normal symmetric noise with an independent half-normal inefficiency term. Their variance parameters describe different components even though only their combined residual is observed.
Skewness helps distinguish the components, but small samples can provide weak information. The distributional assumption is therefore a substantive modeling choice rather than a harmless numerical detail.
Fit the composed-error likelihood
The residual density combines a Gaussian density and a Gaussian cumulative probability. Stable evaluation needs logarithmic tail calculations when residuals or variance ratios are extreme.
A numerical fit should use several starts and explicitly compare the zero-inefficiency boundary. Reporting a tiny positive variance solely because a log-parameter optimizer cannot reach zero would hide a legitimate boundary solution.
An exact conditional-efficiency check
With residual zero and both noise and inefficiency standard deviations equal to one, the conditional inefficiency distribution is a half-normal with scale1/√2.
The conditional expected efficiency is2exp(1/4)Φ(-1/√2), equivalently exp(1/4)erfc(1/2). This checks the conditional formula; it is not a claim that a full fitted frontier optimizer has been validated.
Use the correct efficiency expectation
For a log production frontier, technical efficiency is exp(-u). The conditional mean of that quantity is not the same as exponentiating the negative conditional mean of u.
The difference follows from the nonlinearity of the exponential. A result must say which conditional summary it uses rather than labeling several inequivalent transformations simply as efficiency. The fitted location intercept can move as the inefficiency scale changes because part of an asymmetric residual distribution is being reassigned between frontier location and latent inefficiency. Compare the implied residual distribution and likelihood, rather than treating an intercept shift alone as measured technological progress.
Avoid treating rankings as measurements
Estimated unit efficiencies depend on the frontier specification, error distributions and the information available for each observation. They can change when those assumptions or the sample change.
Use fitted rankings with uncertainty and domain evidence, not as definitive assessments of individual performance. A converged likelihood cannot establish that every residual shortfall represents avoidable inefficiency. For an accepted interior local candidate, the output provides fitted coefficients, both scale estimates and conditional inefficiency summaries for each row. Expected exp minus inefficiency is evaluated under the truncated conditional distribution and is not replaced by exp of minus its conditional mean. Boundary warnings flag scale components small relative to residual variation, but this release does not establish a likelihood-ratio test against the zero-inefficiency boundary. Results can be sensitive to functional form, endogenous predictors and the half-normal assumption. Ranking units by conditional inefficiency without investigating those assumptions can turn a model residual into a misleading performance judgment. Normal plus half-normal composed-error cross-sectional local maximum; conditional E[exp(−u)|residual], not exp(−E[u]). No panel structure or causal efficiency ranking.
A few questions, answered
Is a negative residual automatically inefficiency?
No. The model divides residual variation probabilistically between symmetric noise and a nonnegative shortfall.
Can I use this production formula for a cost frontier?
Not without changing the error-sign interpretation and corresponding likelihood specification.
Why is E[exp(-u)] different from exp(-E[u])?
The exponential is nonlinear, so transforming an expectation differs from taking the expectation of the transformed variable.
What does zero inefficiency variance mean?
The fitted boundary reduces the model to ordinary Gaussian regression with efficiency one under this specification.