Some procedures require that categoricals are processed in a particular order.
Mathematically, the order is irrelevant, however for reporting purposes it is
sometimes required. This change adds a level of indirection, so that the codes
are allocated in ascending order of the categorical variable.