How to exclude redundant observations using specific subject ID numbers?

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

How to exclude redundant observations using specific subject ID numbers?

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.

 
 

Accepted Solutions
Solution
‎09-18-2017 12:25 PM
Respected Advisor
Posts: 3,157

Re: How to exclude redundant observations using specific subject ID numbers?

data step or Proc SQL,

 

where length(strip(subject_id))=6;

View solution in original post


All Replies
Solution
‎09-18-2017 12:25 PM
Respected Advisor
Posts: 3,157

Re: How to exclude redundant observations using specific subject ID numbers?

data step or Proc SQL,

 

where length(strip(subject_id))=6;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 144 views
  • 1 like
  • 2 in conversation