Special thanks to the Amazing Kit Baum, -xtsfkk- is now available on SSC. You can install -xtsfkk- from SSC by entering the following command in Stata:

xtsfkk fits endogenous panel stochastic production or cost frontier models following the methodology provided by Karakaplan and Kutlu (2017). xtsfkk provides estimators for the parameters of a linear model with a disturbance that is assumed to be a mixture of two components: a measure of inefficiency which is strictly nonnegative and a two-sided error term from a symmetric distribution. xtsfkk can handle endogenous variables in the frontier and/or the inefficiency, and the xtsfkk estimates outperform the standard xtfrontier estimates that ignore endogeneity. See Karakaplan and Kutlu (2017) for a detailed explanation of their methodology and empirical analyses.

+ Karakaplan, Mustafa U. and Kutlu, Levent (2017) "Endogeneity in Panel Stochastic Frontier Models." Applied Economics

If you use -xtsfkk- for your research, please make sure that you cite this paper in your research:

Karakaplan, Mustafa U. "Panel Stochastic Frontier Models with Endogeneity." The Stata Journal 22, no. 3 (2022): 643-663.

-xtsfkk- help file provides several examples and they can be viewed by typing the following command in Stata after installing the -xtsfkk- package:

Below is an example of an -xtsfkk- output:

Code:

ssc install xtsfkk

+ Karakaplan, Mustafa U. and Kutlu, Levent (2017) "Endogeneity in Panel Stochastic Frontier Models." Applied Economics

If you use -xtsfkk- for your research, please make sure that you cite this paper in your research:

Karakaplan, Mustafa U. "Panel Stochastic Frontier Models with Endogeneity." The Stata Journal 22, no. 3 (2022): 643-663.

-xtsfkk- help file provides several examples and they can be viewed by typing the following command in Stata after installing the -xtsfkk- package:

Code:

help xtsfkk

Code:

. use http://www.mukarakaplan.com/files/xtsfkkcost.dta, clear . xtset id t panel variable: id (unbalanced) time variable: t, 2011 to 2015, but with gaps delta: 1 unit . xtsfkk y x1 z1, cost u(z2) en(z1 z2) i(iv1 iv2) compare nicely timer header 4 Jan 2018 05:51:22 ENDOGENOUS PANEL STOCHASTIC COST FRONTIER MODEL (Model EN) Dependent Variable: y Frontier Variables: Constant x1 z1 U Variables: Constant z2 W Variable: Constant Endogenous Variables: z1 z2 Added Instruments: iv1 iv2 Exogenous Variables: iv1 iv2 x1 Panel Variable: id Time Variable: t initial: log likelihood = -1103.6189 rescale: log likelihood = -1103.6189 rescale eq: log likelihood = -1103.6189 Iteration 0: log likelihood = -1103.6189 Iteration 1: log likelihood = -1070.1439 (backed up) [...] Iteration 30: log likelihood = -782.62356 Analyzing the exogenous comparison model (Model EX)... initial: log likelihood = -588.8592 rescale: log likelihood = -588.8592 rescale eq: log likelihood = -588.8592 Iteration 0: log likelihood = -588.8592 [...] Iteration 19: log likelihood = -302.44416 Table: Estimation Results ---------------------------------------------------------------- Model EX Model EN ---------------------------------------------------------------- Dep.var: y Constant 0.391** (0.129) 0.295* (0.136) x1 0.136* (0.068) 0.494*** (0.092) z1 0.963*** (0.047) 0.746*** (0.097) ---------------------------------------------------------------- Dep.var: ln(σ²_u) Constant -0.544* (0.251) -0.945*** (0.215) z2 1.190*** (0.068) 1.131*** (0.063) ---------------------------------------------------------------- Dep.var: ln(σ²_v) Constant -1.503*** (0.097) ---------------------------------------------------------------- Dep.var: ln(σ²_w) Constant -1.918*** (0.094) ---------------------------------------------------------------- eta1 (z1) 0.421*** (0.109) eta2 (z2) 0.568*** (0.055) ---------------------------------------------------------------- eta Endogeneity Test X2=138.68 p=0.000 ---------------------------------------------------------------- Observations 300 300 Log Likelihood -302.44 -782.62 Mean Cost Efficiency 0.3625 0.4838 Median Cost Efficiency 0.3341 0.4976 ---------------------------------------------------------------- Notes: Standard errors are in parentheses. Asterisks indicate significance at the 0.1% (***), 1% (**) and 5% (*) levels. ---------------------------------------------------------------- Completed in 26 seconds.

## Comment