I have two .dta files. The first contains three variables:
city - city name
county - the corresponding county name
zips - every zip code corresponding to the given city in a string format (for example: "92508 92503 92501 92505 92504 92507 92506 92502 92513 92514 92516 92517 92521 92522")
The second file simply contains one variable: zip_code (for example: "92505")
My aim is to create a variable in the second .dta file for county using the first .dta file. I can't think of a way to do so. Any advice?
**Note: I cannot use dataex for this post because the "data exceeds max linesize".
Related Posts with Searching one dataset for a variable within another data set
Create a chart to track changes of exectuive titlesHi Statalist, I want to create a chart to record the title changes of exectuives. For example, I w…
Extracting the year from a variable in stataHello, I probably have a very simple query but I can't work out how to solve it I have a variable en…
Loop over quarterly variables to find yearly meansHi Everyone, I'm quite new to Stata (version 17.0) and I'm having some trouble implementing a loop …
My nl equation has an error, please help!Hello everyone, I am trying to estimate the parameters a and c of a nonlinear equation. The nonline…
Summation using If condition to avoid negative valuesHello, I want to write a code that creates a value which is the summation of several rows. I have n…
Subscribe to:
Post Comments (Atom)
0 Response to Searching one dataset for a variable within another data set
Post a Comment