<p>Using clustered standard errors in Stata doesn't impose any additional restrictions on your coefficient estimates. The coefficient estimates are independent of the <code>vce()</code> option you choose.</p>
<p>If you have reason to believe your standard errors should be clustered, it means you think that there is some association between the cluster variable and your outcome. If that's the case, then you should absolutely include the cluster variable in the regression itself, at least as a fixed effect. Typically, it's most efficient to do that using <a href="https://www.stata.com/manuals13/xtxtreg.pdf" rel="nofollow noreferrer"><code>xtreg</code></a> or<a href="https://www.stata.com/manuals13/rareg.pdf" rel="nofollow noreferrer"><code>areg</code></a>. Both allow the <code>vce(cluster clustvar)</code> option.</p>
<p>If you only include your cluster variable as a fixed effect, then you are implicitly assuming that the coefficients across clusters are the same but allowing for different intercepts - that's not a consequence of clustering the standard errors, but of the underlying parametric model. If you want to allow for varying coefficient estimates between clusters, you could include <a href="https://www.stata.com/manuals13/u25.pdf" rel="nofollow noreferrer">interactions</a> between your independent variables and your cluster variables.</p>

CC BY-SA 4.0
2020-12-31T13:36:37.660Z
Many thanks!! Lemme ask though, what are cluster variables? Like a dummy? Also,  only including a cluster variable as a fixed effect means that the clusters are in levels by assumption, right? Thus, different intercepts but the same slope? Lastly I guess I can then use the coefficients of the interaction terms to say something about differences in the slope coefficients for the three clusters.
Emmanuel Ameyaw
CC BY-SA 4.0
2020-12-31T18:58:12.060Z
The cluster variable is `C` in your question. It's typically categorical - think states, municipalities, firms, etc. And yes, using fixed effects alone provides for different intercepts but assumes the same slopes as you say. If you want to allow for different slopes, you can do that through interactions. The easiest way to do that, if you want to allow for every possible interaction, is the factorial `##` in Stata. Otherwise, you can call specific interactions using `#`. I included a link to that part of the Stata manual in the last paragraph of the answer.
Amaan M
CC BY-SA 4.0
2020-12-30T23:50:06.710Z
2020-12-30T23:50:06.710Z
Amaan M
<p>Using clustered standard errors assumes that the regression coefficients are the same for all the clusters in the data, right? What if they are not the same. For example, I have used F-test to compare regression coefficients across the 3 clusters in the plot below. The null is rejected that the regression coefficients are the same across the three regression models. So my intuition is that I cannot do something like &quot;regress A B, cluster(C)&quot;, for example in STATA, right?. Thus, I should do a regression for each cluster instead? I will read on clustered standard errors later, so a hint will help.</p>
<p><a href="https://i.sstatic.net/RpESs.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RpESs.png" alt="enter image description here" /></a></p>

<econometrics>
Is clustered standard errors the best way for all regressions that uses clustered data?
Emmanuel Ameyaw
# Is clustered standard errors the best way for all regressions that uses clustered data?

(Asked by: username_0 on 2020-12-23)

Using clustered standard errors assumes that the regression coefficients are the same for all the clusters in the data, right? What if they are not the same. For example, I have used F-test to compare regression coefficients across the 3 clusters in the plot below. The null is rejected that the regression coefficients are the same across the three regression models. So my intuition is that I cannot do something like "regress A B, cluster(C)", for example in STATA, right?. Thus, I should do a regression for each cluster instead? I will read on clustered standard errors later, so a hint will help.

[![enter image description here](https://i.sstatic.net/RpESs.png)](https://i.sstatic.net/RpESs.png)

**Tags:** econometrics

---

## 1 answers

### Answer by username_1 on 2020-12-30. Score: 1

Using clustered standard errors in Stata doesn't impose any additional restrictions on your coefficient estimates. The coefficient estimates are independent of the `vce()` option you choose.

If you have reason to believe your standard errors should be clustered, it means you think that there is some association between the cluster variable and your outcome. If that's the case, then you should absolutely include the cluster variable in the regression itself, at least as a fixed effect. Typically, it's most efficient to do that using [`xtreg`](https://www.stata.com/manuals13/xtxtreg.pdf) or[`areg`](https://www.stata.com/manuals13/rareg.pdf). Both allow the `vce(cluster clustvar)` option.

If you only include your cluster variable as a fixed effect, then you are implicitly assuming that the coefficients across clusters are the same but allowing for different intercepts - that's not a consequence of clustering the standard errors, but of the underlying parametric model. If you want to allow for varying coefficient estimates between clusters, you could include [interactions](https://www.stata.com/manuals13/u25.pdf) between your independent variables and your cluster variables.

> **Comments:**
> **username_0**: Many thanks!! Lemme ask though, what are cluster variables? Like a dummy? Also,  only including a cluster variable as a fixed effect means that the clusters are in levels by assumption, right? Thus, different intercepts but the same slope? Lastly I guess I can then use the coefficients of the interaction terms to say something about differences in the slope coefficients for the three clusters.  
> **username_1**: The cluster variable is `C` in your question. It's typically categorical - think states, municipalities, firms, etc. And yes, using fixed effects alone provides for different intercepts but assumes the same slopes as you say. If you want to allow for different slopes, you can do that through interactions. The easiest way to do that, if you want to allow for every possible interaction, is the factorial `##` in Stata. Otherwise, you can call specific interactions using `#`. I included a link to that part of the Stata manual in the last paragraph of the answer.  

---

