0
$\begingroup$

Categorical variables in the ordered logit model.

Can I combine levels of variables like income together? If yes, what are the key factors to consider in deciding how to combine levels?

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes you can obviously combine different levels of a factor (categorical variable), this will help you control the dimensions of the dataset from growing big, thereby avoiding curse of dimensionality problem.

Coming to the How part, How you combine these level is problem specific. As I currently don't know which problem domain you are working on, some general methods of combining the levels will be,

  1. Combining the levels as low, medium and high incomes.
  2. Use pandas qcut function to bin different granular levels into one.
  3. Consult the domain expertise on how to combine them efficiently.

It is common to note that when we have different levels for a single factor, I usually see some 4-5 levels have majority of weightage as compared to other levels, (which may or may not be important). If you feel these levels to be less important, you can bin then under one single level.

$\endgroup$
2
  • $\begingroup$ I was wondering about job levels, if I combine less frequent levels together, then, for example, housekeepers and students go together in one category, how then I can interpret the results of the effects of different job categories? $\endgroup$
    – Samin Ba
    Commented Nov 11, 2021 at 9:29
  • $\begingroup$ Say for example, You have 1000 data points, Assume, for a categorical variable you have 10 different levels (doctors, engineers, housekeepers, students, freenlancers.... etc), Out of which 8 levels have 124 data points each. So, remaining data points would be 1000 - (8 * 124) = 6. Like you mentioned, if other two levels, housekeepers and students get 3 data points each, we can't infer any result or effect based on these scarce data. In such conditions combining the less frequent levels together can work, if you don't choose to drop them abruptly. $\endgroup$ Commented Nov 12, 2021 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.