# How to "correct for" a categorical variable on an outcome

I want to compare the outcomes of individual subjects. This outcome changes systematically depending on the subject's location (e.g. it will always be lower in a certain location). I want to be able to compare this metric across subjects in different locations (i.e. to be able to see if a subject in one location is better/worse than a subject in another location).

The only thing I've come up with is to group the subjects by location, standardise their outcomes as Z-scores in these subgroups, then use those scores as the "outcome" to compare. Is this sound?

Edit for more detail: The 'outcome' I'm looking at is a performance measure (think a KPI) that is calculated over a period of time (number of detections/items searched). It's not a change from baseline measures. This differs between locations because of more/less opportunity (fewer things to detect in some locations).

• Do you measure the subjects multiple times - for example at the start and end, in order to determine outcome ? Please provide more info about the study design and your research questions. Commented Aug 17, 2021 at 13:03
• Do you mean something like "Subject 1 in location A is one standard deviation about the mean of A, and subject 2 in location B is two standard deviations above the mean of location B, so subject 2 is doing better, despite the lower measurement"? (Think of having \$2 million now vs \$1 million a hundred years ago. The number of today's dollar is larger, but who is wealthier?)
– Dave
Commented Aug 17, 2021 at 13:33
• @Dave - yes, pretty much. The metric might be smaller for an individual in a certain location, but they are actually performing better than an individual at another location.
– Ella
Commented Aug 18, 2021 at 2:15
• @RobertLong - sorry, I've edited my post to be more clear. The 'outcome' I'm looking at is a performance measure (think a KPI) that is calculated over a period of time (number of detections/items searched). It's not a change from baseline measures. This differs between locations because of more/less opportunity (fewer things to detect in some locations).
– Ella
Commented Aug 18, 2021 at 2:15
• Then I repeat my question about the millionaires: who is wealthier? Why?
– Dave
Commented Aug 18, 2021 at 2:39