Hi,
I'm looking for something equivalent to -suest- that allows for two-way clustering.
In particular, I want to test the equality of the two regression coefficient across the same model but different samples. That in itself is not a problem -- the problem is that I want to use two-way clustered standard errors, and I have not found a solution for this.
Suppose I have one outcome y and one independent variable x, and I want to cluster on two variables: c1 and c2. In a perfect world, I would run the following code:
The problem is -suest- doesn't allow for two-way clustering, so I get the error message "cluster(): too many variables specified".
Does anyone have any suggestions of how I might proceed? This feels like a straightforward problem but I cannot figure out a solution. Thanks in advance.
Andrew (using Stata 15 on a Macbook Pro OS 10.14.6 Mojave)
I'm looking for something equivalent to -suest- that allows for two-way clustering.
In particular, I want to test the equality of the two regression coefficient across the same model but different samples. That in itself is not a problem -- the problem is that I want to use two-way clustered standard errors, and I have not found a solution for this.
Suppose I have one outcome y and one independent variable x, and I want to cluster on two variables: c1 and c2. In a perfect world, I would run the following code:
Code:
reg y x if sample1 == 1 estimate store e1 reg y x if sample2 == 1 estimate store e2 suest e1 e2, r cluster(c1 c2) test [e1_mean]x = [e2_mean]x
Does anyone have any suggestions of how I might proceed? This feels like a straightforward problem but I cannot figure out a solution. Thanks in advance.
Andrew (using Stata 15 on a Macbook Pro OS 10.14.6 Mojave)
Comment