Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: divergent ivpois and gmm results

 From "Dimitriy V. Masterov" To statalist@hsphsun2.harvard.edu Subject st: divergent ivpois and gmm results Date Thu, 27 Sep 2012 19:45:28 -0700

```I am trying to replicate the output of Austin Nichols -ivpois- command
with the gmm command so that I can see if robust errors make a
difference for my analysis. I found that in simple specifications,
ivpois and my gmm command yield virtually identical estimates of the
coefficients and their errors, especially if I used the simple non-IV
poisson model for the initial values. However, when I added more
variables, the estimates began to diverge drastically even where there
did not seem to be any problems with the iterations. If I added two or
three more variables, my gmm command would get stuck, while ivpois
would finish without any issues.

I managed to replicate the first problem with one of the three example
data sets. The other two seem to work perfectly.

Here's my code:

#delimit;
use http://fmwww.bc.edu/RePEc/bocode/i/ivp_cig.dta, clear;
loc x "pcigs79 rest79 income age qage educ qeduc famsize white";
loc z "ageeduc cage ceduc pcigs78 restock";loc y "cigpacks";loc e "k210";
ivpois `y' `x', endog(`e') exog(`z');

/* Get Initial Values From Simple Poisson */
qui poisson `y' `x' `e' if e(sample), nolog;
mat b=e(b);
gmm (`y' * exp(-{xb: `x' `e'}-{b0})-1), instruments(`x' `z') from(b);

For example, the coefficient on white is pretty different across the
two models: -.0312757 in ivpois versus -.0902521 with my gmm.

If anyone has any idea what I am doing wrong, I would be very grateful.

DVM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```