asCategorical function

Convert a normal (Gaussian) trait to an ordered categorical (threshold) trait