Abstract
This paper presents code for fitting a fiml endogenous switching poisson count model for cross-sectional data in stata 7: the espoisson command. the poisson process depends on an unobserved heterogeneity term, ξ; a set of explanatory variables, x; and an endogenous dummy, d. the endogenous dummy depends on an unobserved random term, ν. correlation between ξ and ν is allowed. if a model with exogenous d is fitted instead, correlation between ξ and ν will result in simultaneous equation bias. the endogenous switching model corrects this problem. after describing the underlying econometric theory behind the command, an example is discussed.
