>> Home >> Products >> Features >> Poisson regression with endogenous variables
Order Stata

Poisson regression with endogenous variables

Highlights

  • Estimators
    • GMM: one-step, two-step, and iterated
    • Control function
  • Models
    • additive
    • multiplicative
  • Robust SEs to relax distributional assumptions
  • Cluster–robust SEs for correlated data

Show me

ivpoisson fits a Poisson regression model (a.k.a. exponential conditional mean model) in which one or more of the regressors are endogenous. Poisson is frequently used to model count outcomes or to model nonnegative outcome variables.

Suppose we are modeling the number of automobile accidents involving young male drivers.

We will assume the number of accidents comes from a Poisson distribution with mean

	exp(b0 + b1 horsepower + b2 x1 + b3 x2)

In this artificial example, we will assume horsepower, in addition to having a direct effect, also reflects an underlying tendency for risky behavior. We will use x3 and x4 as measures of the tendency, though x3 and x4 might have nothing whatsoever to do with cars. We will use the full set of variables x1 through x4 as instruments for horsepower.

We will estimate our additive model using the efficient two-step GMM. We type

. ivpoisson gmm accidents x1 x2 (horsepower = x3 x4)

Exponential mean model with endogenous regressors

Number of parameters =   4                         Number of obs  =            1,000
Number of moments    =   5
Initial weight matrix: Unadjusted
GMM weight matrix:     Robust


Robust
accidents Coef. Std. Err. z P>|z| [95% Conf. Interval]
horsepower .0077525 .0010175 7.62 0.000 .0057582 .0097467
x1 .1952001 .0068223 28.61 0.000 .1818286 .2085716
x2 .1374668 .0064702 21.25 0.000 .1247854 .1501483
_cons -1.861607 .0108662 -171.32 0.000 -1.882904 -1.840309
Instrumented: horsepower Instruments: x1 x2 x3 x4

To understand the impact of pure horsepower (holding underlying risky behavior constant) on our young males, we will use Stata's margins to estimate the expected number of accidents using observed horsepower and the expected number of accidents from giving each car 50 more units of horsepower:

. margins, at((asobserved)) at(horsepower=generate(horsepower +50))

Predictive margins                              Number of obs     =         1,000
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : (asobserved)

2._at        : horsepower      = horsepower +50

Delta-method
Margin Std. Err. z P>|z| [95% Conf. Interval]
_at
1 .2582595 .0020218 127.74 0.000 .2542969 .2622222
2 .3805387 .0196401 19.38 0.000 .3420448 .4190326

We find that the expected number of accidents using observed horsepower is 0.26 and that it increases to 0.38 if each car produces 50 more horsepower.

We can compute the effect of the 50-horsepower increases by contrasting these two estimates:

. margins, at((asobserved)) at(horsepower=generate(horsepower +50))
            contrast(at(r._at))

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : (asobserved)

2._at        : horsepower      = horsepower +50

df chi2 P>chi2
_at 1 39.73 0.0000
 
 
Delta-method
Contrast Std. Err. [95% Conf. Interval]
_at
(2 vs 1) .1222792 .0194003 .0842553 .1603031

We find that increasing horsepower by 50 increases the expected number of accidents per young man by 0.12 on average. (This Poisson model is nonlinear, so the amount of increase varies across young men.)

The above results would be of interest to insurance companies that want to judge the effect of increasing the horsepower of modern cars.

Show me more

See the manual entry.

To learn more about margins, see its manual entry.

Stata

Shop

Support

Company


The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ YouTube
© Copyright 1996–2016 StataCorp LP   •   Terms of use   •   Privacy   •   Contact us