Supplemental Material

Applying the GLM variance assumption to overcome the scale-dependence of the Negative Binomial QGPML estimator (with Hervé Boulhol), Econometric Reviews, vol. 33(7), pp. 772-784 (2014)

Stata code for the scale-invariant Negative Binomial Quasi-Generalised Pseudo-Maximum Likelihood Estimators based on the GLM variance assumption: the specifications regress non-negative dependent variables (in levels, not in logs) on independent variables specified in "RHS".

OLS:

global RHS = "x"

poisson y $RHS, robust predict mhat gen uhatsq = (y-mhat)^2 gen mhatsq = mhat^2 reg uhatsq mhat mhatsq, nocons scalar etasq = _b[mhatsq]/_b[mhat] drop mhatsq mhat uhatsq global a=etasq glm y $RHS, family(nbinomial $a) robust

WLS:

global RHS = "x"

poisson y $RHS, robust predict mhat gen uhatsq = (y-mhat)^2 gen utildsq = uhatsq/mhat reg utildsq mhat scalar etasq = _b[mhat]/_b[_cons] drop utildsq mhat uhatsq global a=etasq glm y $RHS, family(nbinomial $a) robust