quickpred for unordered factors #348
LukasWallrich
started this conversation in
Ideas
Replies: 2 comments
-
Thanks for your suggestions.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks! I now wrote a version of the function that deals with unordered factors, initially just for my personal use: https://github.com/LukasWallrich/rNuggets/blob/master/R/mice_quickpred_extension.R - basically, it dummy codes those factors and tests whether any of the dummies exceeds mincor. If you think it would make sense to include that into mice, I'd be happy to create a PR - just let me know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to specify an efficient predictorMatrix for a model that includes categorical variables, and ran into some trouble with
quickpred()
Currently, quickpred converts factors without warning to their internal codes and then calculates correlations, which then leads to arbitrary output in the case of unordered factors. The documentation and vignettes do not specify how factors are handled, I only found the answer by looking at the code - should there be a warning? Also, does it make sense to use the second
mincor
criterion (correlation between value of predictor and missingness of target) to decide which variables to use to predict factors? If so, it would be great if that could be specified as an option to quickpred?Beta Was this translation helpful? Give feedback.
All reactions