To decide the range of a variable into intervals, and to then code the values of the variable according to which interval they fall into, use the cut command.