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
Readying My Data for Panelwise AnalysisHello Statalist, I have been working on a dataset in Stata for the past month or so, but have recen…
DATE ***Please help***Hi all, I am trying to put the day, month and year columns in one column. So the format is as foll…
Country specific time trends with first-differenced regressionDear all, I am running a first-differences regression and was wondering if country specific time tr…
Continuous dependent variable, use of regressionI am trying do make some descriptive statistic. In my dataset I have ID, Age, time from start of bei…
expanding single observation into panel data with observations for each year an item existsDear , I want to transform my dataset into panel dataset. Currently my dataset looks like this (fi…
Subscribe to:
Post Comments (Atom)
0 Response to create unique county ID for each state
Post a Comment