Bookmark and Share

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

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

st: 2SLS by hand with clustered standard errors

From   Anirban Mukherjee <>
Subject   st: 2SLS by hand with clustered standard errors
Date   Tue, 24 May 2011 12:55:52 +0800

Hi all,

Stata is not my native language, so I apologize if I this question has
been asked and answered. I searched but could either no decipher
previous replies to questions, or find a similar question.

The link below describes how do 2SLS "by hand" in a homo-skedastic model.

In the example, y2 is replaced by the instrumented y2, called y2hat.
Post estimation (regression) the analyst finds the correction factor
and multiplies that into the estimated variance-covariance matrix, to
get the correct variance-covariance matrix.

I was wondering: is there a way to do the equivalent of the last steps
in the page, where the analyst "corrects" the variance-covariance
matrix if using xtreg with errors clustered using a cluster_id. That
is: can we do 2SLS by hand with clustered standard errors? (I know
there isn't a simple correction factor in this case, as in the
homoskedastic case.)

Phrased differently, suppose the analyst has a y2hat which is the
instrumented analog of y2, and wishes to run xtreg with fixed effects
at a cluster_id, with standard errors clustered by cluster_id. What
would be the simplest way to estimate a fixed effects model using
y2hat, and then estimate the standard errors clustered by cluster_id,
using y2?

Thanks very much for any help, I do greatly appreciate the time and effort.

Best, Anirban
*   For searches and help try:

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