Hello,

I've been following this forum for a while now and I have a question about my panel regression model.

I have panel data of 248 companies collected between 1995 and 2017. The number of observations is 2553.

I'm interested in running a panel regression by controlling time fixed and firm fixed effects. Accordingly, I set my companyno variable by using the following command:

Code:
xtset companyno year
and then I used following to run the regression:

Code:
xtreg y1 x1 x2 i.year, fe vce(cluster companyno)
By running this, I am controlling both fixed and time effects, right?

I know the R2 concept is not straightforward as it is in OLS but the study I'm following reported an adj. R2. So I used the command below to see my model's adj. R2:

Code:
ereturn list
It turned out that my R2 is 36% which is lower than I expected as the model includes both time and fixed effects.

When I sent my professor the results, he wanted to know about the adj. R2 when I do not use firm fixed effects (I guess he wanted to see the impact of fixed effects). I tried using the following:

Code:
xtset year
Code:
xtreg y1 x1 x2, fe vce(cluster companyno)
I got the error saying, "panels are not nested within clusters". Accordingly, I added "nonest" at the end of the command I got the results. However, I am not sure if the last step was correct.

I have two questions here:

1) The adj. R2 when I set the company as the panel variable and running regression by using time and firm fixed effects are different than I set the year as the panel variable and including both time and firm fixed effects? What is the reason for that?
2) Is there a clear way to include firm fixed and time fixed effects separately to get comparable R2s?

Thank you very much!