Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for equality of coefficients of 2 different regressions #23

Open
hangbh opened this issue Aug 5, 2019 · 0 comments
Open

Test for equality of coefficients of 2 different regressions #23

hangbh opened this issue Aug 5, 2019 · 0 comments

Comments

@hangbh
Copy link

hangbh commented Aug 5, 2019

Hi Sergio,
I'm using ivreghdfe to run 2 different regressions for 2 different samples. E.g.
ivreghdfe y d (x=z) if sample==1, absorb(a) cluster(clustervar)
ivreghdfe y d (x=z) if sample==2, absorb(a) cluster(clustervar)
After having the result, I want to test if the coefficients on the endogenous variable (e.g. x) of the two regressions are similar or not. I process according to what is written here https://www.stata.com/statalist/archive/2009-11/msg01485.html . i.e.
g d1=d*(sample==1)
g d2=d*(sample==2)
g x1=x*(sample==1)
g x2=x*(sample==2)
g z1=z*(sample==1)
g z2=z*(sample==2)
ivreghdfe y d? (x?=z?), absorb(a) cluster(clustervar)

But three problems occur:
i) Cluster: The cluster variable in the "stacked" regression should be sample. But in my original regression, the standard error is clustered at the clustervar level. How should I deal with the cluster in the "stacked" regression in this case? Can I do like the following:
egen clid=group(sample clustervar)
ivreghdfe y d? (x?=z?), absorb(a) cluster(clid)
ii) Fixed effect in the absorb option: do I need to generate a1=a*(sample==1) and a2=a*(sample==2), and use absorb(a?) instead of absorb(a) in the "stacked" regression?
iii) If I run the above "stacked" regression (i.e. ivreghdfe y d? (x?=z?), absorb(a) cluster(clustervar)), the coefficients on the endogenous variable for 2 different samples in the "stacked" regression are the same as the ones in the two original regressions, but the coefficients on the exogenous variable for 2 different samples in the "stacked" regression is different to the ones in the two original regressions. Did I make any mistake here?

I highly appreciate if you could reply to my questions.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant