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
Dependent variable is a constant error, when it is not. #84
Comments
Hi @perodmar, the problem (I think) is that for some of the 2x2s, your outcome variable is constant |
Ok, I see. That would make sense. @kylebutts is there a way to either 1) drop those comparisons or 2) force the estimation? If you do not have variation on outcomes then that coefficient would still be 0. |
@perodmar Probably not an easy way to do this within the package. Almost always, this should be a true error that someone accidentally passed a constant variable as the outcome (your case being the exception). However, the code is not too complicated without covariates, I'm sure you could copy the few functions and change it to how you need it. I think putting a Sorry I can't be of more help! |
No worries! I'll look through the code. Hopefully someone can figure it out in the meantime...Thanks for the help @kylebutts. |
Hi, I met the same error when I added the control variable, did you figure out how to fix this problem? I changed other control variables, it still reported this error... @perodmar |
First, thank you for the great work with the package and adopting feols. Really useful!
I am trying to use the bacon function but I keep getting the error that the dependent variable is a constant, when it is not:
I assume it has to do with the fact that I have lots of zeros, but around 5% are non-zeros:
It seems to be a bacon function error since it runs smoothly when I use feols directly:
Thank you!
The text was updated successfully, but these errors were encountered: