Hi, I am new to SAS so maybe this is easy...but I don't think it is.
It is difficult to explain what I want so I will provide a model:
Cat1 Cat2 Cat3
1 6 1
1 7 2
1 3 4
2 6 3
2 5 5
3 6 4
3 2 5
3 7 6
3 4 2
Ok, I want to look at rows where the CAT 1 are equal, and
given a CAT1 number if there is a CAT 2 number equal to 6
AND a CAT2 number equal to 7 or 2 so long as the absolute value of the difference between the CAT3 number of the row with CAT2=6 and CAT2=7 or 2 is equal to 1.
OK so in this case, the following would be output:
Cat1 Cat2 Cat3
1 6 1
1 7 2
3 6 4
3 2 5
Um, Makes any sense??
Anyway. If you can help at all, I would be grateful!
It is difficult to explain what I want so I will provide a model:
Cat1 Cat2 Cat3
1 6 1
1 7 2
1 3 4
2 6 3
2 5 5
3 6 4
3 2 5
3 7 6
3 4 2
Ok, I want to look at rows where the CAT 1 are equal, and
given a CAT1 number if there is a CAT 2 number equal to 6
AND a CAT2 number equal to 7 or 2 so long as the absolute value of the difference between the CAT3 number of the row with CAT2=6 and CAT2=7 or 2 is equal to 1.
OK so in this case, the following would be output:
Cat1 Cat2 Cat3
1 6 1
1 7 2
3 6 4
3 2 5
Um, Makes any sense??
Anyway. If you can help at all, I would be grateful!