Hello Statalists,
I know that there have been plenty of questions about the fixed effects model and I have tried to find an adequate solution for my specific question, but it seems like it is either that obvious so noone has asked it yet, or it is too specific. In particular I have two questions about the specification of my regression model. 1) Do I define the panel variable in the correct way and 2) Can I include my explanatory variables the way I did.
My data set is a panel data set containing observations for multiple firms across different industries for a time period of 8 consecutive years. Consistent with the literature in this field I used a fixed effects model with the following code:
xtset industry
xtreg y x1 x2 x3 ... i.year, fe vce(robust)
I would like to measure the effect of x on y for a company and I would like to control for industry fixed effects and year fixed effects as well. Stata is giving me no error message so I assumed everything is fine.
The problem is, I don't know if it is correct for me not to define a time variable in the xtset command and furthermore if it is correct to use industry as a panel variable. Is there a difference when I choose xtset companyID as a panel variable? Does Stata perform the the regression with the same sample? I only did the xtset industry command because the option ,fe would control for industry fixed effects that way, which is what I intended. If I would use for example:
xtset companyID year
xtreg y x1 x2 x3 ... i.year i.industry, robust
would that give me the same results?
The second question about the explanatory variables in the fixed effects model has to do with time invariant variables. Now I know that the fixed effects model excludes time invariant variables from the regression since it controls for those effects, but I wonder if this is the case when I have time invariant variables on company level and not on industry level (since the fixed effects are on industry level and not on company level). For example, one x variable is a dummy variable that is 1, if company i has foreign subsidiaries and 0 otherwise. In my data set, when a firm has foreign subsidiaries, they do so over the whole sample period, so this variable does not vary for company i across time. But it varies across companies and therefore across industries too. When I include fixed effects on company level, this variable wouldn't make any sense, I am aware of that, but since the fixed effects are on industry level, can I draw inferences from the coefficient? Stata again is not giving me an error, nor is Stata omitting these variables. The only omitted variable (that I can see in the output) is one from the year dummies, as it is supposed to. The industry fixed effects are not reported because of the ,fe option.
I would appreciate it if someone could clear things up for me a little and help me out.
Thank you very much in advance! Regards,
Daniel
I know that there have been plenty of questions about the fixed effects model and I have tried to find an adequate solution for my specific question, but it seems like it is either that obvious so noone has asked it yet, or it is too specific. In particular I have two questions about the specification of my regression model. 1) Do I define the panel variable in the correct way and 2) Can I include my explanatory variables the way I did.
My data set is a panel data set containing observations for multiple firms across different industries for a time period of 8 consecutive years. Consistent with the literature in this field I used a fixed effects model with the following code:
xtset industry
xtreg y x1 x2 x3 ... i.year, fe vce(robust)
I would like to measure the effect of x on y for a company and I would like to control for industry fixed effects and year fixed effects as well. Stata is giving me no error message so I assumed everything is fine.
The problem is, I don't know if it is correct for me not to define a time variable in the xtset command and furthermore if it is correct to use industry as a panel variable. Is there a difference when I choose xtset companyID as a panel variable? Does Stata perform the the regression with the same sample? I only did the xtset industry command because the option ,fe would control for industry fixed effects that way, which is what I intended. If I would use for example:
xtset companyID year
xtreg y x1 x2 x3 ... i.year i.industry, robust
would that give me the same results?
The second question about the explanatory variables in the fixed effects model has to do with time invariant variables. Now I know that the fixed effects model excludes time invariant variables from the regression since it controls for those effects, but I wonder if this is the case when I have time invariant variables on company level and not on industry level (since the fixed effects are on industry level and not on company level). For example, one x variable is a dummy variable that is 1, if company i has foreign subsidiaries and 0 otherwise. In my data set, when a firm has foreign subsidiaries, they do so over the whole sample period, so this variable does not vary for company i across time. But it varies across companies and therefore across industries too. When I include fixed effects on company level, this variable wouldn't make any sense, I am aware of that, but since the fixed effects are on industry level, can I draw inferences from the coefficient? Stata again is not giving me an error, nor is Stata omitting these variables. The only omitted variable (that I can see in the output) is one from the year dummies, as it is supposed to. The industry fixed effects are not reported because of the ,fe option.
I would appreciate it if someone could clear things up for me a little and help me out.
Thank you very much in advance! Regards,
Daniel
Comment