Hello,
i'm kinda new to stata and empirical research so sorry if this question is very basic.
1: So i have observations for different companies for different years. I have a dependent variable and several independent variables. I would like to include their industry aswell as the year in which the observations was recorded as a fixed variable.
To my understanding, one does that by going
xtset industry year
xtreg DV IV1 IV2...., fe
However i have repeated time values within this data so that doesnt work with xtset. Do i just do that by combining the industry and year into one variable and then doing the regression or do i miss something substantial?
egen industry_year = group(industry year)
xtset industry_year
xtreg DV IV1 IV2...., fe
2: As a regression result for Rsquared the overall score is used when doing xtreg, right?
3: In my mind, simply inserting the different years and industries as a dummy variable in the regression should yield the same result as in 1.
So just doing:
regress DV IV1 IV2..... year1 year2 year3.....industry1 industry2.....
should be the same as:
xtset industry_year
xtreg DV IV1 IV2...., fe
But doing so, i get a slightly different result. Why is that, or is my appraoch in 1 flawed?
Thank you in advance for your answer and sorry, if these questions are basic
Related Posts with Fixed effect regression questions
create v3 which shows number of v1 that share the same v2 valueHi, My dataset has 2 variables that I am interested in seeing the relationship between. v1 is 'uni…
coefplot plotting results from categorical variableDear all, I would like to use coefplot to compare the coefficients from different models and catego…
How do I create a new variable which counts number of variables that satisfy a given condition?Hallo Statalist, I am new here. I have a dataset of different towns with monthly temperatures over …
how to do instrument strength test for non-i.i.d error (more than one endogenous variables)Dear all, I wish to test instrument strength for the non-i.i.d error, and I have 3 endogenous varia…
Kleibergen Paap F statistic test in xtdpdgmmHi everyone, I'm currently working with xtdpdgmm for my thesis but I'm confused how to get Kleiberge…
Subscribe to:
Post Comments (Atom)
0 Response to Fixed effect regression questions
Post a Comment