Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing constant coefficient when fixed effects used? #87

Open
jche713 opened this issue Feb 5, 2020 · 3 comments
Open

Missing constant coefficient when fixed effects used? #87

jche713 opened this issue Feb 5, 2020 · 3 comments

Comments

@jche713
Copy link

jche713 commented Feb 5, 2020

When fixed effect variables are included in the formula, the constant coefficient is no longer calculated and/or displayed in the regression results. Is there a way to adjust this so that the constant is also estimated?

Thanks

@eloualiche
Copy link
Member

Thanks a lot for your positive feedback on our ongoing project.
Maybe you could submit a pull request where the regression output also prints some well defined constant (outside of the fixed effects themselves).

@junder873
Copy link
Contributor

I was curious about this so I decided to do some checking. Stata's reghdfe just averages the fixed effects and sums those values. So, if the fixed effects are saved, then the intercept would be:
sum(mean.(skipmissing.(eachol(rr.fe))))

I think adding this is also necessary to solve #134 since to predict values where there is not a fixed effect, Stata uses the intercept.

@Melodyitian
Copy link

Sorry

Thanks a lot for your positive feedback on our ongoing project. Maybe you could submit a pull request where the regression output also prints some well defined constant (outside of the fixed effects themselves).

Sorry, how to submit a pull request to make the coefficient of constant show ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants