I have emissions data on c.1300 firms, over 10 years, across 27 EU countries. I am looking at the relationship between the EU's price of carbon (which is the same for all firms in all countries) and firm level emissions. I am using the EU's total emissions permit supply, which just varies over time (obviously not across individual firms and countries), as an IV for the carbon price. I am using a range of other controls, but for simplicity assume I am just using country level GDP (jt).

When using 'xtivreg lnCo2 GDP (PriceCarbon=EmAllow), fe', EmAllow is omitted from the first stage due to multicollinearity. Given that PriceCarbon just varies across time, and so does EmAllow, I suspect that using fixed effects removes EmAllow because there it doesn't vary across firms. In other words, you can't use a FE estimator when the independent variable does not have any variation across units.

However, when I manually run the first stage - xtreg PriceCarbon GDP EmAllow, fe - EmAllow is highly significant (t = 40) and not omitted.

Hence, my questions are twofold:

1) Why does the first stage omitt EmAllow when doing it manually doesn't? Is it because with 2SLS, it keeps the FEs and removes EmAllow, whereas the manual estimation removes the FEs instead?

2) If I do the first stage manually and then use predicted values for second stage, I get inconsistent standard errors. Can I a) manually specify the first stage within xtivreg, or b) manually run the first stage, and use an entirely different command to obtain the consistent standard errors?

Thanks in advance,

Harry