We have two data entry personnels to enter the questionnaire data. So each of the study subject for each variable has two observations entered by the two data entry persons and one final observation, which was audited by the 3rd person. How do I delete the first two observations and just keep the 3rd observation?
Subject_id
01-001--1 (want to delete this entered by the first data entry person)
01-001--2 (want to delete this entered by the second data entry person)
01-001 (want to keep this in the final dataset)
01-002--1 (want to delete this entered by the first data entry person)
01-002--2 (want to delete this entered by the second data entry person)
01-002 (want to keep this in the final dataset)
01-003--1 (want to delete this entered by the first data entry person)
01-003--2 (want to delete this entered by the second data entry person)
01-003 (want to keep this in the final dataset)
same thing for the rest of 120 study subjects. etc.
How do I remove the subject ID numbers with "--1" and "--2"? Thank you all.
data step or Proc SQL,
where length(strip(subject_id))=6;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.