lrberge / fixest

Fixed-effects estimations
https://lrberge.github.io/fixest/
361 stars 59 forks source link

Retrieving constant term and it's SE #429

Open Garcese opened 11 months ago

Garcese commented 11 months ago

I'd like to suggest a feature. When including FEs in a feols() call, I'd like to include an option to include the constant term, and it's SE in the output. Right now, you'd have to take a regression reg and then reg$sumFE %>% mean() to recover the constant, which is fine, but it doesn't give the SE. You'd have to calculate that separately on your own, or what is probably easier, re-run the regression with all FEs as dummies in the main regression, mark down the t-value associated with the constant, and then use that and the result from reg$sumFE %>% mean() to calculate the SE, which is still a bit tedious.

It's not always necessary to need the constant term, but I find it quite helpful in a lot of scenarios, and it seems too difficult to recover it properly now. I've seen at least two stack exchange posts with people requesting a feature like this, so I believe its implementation would benefit at least a handful of people.

That being said, no rush, I'm a huge fan of the fixest package, and the last thing I want to do is demand changes!

Thanks.