I am trying to separate my data set into class strata using values of two variables: ShrUnitID and TimeIncrmnt. Specifically, I am trying to program SPSS to perform a recode of TimeIncrmnt on records to create a new variable (Class) if the values of ShrUnitID are within particular ranges. However, I cannot figure out how to write the code to recode for my middle ranges:
Range 1: 1 to 18 [successful]
Range 2: 20 to 25 (inclusive) & 36 to 38 (inclusive) [unsuccessful]
Range 3: 26 to 35 [inclusive]
I am able to get the first range recoded using the following:
DO IF (ShrUnitID <= 18).
RECODE TimeIncrmnt (CONVERT) ('0600 to 0900'=1) ('0900 to 1200'=1) ('1200 to 1500'=2) ('1500 to 1800'=3) ('1800 to 2100'=3) INTO CLASS.
However, I cannot figure out ask SPSS to use a range between two values. I've tried many different commands and configures, but to no avail. Does anyone know how to do this? Effectively, in plain language, this is what I'd like to do: DO IF the value of ShrUnitID is 26 or 35, or falls between the range of 26 to 35.