Hi,
I have unbalanced panel data for 160 companies from 5 different subgroups (g1,g2,g3,g4,g5) where group id is defined by business activity type, over 14 years for which I run the following baseline regression: (CVs: additional 7 control variables, l: lagged variable, X1 and X2: continuous independent variables, Y: continuous dependent variable)
xtreg Y l.X1 l.X2 l.CVs i.year,r
I want to check if the main effects of X1 and X2 on Y vary across 5 groups where all are lagged except for Y. For that reason, I ran the following sample regression;
xtreg Y l.X1 l.X2 l.g2.l.g3.l.g4.l.g5 l.c.X1#l.i.g2 l.c.X1#l.i.g3 l.c.X1#l.i.g4 l.c.X1#l.i.g5 l.c.X2#l.i.g2 l.c.X2#l.i.g3 l.c.X2#l.i.g4 l.c.X2#l.i.g5 l.CVs i.year,r
5 times in a row by omitting one different group at a time (g1 is omitted in the first one above).
Is this the correct approach? How about dropping all g2,g3,g4,g5 observations and running the regression for g1 companies only (5 times in total keeping the observations of only one different group at a time)?
My second model is baseline + interaction between X1 and X2:
xtreg Y l.X1 l.X2 l.c.X1#l.c.X2 l.CVs i.year,r
Should I rerun the aforementioned 5 regressions again (this time the interaction included) to observe the differences in the main effects of X1 and X2 across groups as in the following (g1 is omitted):
xtreg Y l.X1 l.X2 l.c.X1#l.c.X2 l.g2.l.g3.l.g4.l.g5 l.c.X1#l.i.g2 l.c.X1#l.i.g3 l.c.X1#l.i.g4 l.c.X1#l.i.g5 l.c.X2#l.i.g2 l.c.X2#l.i.g3 l.c.X2#l.i.g4 l.c.X2#l.i.g5 l.c.X1#l.c.X2#l.i.g2 l.c.X1#l.c.X2#l.i.g3 l.c.X1#l.c.X2#l.i.g4 l.c.X1#l.c.X2#l.i.g5 l.CVs i.year,r
Best,
Lutfi
Related Posts with Main effects of two independent variables across five groups
Analyze a wrong code for drop all missing valuesif I want to drop any observation which contains at least one missing value for a variable. The code…
Goodness of fit in logitI am running a logit function, and am struggling with the goodness of fit question (or more accurate…
Lorenz CurveDear all, I tried estimating Lorenz curve with the command Lorenz HHEXP follow by Lorenz graph fo…
Inquire about "quietly histogram" Code: set rng kiss32 quietly set obs 30 set seed 10101 gen x=runiform() sum x quietly histogram x,…
PS matching and Difference-in-DifferencesDear all, I am facing some troubles in understanding which STATA command is best at estimating prop…
Subscribe to:
Post Comments (Atom)
0 Response to Main effects of two independent variables across five groups
Post a Comment