Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: matching data

From   Reka Sundaram-Stukel <>
Subject   st: matching data
Date   Tue, 8 Apr 2003 09:10:53 -0500

Dear Statalist,

I am interested in matching names in two datasets. For example,

each household head has:

N1 N2 N3
First name Second name Middle name

I need to create a variable that does the following

gen check=0

if 'N1' in 'data set A' == 'N1' in 'dataset B'
and if 'N2' in 'data set A' == 'N2' in 'dataset B'
and if 'N3' in 'data set A' == 'N3' in 'dataset B'

replace gen check=1

I have tried merge by matching but I don't think that works. I think what I need is a command like VLOOKUP (excel) in stata.

any suggestions?

Reka Sundaram-Stukel
Agriculture And Applied Economics
320 Taylor Hall

* For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index