Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: m:m merge using zip codes

From   Bryan Stuart <>
Subject   st: m:m merge using zip codes
Date   Mon, 11 Jun 2012 11:45:22 -0400


I have two data sets. In one, each row represents a prison. Each prison has
a zip code, but there exist some zip codes with multiple prisons. The other
data set (from geocorr) maps zip codes into PUMAs. Some zip codes map into
multiple PUMAs. Ultimately, I want to connect each prison to a PUMA. Zip
codes are not unique identifiers in either data set.

An m:m merge is undesirable here because it isn't consistent. Simply
appending the datasets together (and then filling in the missing columns)
isn't ideal either, as some prison zip codes are not in the geocorr dataset
(because they are located in rural areas, the Census Bureau doesn't assign
zip codes to some areas).

Any ideas on how to combine these datasets? Thanks!

Bryan Stuart
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index