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

Fepois: More rigorous tests for separation #457

Closed
s3alfisc opened this issue May 30, 2024 · 5 comments
Closed

Fepois: More rigorous tests for separation #457

s3alfisc opened this issue May 30, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@s3alfisc
Copy link
Member

Context

In alignment with fixest, pyfixest currently only implements a very basic check for separation.

PyFixest currently implements the most basic separation check, which is equivalent to ppmlhdfe's separation(fe).

Ppmlhdfe implements three more separation checks; it would be nice if fepois() would support some of them.

For a primer on separation, see the primer on separation by the ppmlhdfe team.

To Do:

  • implement additional separation checks for the check_for_separation function.
  • Allow users to specify separation checks via the fepois and Fepois interfaces.
@s3alfisc s3alfisc added enhancement New feature or request good first issue Good for newcomers labels May 30, 2024
@s3alfisc s3alfisc changed the title Implement more rigorous tests for separation in Poisson Regression Fepois: More rigorous tests for separation May 30, 2024
@leostimpfle
Copy link
Collaborator

I'd be interested in working on this

@s3alfisc
Copy link
Member Author

s3alfisc commented Jun 7, 2024

Awesome, then I'll assign this issue to it. Maybe we could approach it one separation check at a time, with multiple PRs? This is just a suggestion, I am happy to follow your lead on how to structure the PR(s) =)

@leostimpfle
Copy link
Collaborator

leostimpfle commented Jun 7, 2024

Yes, seems sensible to do it method by method. I was thinking of initially focussing on ir (iterative rectifier) because it is recommended in combination with fe for regressions with many high-dimensional fixed effects.

@leostimpfle
Copy link
Collaborator

With #660 the user can specify separtion_checks for fepois. Currently, there are two checks implemented: the iterative rectifier ir and the original fe check.

ppmlhdfe implements two further methods:

  • simplex: does not handle separation arising from fixed effects (which is arguably pyfixest's main use case)
  • mu: a simple heuristic (if y=0 and exp(xb) is also very close to zero, then the observations are likely separated)

My understanding is that simplex is less relevant for pyfixest as it doesn't cover separation arising from fixed effects and that mu is a nice to have but much less powerful than the iterative rectifier.

Would it therefore make sense to close this issue and open two separate issues for the implementation of simplex and mu @s3alfisc ?

@s3alfisc
Copy link
Member Author

Yes, I think we can close this - I think with the two separation tests we have, we're actually covered really well =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants