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
Renaming local contentsHi all, I am performing the following loop: Code: foreach rec of local recall { tokenize `rec…
I would like to merge two databases but I can not merge firms with two ISINI use a database in which firms have sometimes two International Securities Identification Number (I…
GrowthHi, I have an unbalanced panel data with id year (1997-2003) and I would like to calculate the growt…
Comparing fixed effects coefficients for several dependent variableDear all, I have estimated a fixed effect panel regression model for several dependent variable in m…
Intercept-Only regression with an interaction term - What does it mean?If I estimate an intercept only model in Stata reg c.y I get an estimate of a constant that shows …
Subscribe to:
Post Comments (Atom)
0 Response to Identifying observations of var1 that have different values for var2
Post a Comment