Hello all,
I am seeking help with the following. I have a dataset that is of population projections for each county in a state. There are 58 observations for the "county" variable, currently coded according to their FIPs (Federal Information Processing Standards) county code. For example, the value 6001 corresponds to Alameda county. The actual county names are only in the data dictionary. The dataset itself only has the FIPS codes.
What I am trying to do is use the command "label define" to define a label named County so that instead of reading the value "6001" when I browse my data, I can read "Alameda." I have used "label define" before but only very simply (for example, label define Sex 0 "Female" 1 "Male"). The code I have so far is what follows:
label define County 6001 "Alameda" 6003 "Alpine" 6005 "Amador" 6007 "Butte" 6009 "Calaveras" 6011 "Colusa" 6013 "Contra Costa"
Do I have to complete this process for every single one of the 58 observations? Is there a simpler way or do I need to just import the data with the county names replacing the FIPS codes before I even begin working with Stata?
Many thanks,
Esi
Related Posts with Using Label define for a variable with many observations
How to cluster standard errors?Dear all, I am currently doing my master thesis and I would really appreciate some help, since I am…
Creating subgroups in panel dataI am working with a panel of UK industries from 1997-2018, and wish to group some of these industrie…
Dynamic GMM: select the appropriate lag length for instrumented variablesHello, I am running a one step dynamic gmm model of this kind. My data consists of a N=185 and T=27.…
Markov switching model with few time seriesHi everyone, I have times series with 11 observations on the business climate index. Can I apply Mar…
Dropping group of variables if the group does not contain a certain valueDear all, I am a stata beginner so this question might sound stupid. I have a dataset that list per…
Subscribe to:
Post Comments (Atom)
0 Response to Using Label define for a variable with many observations
Post a Comment