Page 1 of 1
Compare regression coefficents across 3 (or more) sub-groups
Posted: Wed Oct 06, 2010 9:55 am
by cmd41
I posted this question a while ago and unfortunately I received no response. So I guess I failed to explain my question clearly. Hope I can make it better this time.
In an unbalanced dated panel, I sub-divide my sample into 3 sub-groups (categorized by, say, SIZE, which could be either 1, 2 or 3).
In each of the sub-group, I run the same regression, say: equation e.ls y c x
I find that the coeffcient on x when the sample is set to SIZE=1 is much larger than when SIZE=3
My question is: How to test whether the difference is statistically significant?
Thank you very much for any help!
Chau
Re: Compare regression coefficents across 3 (or more) sub-groups
Posted: Wed Oct 06, 2010 10:33 am
by startz
I posted this question a while ago and unfortunately I received no response. So I guess I failed to explain my question clearly. Hope I can make it better this time.
In an unbalanced dated panel, I sub-divide my sample into 3 sub-groups (categorized by, say, SIZE, which could be either 1, 2 or 3).
In each of the sub-group, I run the same regression, say: equation e.ls y c x
I find that the coeffcient on x when the sample is set to SIZE=1 is much larger than when SIZE=3
My question is: How to test whether the difference is statistically significant?
Thank you very much for any help!
Chau
Run this regression on
all the data.
Code: Select all
eq. ls y c size=1 size=2 X (size=2)*x (size=3)*x
The last coefficient tells you the difference between the effect for group 3 and group 1.
Re: Compare regression coefficents across 3 (or more) sub-groups
Posted: Fri Oct 08, 2010 2:46 am
by cmd41
Thank you very much Startz. You answer really helps, as usual.
Re: Compare regression coefficents across 3 (or more) sub-groups
Posted: Fri Oct 08, 2010 3:40 am
by cmd41
Sorry for this messing around, but I have one more enquiry. Startz's solution is OK, but when I add fixed time and fixed cross-section effect and require the coefficient covariance clustered by period, there seems to be a problem.
Specifically, when I run the following equation in the whole sample:
smpl @all
equation e.ls(cx=f,per=f,cov=perwhite) y c size=1 size=2 X (size=2)*x (size=3)*x (1)
The coefficient on X in (1) is not the same as the coefficient on X when I run equation (2) below in a sub-sample of observations with size=1:
smpl @all if size=1
equation e.ls(cx=f,per=f,cov=perwhite) y c x (2)
(I checked and can confirm that if I use the normal least square without fixed effects and clustered errors, the coefficients on X in (1) and (2) are equal)
My question is: with fixed effects and clustered errors, can I still use the coefficient on (size=3)*x in equation (1) to test the difference between the coefficient on X when the sample is set to size=1 versus when size=3?
(I notice that the coefficient on (size=3)*x in equation (1) is not equal to the difference between the coefficients on X when I run (2) when the sample is size=1 and size=3 separately)
Thank you very much for any further help.
Chau