Method of moments¶
The method of moments requires some additional parametric distributional assumptions. Following Kuosmanen et al. (2015), under the maintained assumptions of half-normal inefficiency (i.e., \(u_i \sim N^+(0, \sigma_u^2)\)) and normal noise (i.e., \(v_i \sim N(0, \sigma_v^2)\)), the second and third central moments of the composite error (i.e., \(\varepsilon_i\)) distribution are given by
The second and third central moments can be estimated by using the CNLS residuals (i.e., \(\hat{\varepsilon}_i^{CNLS}\))
Note that the third moment \(M_3\) (which measures the skewness of the distribution) only depends on the standard deviation parameter \(\sigma_u\) of the inefficiency distribution. Thus, given the estimated \(\hat{M}_3\) (which should be positive in the case of a cost frontier), we can estimate \(\sigma_u\) and \(\sigma_v\) by
Example: StoNED with CNLS [.ipynb]¶
# import packages
from pystoned import CNLS, StoNED
from pystoned.dataset import load_Finnish_electricity_firm
from pystoned.constant import CET_MULT, FUN_COST, RTS_VRS, RED_MOM
# import Finnish electricity distribution firms data
data = load_Finnish_electricity_firm(x_select=['Energy', 'Length', 'Customers'],
y_select=['TOTEX'])
# build and optimize the CNLS model
model = CNLS.CNLS(data.y, data.x, z=None, cet=CET_MULT, fun=FUN_COST, rts=RTS_VRS)
model.optimize('email@address')
# calculate and print unconditional expected inefficiency (mu)
rd = StoNED.StoNED(model)
print(rd.get_unconditional_expected_inefficiency(RED_MOM))