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

Adding and offset option for 0s and 1s when using the step_logit() #784

Closed
czopluoglu opened this issue Sep 8, 2021 · 1 comment · Fixed by #795
Closed

Adding and offset option for 0s and 1s when using the step_logit() #784

czopluoglu opened this issue Sep 8, 2021 · 1 comment · Fixed by #795
Labels
feature a feature request or enhancement

Comments

@czopluoglu
Copy link

For logit transformation of values between 0 and 1, it may be a good idea to have an option to add/subtract a number (e.g., .0001) to 0s/1s to avoid -Inf/Inf.

This is something similar to the offset argument of step_log.

For instance,

step_logit(x, offset=0.0001)

first searches for 0s and 1s in variable x and adds/subtracts 0.0001, then applies the logit transformation.

@juliasilge juliasilge added the feature a feature request or enhancement label Sep 8, 2021
topepo added a commit that referenced this issue Sep 14, 2021
topepo added a commit that referenced this issue Sep 14, 2021
@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants