Hi everyone
I would like to test if two coefficients are significantly different from each other. I know the ttest function in stata but it does not work in case the coefficients are coming from different regressions (as far as I know).
In fact, I run twice the same regression but with different subsamples. Let's assume DV is the dependent variable and IV stands for the independent variable. C is the condition which splits the sample into two subsamples.
The regressions look as follows ("a" and "b" are just added to easier differentiate it):
(a) areg DVa IV1a IV2a IV3a ... IV11a IV12a i.year, absorb(company) cluster(company), if C==1
(b) areg DVb IV1b IV2b IV3b ... IV11b IV12b i.year, absorb(company) cluster(company), if C==0
I want to test if the coefficient of the first regression _b[IV2a] is significantly different from the coefficient of the second regression _b[IV2b].
(For the sake of completeness:IV2 is an interaction term where one of the variables is a dummy variable. I have panel data and cluster by company)
My intention was to test if 0=_b[IV2a] - _b[IV2b]. But this does not work as I would need to run both regressions at the same time that both coefficients are in the memory of stata.
Have anyone got an idea what I could do instead?
Thanks a lot for your help,
Laura
I would like to test if two coefficients are significantly different from each other. I know the ttest function in stata but it does not work in case the coefficients are coming from different regressions (as far as I know).
In fact, I run twice the same regression but with different subsamples. Let's assume DV is the dependent variable and IV stands for the independent variable. C is the condition which splits the sample into two subsamples.
The regressions look as follows ("a" and "b" are just added to easier differentiate it):
(a) areg DVa IV1a IV2a IV3a ... IV11a IV12a i.year, absorb(company) cluster(company), if C==1
(b) areg DVb IV1b IV2b IV3b ... IV11b IV12b i.year, absorb(company) cluster(company), if C==0
I want to test if the coefficient of the first regression _b[IV2a] is significantly different from the coefficient of the second regression _b[IV2b].
(For the sake of completeness:IV2 is an interaction term where one of the variables is a dummy variable. I have panel data and cluster by company)
My intention was to test if 0=_b[IV2a] - _b[IV2b]. But this does not work as I would need to run both regressions at the same time that both coefficients are in the memory of stata.
Have anyone got an idea what I could do instead?
Thanks a lot for your help,
Laura
Comment