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

Should we make bias_correction argument visible #421

Open
strengejacke opened this issue Feb 23, 2025 · 6 comments
Open

Should we make bias_correction argument visible #421

strengejacke opened this issue Feb 23, 2025 · 6 comments
Labels
What's your opinion 🙉 Collectively discuss something
Milestone

Comments

@strengejacke
Copy link
Member

No description provided.

@strengejacke strengejacke added the What's your opinion 🙉 Collectively discuss something label Feb 23, 2025
@strengejacke strengejacke added this to the 1.0.0 milestone Feb 23, 2025
@DominiqueMakowski
Copy link
Member

Can you add context

@strengejacke
Copy link
Member Author

See this comment: #398 (comment)

For predictions from GLMs, we either have accurate estimates, or accurate SEs, but often not both (in your example, CIs exceed the plausible bounds).

If we add the argument bias_correction = TRUE, we have correct bounds for CIs (same we would get if we use predict = "inverse_link"), and a corrected estimate (as if we would use predict = "response").

However, the argument bias_correction, despite fully implemented, is not yet documented. It's a "user-hidden" option at the moment.

@DominiqueMakowski
Copy link
Member

I see, thanks!

  • I would say to make it default then
  • For the name, I think bias_correction its fine.
  • About exposing it, we could note in the details section that we implement a bias correction which might make the results slightly differ from marginaleffects, and that this can be turned off by setting the parameter. But I would say, there is no need to expose it as an argument given that the vast majority of our userbase will (probably) be happy with the default? (no strong opinion here though if we feel like the bias correction is somewhat debatable or non-consensual, happy to have it exposed too)

@strengejacke
Copy link
Member Author

There's just one argument against making it the default. bias_correction required defining a sigma value, i.e. a residual standard error - which is not straightforward for mixed models. That's why this argument is also not the default in emmeans, and for mixed models, we rely on insight::get_variance() (which may slow down the computation of the bias correction). I personally would advice against making it the default, at least not now, to gain some experience how bias correction works in different settings.

@strengejacke
Copy link
Member Author

We could probably add a small vignette showing the differences, based on my comment, and then see how we handle this in the future?

@DominiqueMakowski
Copy link
Member

Fair point, yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
What's your opinion 🙉 Collectively discuss something
Projects
None yet
Development

No branches or pull requests

2 participants