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

Imputation of categorical data #336

Open
sebastian-gerdes opened this issue Aug 14, 2023 · 2 comments
Open

Imputation of categorical data #336

sebastian-gerdes opened this issue Aug 14, 2023 · 2 comments

Comments

@sebastian-gerdes
Copy link

Hi there!

Thanks for the package. Am I missing something (I did search the help files) or does naniar not have functions for imputing categorical data?

If no methods for categorical data are available:

  • is there a reason not to include at least some basic methods?
  • would you consider including some basic methods if I send you a pull request?

Thanks for your time and best greetings,
Sebastian

@njtierney
Copy link
Owner

Hi there!

There is a very simple approach with fixed values, using impute_factor: https://naniar.njtierney.com/reference/impute_factor.html

However this is relatively simple, were you thinking of something more sophisticated?

Note that you can use impute_mode with an object that is a factor

https://naniar.njtierney.com/reference/impute_mode.html

Let me know what you think, I'd be happy to include more methods if you would like to submit a pull request :)

Cheers,

Nick

@sebastian-gerdes
Copy link
Author

Dear Nick,

thanks for your kind answer! 'impute_factor' is currently only in the development version of narnia, right?

I like the simplicity of impute_factor and impute_mode. However, in some situations it would be indeed nice to have more sophisticated methods in my opinion. So far I have neither contributed code to an open source project nor have I a good background on imputation methods, but I could try to change both ;-). I have put it on my to-do-list and I hope to be able to contribute in the not so distant future :-)

Cheers and best greetings,
Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants