# Is going from continuous data to categorical always wrong?

When I read about how to setup your data, one thing I have often come across is that transforming some continuous data into categorical data is not a good idea, since you may very well make the wrong conclusion if the thresholds are poorly determined.

However, I currently have some data (PSA values for prostate cancer patients), where I think the common consensus is that if you are below 4 you probably don't have it, if you are above you are at risk, and then something like above 10 and 20, you probably have it. Something like that. In that case, would it still be incorrect to categorize my continuous PSA values into groups of let's say 0-4, 4-10, and >10 ? Or is it actually okay since the thresholds are "well determined" so to speak.

• It depends (as usual). For instance, if you are studying how physicians will make decisions, and they make decisions based on these categories, then it behooves you to use the same categories. If you are instead studying the biological consequences associated with elevated PSA, then most likely you do not want to categorize PSA at all. Thus, there is no definite answer to your broad question "is it okay."
– whuber
Commented Mar 13, 2019 at 15:12
• What are you trying to do with the data? Aren't boundaries like that usually related to what you want to figure out, so that putting them in by hand is begging the question? Commented Mar 13, 2019 at 15:37
• I am setting the data up for a logistic regression model. So the main question is actually whether to just use the continuous data, or have discrete data instead. Commented Mar 13, 2019 at 15:39
• It's not clear to me what 'continuous' data is. It's not something that exists in reality. There's no such thing as a measurement/statistic with infinite precision. Commented Mar 13, 2019 at 16:56
• @BillHorvath Yeah, I am not a doctor, so I am not totally sure how this has been determined. If you just take a look at the Wiki page it states one place: "PSA levels between 4 and 10 ng/mL (nanograms per milliliter) are considered to be suspicious and consideration should be given to confirming the abnormal PSA with a repeat test." and then another place: "Low-risk: PSA < 10, Gleason score ≤ 6, AND clinical stage ≤ T2a Intermediate-risk: PSA 10-20, Gleason score 7, OR clinical stage T2b/c High-risk: PSA > 20, Gleason score ≥ 8, OR clinical stage ≥ T3" Commented Mar 14, 2019 at 22:12

Is there a sharp discontinuity at your thresholds?

For instance, suppose you have two patients A and B with values 3.9 and 4.1, and another two patients C and D with values 6.7 and 6.9. Is the difference in the likelihood for cancer between A and B much larger than the corresponding difference between C and D?

If yes, then discretizing makes sense.

If not, then your thresholds may make sense in understanding your data, but they are not "well determined" in a statistically meaningful sense. Don't discretize. Instead, use your test scores "as-is", and if you suspect some kind of nonlinearity, use .

This is very much recommended.

• That link at the bottom is full of great points. Future readers of this answer should check it out. Commented Mar 13, 2019 at 13:47
• I think discretizing doesn't make sense unless there is the large jump in the outcome at the proposed break AND if the outcome is relatively homogenous within those groups. Otherwise, there are better ways to approach a "jump" in the function @Stephan Kolassa
– LSC
Commented Mar 13, 2019 at 22:38

I think the standard answer is it is always bad because you lose information in the process. It is hard to believe there is any case where you would gain anything from taking natural interval data and making it categorical.

• The appropriate situation would be where there is a true discontinuity in the relationship of that particular x with the DV and that within the "categories" the outcome is relatively homogeneous.
– LSC
Commented Mar 14, 2019 at 10:16