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
Inverse hyperbolic sine (IHS) transformation allowing for non-normalityDear user, I want to run a basic Tobit regression, I have a continuous outcome variable of medical …
Colors in Histogram Hi. I want to give both the Yes bars a different color from the two No bars. How can this be done.…
Specifying second order derivatives in 'gmm'Hello, I am running a 'gmm' estimation and need to specify constraints on the coefficients. Because…
Display fixed effects without using 'fe'Hello. I am trying to run a fixed effects model, but as I am using country dummy variables. I have s…
Change in the number of employed people in all states except for state i normalized by number of employed people in state iDear Stata Forum, let's say I have state level employment data of 50 states for the years 2000 and 2…
Subscribe to:
Post Comments (Atom)
0 Response to create unique county ID for each state
Post a Comment