Say I want to model the income from people's age, and we know the effect of age is not continuous, despite it being a continuous variable, and an obvious thing to do is to categorize the age variable. So far people have been doing this by breaking at the quantiles or something, but is there a "best way" (by whatever sensible criteria) to automatically determine the best breakpoint?

  • 4
    $\begingroup$ In what sense is E(income|age) noncontinuous? Even with retirement, it's not like everyone retires on exactly their 65th birthday or something. (For individuals there are discrete jumps, of course, but if the notional population is not finite, that may not matter.) $\endgroup$ – Glen_b Aug 12 '16 at 8:31

"By whatever sensible criteria" is itself a sensible if casual remark, and the nub of the matter. Here my criterion, or rather attitude, is that we usually have broad ideas about a relationship but need to be sensitive to what the data can tell us. That implies above all not throwing away information unless we are certain that it is really noise. We also need to be mindful that other predictors lurk, even if they are not within our dataset.

Age is in practice often already categorised when reported in completed years. Even if exceptionally you know people's birthdays and have fine reporting of age it's not at all obvious that age should be further categorised for investigating its role as a predictor.

Income is well known to be typically skewed, so much so that working with log income is almost a default procedure in various fields.

For exploration I would tend to look at geometric mean or median of income for each reported age. The geometric mean naturally corresponds to the mean of the logarithms.

I doubt that the relationship between age and income is "not continuous". There might be kinks in the curve corresponding to key stages in an education system, e.g. those who stay the full course in high school and leave at 18, those who do a first degree and leave at 21 or 22, and so forth. If you see these effects, some kind of spline approach with key ages as specified knots may be appropriate. In practice, we all know that people can move faster or slower through any system, people can go "back to school" in later life, etc., all of which would fuzz out any effects of key ages.

But binning ages will at best muddy any underlying relationship. It's throwing away information.

In some fields, there is a widespread habit of quantile binning, e.g. using deciles to divide firms into the least successful 10%, and so on, up to the most successful 10%. I don't fully understand the motive for this as compared with smoothing approaches, but I note that with a variable like age, it is usually impossible to get exactly or even roughly equal frequencies, given ties in the data.

NOTE: Age within a year (i.e. time of year when someone was born) is sometimes argued to have an effect on people's careers. In many countries schooling starts once a child is old enough but only once a year, so with a new school year those children who passed a certain birthday within the last 12 months start school. Then children in the same class vary with age, with some almost a year older than others (and physically bigger and stronger, perhaps more confident, etc.). So even the fine detail could have an effect, at least on average. You might need a very large dataset to detect this effect, but that's not to say it doesn't exist.

| cite | improve this answer | |
  • $\begingroup$ Thanks for your comment and agree with most of what you are saying. My bad for giving out a somewhat controversial example (age and income) but I wasnt meant to solve this exact problem. I am really just looking for a matehamtical answer. For example something like a regression tree, if I am not mistaken, could do what I want. Having said that, I think the situation that I described should be quite common, right? Say if I want to model the cost of producing anything that has economic of scale, as a function of the production volume, then surely you need to categorize your volume information. $\endgroup$ – Wudanao Aug 13 '16 at 10:58
  • $\begingroup$ Economies of scale doesn't seem a more convincing example to me; otherwise if you want regression trees, you know where to find them. $\endgroup$ – Nick Cox Aug 13 '16 at 11:49

Your Answer

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

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