I have a data set in SAS and would like to compare variables from the same column.
Obs Subject Type Code Time
1 1001.01 Picture al 1409567
2 1001.01 Picture altl 1412637
3 1001.01 Response 2 1418426
4 1001.01 Picture ar 1429591
5 1001.01 Picture artr 1432527
6 1001.01 Response 1 1437545
For example if code = “al” followed by “altl” on the next line put a 1 in a new variable Valid. Sorry I’m just getting started with SAS.
Obs Subject Type Code Time
1 1001.01 Picture al 1409567
2 1001.01 Picture altl 1412637
3 1001.01 Response 2 1418426
4 1001.01 Picture ar 1429591
5 1001.01 Picture artr 1432527
6 1001.01 Response 1 1437545
For example if code = “al” followed by “altl” on the next line put a 1 in a new variable Valid. Sorry I’m just getting started with SAS.