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
Delete whole rowI have discovered that I have duplicates for a whole row (same person).. how do I delete the rows wi…
qregplot A module for plotting quantile regression CoefficientsDear all, Thanks to Prof. Baum, a new command "qregplot" is available from SSC. This new command is…
Summarizing first row data within subgroups conditioned on IDHello! I want to accumulate values from the first occurrences or the first row given a specific rou…
Seemingly unrelated regression with panel data fixed effectsI have a panel data set with id=52 and time variable year, 2000 to 2018 (988 observations). I would …
Difference in Difference Analysis Using Panel and Time Series DataI am trying to conduct difference in difference analysis. I want to look at whether bank holding com…
Subscribe to:
Post Comments (Atom)
0 Response to create unique county ID for each state
Post a Comment