I have an independent variable “State in the US” and it has around 16 different levels (PA, NY, NJ, etc). Now I have combined the states which appear infrequently into "others" category. But I still have around 12 levels which are equally populated.
I have a very large data set (1 million observations) and no zero cell issues with the variables.
Questions:
- I would like to know if there was a limit on the number of levels a categorical variable can have when used with logistic regression. If yes, why is it the case?
- And what is the best way to bin categorical variables like Zip code or occupation code, apart from binning similar levels together?