How to choose the number of categories when transforming a numeric variable into a factor? Sorry if this is a basic question but I have not been able to find any meaningful answers so far. 
I have a numerical variable that I would like to convert into a factor, in order to do profiling and other things later on. My questions are, based on what criteria do I decide how many categories to create? Are there even any criteria?
Thanks a lot!
 A: The way I see it, there are several ways to look at it:
Because theoretical reasons, that's why - In most cases a theoretical reason is the only reason. Sometimes our raw data comes in a certain form that has no use or makes little sense to us. If the categories have more meaning than the numbers, use categories, and the number of categories will be the number of meaningful dividers +1:


*

*Age in years will be much more useful as categorical if we want to
compare pre-adolescents to adolescents to adults. If we want to
measure aggression, than we might not care about what happens between
ages 3-4, or 30-31.

*Years of schooling will be more helpful as categorical if we are
interested in the effect of a graduate degree on the probability of
finding a high-paying job. Here we want to know if graduating high
school has any proportional effect, not individual school years
(meaning that not all years carry the same weight)
Because our measurement is iffy - Sometimes we have a continuous variable that happens to have very few 'levels'. If such a variable has less than 5, it is oftentimes wise to use it as an ordinal variable instead. The flip-side are ordinal variables with 5 or more equidistant levels, that can be used as continuous (aka a Likert scale). It would be pointless to talk about how much each additional year of schooling adds to our wages, if our sample has only individuals with 12 or 13 years of school. Here you would create as many categories as you have levels in the original variable.
Because our results are not good enough - Although it happens more than you might think, when creating models, it is usually bad form to force a theory from a model, as the famous adage goes - "it all lies, terrible lies and statistics". Make sure that the want for better results, does not cause us to wiggle our data this way and that so we get them. The inference may very well be wrong. Although this happens, don't do it.
