Re: Use of Clusters [message #11505 is a reply to message #11489] |
Tue, 03 January 2017 19:01 |
Reduced-For(u)m
Messages: 292 Registered: March 2013
|
Senior Member |
|
|
If you use Stata, you can just:
egen ClusterX = mean(X), by(cluster)
And then include "ClusterX" as a variable in your regressions.
I'm sure there is very similar code for creating sub-group means in other programs too. And there are some inference (p-value) issues down the road, but if you cluster your regressions at the level of your clustered X, you should be fine. Unless I missed something...
|
|
|