help for gnbstrat                                                (Joseph Hilbe)

Generalized Negative Binomial with Endogenous Stratification

gnbstrat depvar [varlist] [if exp] [in range] [, lnalpha(varnames) offset(varname) exposure(varname) cluster(varname) level(#) from(asis) irr robust nolog maximize_options survey_options]

aweights, fweights, iweights, and pweights are allowed; see help weights.

gnbstrat provides access to all maximize options; see help maximize.

gnbstrat provides access to all survey options; see help svy.


gnbstrat fits a maximum-likelihood generalized negative binomial with endogenous stratification regression model of depvar on indepvars, where depvar is a nonnegative count variable > 0. lnalpha is parameterized by the predictors entered within its parentheses.

gnbstrat acccepts all of the help maximize options, the constraint() option, and all survey options and capabilities documented in [SVY]; including multi-level surveys; poststratification; and BRR, jackknife, and linearization VCE estimators.

This program uses ml lf method.


+-------+ ----+ Model +------------------------------------------------------------

offset(varname) specifies a varname in model with coefficient constrained to 1.

exposure(varname) specifies a ln(varname) in model with coefficient constrained to 1.

constraints(constraints) apply specified linear constraints.

+-----------+ ----+ SE/Robust +--------------------------------------------------------


robust specifies that the Huber/White/sandwich estimator of variance is to be used in place of the traditional calculation. robust combined with cluster() allows observations which are not independent within cluster (although they must be independent between clusters). If you specify pweights, robust is implied.

vce(options) allowed. vce() supports robust, opg, and native. vce does not support options bootstrap or jacknife, However, gnbstrat does support the bootstrap and jacknife commands, so these modeling capabilities are allowed.

+-----------+ ----+ Reporting +-------------------------------------------------------- level(#) specifies the confidence level, in percent, for confidence intervals of the coefficients; see help level.

nolog suppresses the iteration log.

+-------------+ ----+ max options +------------------------------------------------------

maximize_options: technique(algorithm_spec), [no]log, trace, hessian, gradient, showstep, shownrtolerance, difficult, iterate(#), tolerance(#), ltolerance(#), gtolerance(#), nrtolerance(#), nonrtolerance, from(init_specs); see maximize.

+-------------+ ----+ svy options +------------------------------------------------------

survey_options are all available. See help svy

Author and support

Joseph Hilbe, Arizona State University: jhilbe@aol.com


gnbstrat is a user authored program. Support is by author. gnbstrat was developed by Joseph Hilbe. Roberto Martinez-Espineira, Dept. of Economics, St. Francis Xavier Univ, Antigonish, Nova Scotia, Canada, provided the likelihood for the non-generalized model as well as the remarks found below. Both are working together on research involving this model.

gnbstrat simultaneously accommodates three features of on-site samples dealing with count data: overdispersion relative to the Poisson; truncation at zero, and endogenous stratification due to oversampling of frequent users of the site. Endogenous stratification occurs when the likelihood of sampling observations is dependent on a choice made by the subject of study which is in itself the dependent variable. For example, in recreational demand analysis, if an on-site survey is conducted, one is more likely to interview subjects who visit the site more times per week and ask how many times they visit, hence the endogeneity. Also patients who visit the doctor more frequently are also more likely to be sampled if the survey is conducted at the clinic, etc. Note: if the data are equidispersed but still truncated and endogenously stratified this model is equivalent to running poisson depvar-1 [varlist].

The lnalpha option provides an opportunity to parameterize the ancillary parameter by user specified predictors. If the parameterization option is not used, one should model with the nbstrat command instead.

gnbstrat requires a nonnegative count response, or any positive real number > 0. If the response has a value of zero, the algorithm will display an error message.

gnbstrat has not been available prior to this implementation and no literature exits related to research based on the parameterization of lnalpha for this model.


. gnbstrat los hmo white type2 type3, nolog irr

. gnbstrat los hmo white type2 type3, nolog lnalpha(hmo white type2 type3)

. bootstrap: gnbstrat los hmo white type2 type3, nolog irr lnalpha(hmo white type2 type3)

Also see

Reference: Shaw, D. (1988), On-Site Samples' Regression, J Econometrics 37, 211-223.

Reference: Englin, J. and J. Shonkwiler (1995a). Estimating social welfare using count data models: An application under conditions of endogenous stratification and truncation. Review of Economics and Statistics 77, 104-112.

Online: help gnbreg