Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: GMM bug when clustering on string var


From   rraciborski@stata.com
To   statalist@hsphsun2.harvard.edu
Subject   st: GMM bug when clustering on string var
Date   Thu, 07 Jul 2011 16:20:23 -0500

Julian Reif <jreif@uchicago.edu> pointed out that -gmm- with a string
cluster variable produces incorrect standard errors.

This problem will be fixed in a future update. For the time being, Julian
should use a numeric variable that encodes the clusters as he did in his
examples.

Here are some details drawn from his examples that illustrate the exact
problem and the work around.

Julian considered a regression of -y- on -x-. He defined -string_i- to be
the string variable with the cluster information, and -i- to be a numeric
variable with the same cluster information.  Julian then showed that

> gmm (y - {b1}*x1 - {b0}), instruments(x1) onestep vce(cluster i)

produced correct standard errors while

> gmm (y - {b1}*x1 - {b0}), instruments(x1) onestep vce(cluster string_i)

did not.

--Rafal
rraciborski@stata.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index