I have a panel data. I want to assign a unique ID to each county within each state. For example, for all county within Maryland state, I want to generate a unique county ID (Baltimore: 1, Prince George: 2, and so on). Similarly, each county within New York State will have a separate ID (Queens: 1, Rockland: 2, and so on). I want to do this for each states in the US. Can I use the "foreach" command? Or is there a better way?
Thank you.
Related Posts with create unique county ID for each state
Subgroups with coefplot allowing each graph to have its own scale and adjust location of legendDear all I am using the following code to create a graph with 5 plots: Code: coefplot (hba1c1, …
Spatial Panel Data TestsHello, I am relatively new to Stata and have been estimating different spatial panels, such as the …
insheeting excel files using loop and extracting filename as variable valueHello, I am trying to use insheet multiple .xlxs files and then extract filename. This is my code: …
Conditional drop if command within a certain firm year levelHi, I am working on my master thesis and I am currently busy with the data cleaning process. One of…
Missing Axis Labels only for some GraphsDear All I am working with a simple panel dataset of 40 individuals' characteristics over 2000 to 2…
Subscribe to:
Post Comments (Atom)
0 Response to create unique county ID for each state
Post a Comment