Just a short note to complement what Buzz says.
With -xtreg- you say that pupils within schools give you observations that
are not independent, and you model this explicitly as your "random effect"
or "fixed effect". There are some precise distributional assumption that
you are making about the correlation of pupils within schools (e.g., the
within-school correlation takes the same form for all schools, that each
pupil within a school is correlated equally with any other pupil in the
With -regress- and -cluster- you don't model this explicitly. Instead, you
allow for arbitrary correlation within schools, and the form of this
correlation can vary from school to school.
-xtreg- gives you more efficient estimates if your modelling of the
correlation caused by clustering is correct. If it isn't, your coeffs and
SEs are wrong.
-regress- with -cluster- gives you consistent estimates across a broad
range of possible forms of the correlation, but they won't be as efficient
as when you know the exact form (and you're right). (This is why your SEs
for -regress- are bigger.)
Hope this helps.
Quoting Buzz Burhans <email@example.com>:
> The "two approaches do the same thing" in the sense that they both
> for the lack of independence of pupils within schools, however, they
> provide different estimates for error. Remember two issues with
> this type
> of data...the pupils are not independent within school, i.e. pupils
> the same school are likely to be more similar that pupils form
> schools for all kinds of putative reasons such as socio-economic
> factors or
> school educational management factors , and this lack of
> within school engenders the need for a cluster approach whether by
> xtreg or
> the cluster option.
> Secondly, the "error" or noise associated with a fitted value for
> pupil contains at least two components, one for the unique noise
> with the pupil, and another for the noise due to variance between
> Regress with the (cluster) option relaxes the assumption of
> and therefore, compared with regress without the cluster option,
> the error term to accommodate the violation of the assumption that
> errors are independent, but leaves both the noise associated with
> differences between pupils and noise associated with differences
> schools in the error term. Xtreg is different. In the "random
> model, xtreg fits an additional parameter, the Ui term, or random
> term, which accounts for the differences between schools, thus the
> error term contains the "within school" variance between pupils, but
> between school portion (which remained in the regress model) is now
> and accounted for by the weighted "between" estimator, and thus the
> is reduced.
> Buzz Burhans
> At 01:16 PM 7/17/03 +0100, you wrote:
> >Dear all,
> >I am using a repeated cross-section of pupil-level data to regress
> >attainment on various characteristics. Since pupils are clustered
> >schools, I need to correct the standard errors for clustering at
> >I could adopt one of the following approaches:
> >regress Y X, cluster(school)
> >xtreg Y X, re (i=school)
> >So the first approach corrects standard errors by using the cluster
> >The second approach uses a random effects GLS approach.
> >I thought that the two approaches do the same thing and should give
> >same results. However, I find that the standard errors are alot
> >using the second approach.
> >Does anyone know how the two approaches differ from one another?
> >* For searches and help try:
> >* http://www.stata.com/support/faqs/res/findit.html
> >* http://www.stata.com/support/statalist/faq
> >* http://www.ats.ucla.edu/stat/stata/
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
Prof. Mark Schaffer
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3008
This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed. If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail. In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail. Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail. Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.
* For searches and help try: