Home  /  Products  /  Features  /  Poisson regression with endogenous variables

<-  See Stata's other features

Highlights

  • Estimators

    • GMM: one-step, two-step, and iterated

    • Control function

  • Models

    • additiveevel

    • multiplicative

  • Robust SEs to relax distributional assumptions

  • Cluster–robust SEs for correlated data

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(b_0 + b_1\) horsepower \(+\;b_2\;x1 + b_3\;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)

Step 1
Iteration 0:   GMM criterion Q(b) =  .00004111  
Iteration 1:   GMM criterion Q(b) =  1.045e-06  
Iteration 2:   GMM criterion Q(b) =  1.036e-06  

Step 2
Iteration 0:   GMM criterion Q(b) =   .0002911  
Iteration 1:   GMM criterion Q(b) =  .00024685  
Iteration 2:   GMM criterion Q(b) =  .00024685

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 Coefficient 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                          Number of obs = 1,000
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.

Tell me more

See the manual entry.

Learn more about margins.