2
$\begingroup$

So I've read about imputation already, but what can I do when the data is categorical, where there is no mean or median?

For example, if the categories are Male/Female. Would assigning missing entries randomly be okay? Or should I just go with the most common gender in the sample?

$\endgroup$
  • 1
    $\begingroup$ Create a new categorical feature named "other"/"unknown" might be a good enough practice, since you are not losing any samples and not making any assumptions on features distribution. $\endgroup$ – yoav_aaa Jun 22 '17 at 7:35
  • 1
    $\begingroup$ Without further context an imputation model using a logistic regression model would deal fine with binary categorical variables, while a multinomial or ordinal regression could find replacement values for missing multilevel (>2 levels) or ordered multilevel variables respectively. If these models fit poorly or take a lot of computational time, permutative mean matching might be a quick option as well. Most importantly however, do not use single imputation strategies. These will incorrectly increase power, and might bias results (use multiple imputation or other techniques instead). $\endgroup$ – IWS Jun 22 '17 at 11:40
  • $\begingroup$ @IWS: By multiple imputation do you mean use multiple methods of imputation for the same variable? Do I just randomly assign imputation methods to data points? $\endgroup$ – Vic Jun 22 '17 at 16:07
  • 1
    $\begingroup$ I meant multiple imputation as according to Rubin (onlinelibrary.wiley.com/doi/10.1002/9780470316696.fmatter/pdf; sorry can't find a permanent link). I feel the basic idea is covered in my answer to this question stats.stackexchange.com/questions/257672/…. in short, the main advantage of multiple imputation is that you are able to take some uncertainty into account when replacing missing values with multiple other values. $\endgroup$ – IWS Jun 23 '17 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.