Find mismatches in one variable based on another variable

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

wtrfilesx
Posts: 6
Joined: Mon Jun 11, 2012 3:51 pm

Find mismatches in one variable based on another variable

Postby wtrfilesx » Mon Jun 11, 2012 3:59 pm

I have a dataset in which multiple rows correspond to the same individual. For validation purposes, I want to look at all the duplicate rows of data for each individual, and make sure that they all have matching ID numbers.

Is it possible to match rows based on Name, and then identify the ones that have different IDs within the various rows?

For example, say the dataset contained the following rows:

1. John Smith #212
2. John Smith #212
3. John Smith # 212
4. Jane Doe #202
5. Jane Doe #210
6. Jane Doe #202
7. John Doe #200
8. John Doe #200

In this example, I would want to find out that Jane Doe has 2 different ID numbers. Since both John Smith and John Doe have matching IDs throughout their rows of data, I want to ignore their records. Is there any way to accomplish this other than manually reviewing the dataset (since I have nearly 600,000 rows of data)? Thank you for your assistance!

Tina
Penguin_Knight
Posts: 473
Joined: Thu Apr 05, 2012 5:58 pm

Re: Find mismatches in one variable based on another variabl

Postby Penguin_Knight » Mon Jun 11, 2012 11:09 pm

Since the mean of ID will be difference if one of the serial id within a person is off, you may try aggregating the mean as a new variable, and then flag the cases that are different. Suppose you name is a string variable called name and your id number is a numeric variable called id. Here is the syntax:

Code: Select all

AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=name
  /mean_id=MEAN(id).

COMPUTE MultiID = (id NE mean_id) .
EXECUTE .
AOrigope
Posts: 21
Joined: Fri Apr 21, 2017 7:49 am

viagra lady 2017

Postby AOrigope » Fri Apr 21, 2017 8:07 am

where to buy viagra online in australia <a href="http://usa-best-store.com/#erectile-dysfunction-injection-therapy">100mg sildenafil tablets</a>
best-store-usa.com heb pharmacy waco tx
AOrigope
Posts: 21
Joined: Fri Apr 21, 2017 7:49 am

humana mail order pharmacy 2017

Postby AOrigope » Fri Apr 21, 2017 8:10 am

rite aid pharmacy bakersfield ca <a href="http://safe-store-usa.com/#what-will-happen-if-a-girl-took-viagra">best place to buy viagra online forum</a>
best-store-usa.com heb pharmacy waco tx

Who is online

Users browsing this forum: No registered users and 1 guest

cron