Bookmark and Share

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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: divergent ivpois and gmm results


From   "Dimitriy V. Masterov" <dvmaster@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: divergent ivpois and gmm results
Date   Fri, 28 Sep 2012 10:40:59 -0700

That worked very nicely both in the example data and my own. Thanks
for the help!

DVM

On Thu, Sep 27, 2012 at 8:20 PM, Tirthankar Chakravarty
<tirthankar.lists@gmail.com> wrote:
> You want to use the one-step GMM estimator using the -onestep- option
> to get comparable results to an IV estimator.
>
> T
>
> On Fri, Sep 28, 2012 at 8:15 AM, Dimitriy V. Masterov
> <dvmaster@gmail.com> wrote:
>> 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/
> *
> *   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/
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index