I have a dataset in which the data are identified by state, county, and ZIP code - each of these is a different variable.
My problem is that some ZIP codes span over more than one county, so I need to be able to identfy which observation of the variable "ZIP: have different values on the variable "county". Fow example, below, I need to be able to identify that 00112 is a ZIP that has different values (1 and 2) on the variable "county", because it spans across two counties:
County - ZIP
1 - 00111
1 - 00112
2 - 00112
2 - 00113
2 - 00114
What code would allow me to do that for the entire dataset? Thank you in advance!
Related Posts with Identifying observations of var1 that have different values for var2
Analysing duplicatesHi guys, I need to analyse duplicates. I've got different newpaper articles. They all have a story_…
Binary probit or categorical probitDear community, In the first model I applied binary dependent and independent variables (see picture…
Errors when interpolating panel data using mipolateHello, Statalist, Long-time listener, first-time caller, here. I have panel data at the U.S. count…
Help Panel Var..can't get over this!!Hello guys, I don't know if someone will be so nice to help me with this, but I'm trying to get to …
Test overidentification when instrumenting xtivreg2 with predicted values of xtpoissonDear all I have two questions, one stata question and another econometric question. First the stat…
Subscribe to:
Post Comments (Atom)
0 Response to Identifying observations of var1 that have different values for var2
Post a Comment