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: Add support for predict with newdata argument #468

Open
s3alfisc opened this issue May 30, 2024 · 6 comments · May be fixed by #703
Open

Fepois: Add support for predict with newdata argument #468

s3alfisc opened this issue May 30, 2024 · 6 comments · May be fixed by #703
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@s3alfisc
Copy link
Member

Context

Currently, the newdata argument is disabled for Fepois.predict. Unfortunately, I do not recall why... 😅

To do

  • Enable the newdata argument for `Fepois.predict().
  • Clean up ValueError when trying to run Fepois.predict() with newdata in tests/test_errors.py.
  • Add unit tests to tests/test_vs_r::test_single_fit.
@s3alfisc s3alfisc added enhancement New feature or request good first issue Good for newcomers labels May 30, 2024
@leostimpfle
Copy link
Collaborator

Having had a look at #467 I think both this issue and #467 can be resolved in a single update.

I think it would be easiest to generalise the predict method of feols to always produce the linear predictor (link) and only handle the conversion to the non-linear predictor (response) in fepois.

@s3alfisc
Copy link
Member Author

s3alfisc commented Jul 7, 2024

Sounds like a good plan! I agree, it makes sense to only define the response prediction in Fepois. Should I then assign this issue to you as well?

@leostimpfle
Copy link
Collaborator

Yes, happy to take it on!

@s3alfisc
Copy link
Member Author

s3alfisc commented Nov 7, 2024

This can be close right @leostimpfle ?

@s3alfisc
Copy link
Member Author

s3alfisc commented Nov 7, 2024

Ah no, actually not. Still throws an error. But in principle we should be able to support it now I think

@leostimpfle
Copy link
Collaborator

Yes, it should work without fixed effects. After your recent bugfix in the calculation of fixed effects, it will hopefully straightforward to support predict with both newdata and fixed effects. I should have some time this weekend to look into it

@leostimpfle leostimpfle linked a pull request Nov 10, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants