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
convert 'n' rows of a variable to 'n' columnsHi, I would appreciate if I could get help with creating new variables from rows of an existing var…
Matching/merging Job seekers to job posts if they meet requirementsHello Everyone, Hope you all are well. I am looking to merge two datasets however, I want to match …
stteffects commandHello, I'm working on the survival analysis, using stteffects command (both LAC-IPWRA and WAC-IPWRA…
How could I handle the longitudinal (time-series) data? I provided an example below for an easy explanation for my question. I need to do survival anal…
Changing variable labels for multiple variables at the same timeHello, I'd like to change label variables. My data contains 100 variables with label started number…
Subscribe to:
Post Comments (Atom)
0 Response to Main effects of two independent variables across five groups
Post a Comment