Hello,
I am having troubles combining two observations with the same meaning in Stata.
I am using Stata/IC 15.1 for Windows.
I have inputed educational data from the NCES into Stata. One of the variables is the state.
Stata has made each state name a number. In addition, there are duplicate observations (ILLINOIS and Illinois). I would like to combine these into one state (preferably the one that is Illinois).
Below is the code:
Therefore, my questions are:
1) How can I combine duplicate state names (OHIO and Ohio, ILLINOIS and Illinois, etc)?
2) Why has Stata converted state names into numbers?
Thank you.
I am having troubles combining two observations with the same meaning in Stata.
I am using Stata/IC 15.1 for Windows.
I have inputed educational data from the NCES into Stata. One of the variables is the state.
Stata has made each state name a number. In addition, there are duplicate observations (ILLINOIS and Illinois). I would like to combine these into one state (preferably the one that is Illinois).
Below is the code:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long state 15 10 10 6 10 10 3 6 10 3 3 3 end label values state state label def state 1 "ILLINOIS", modify label def state 3 "Illinois", modify label def state 4 "Indiana", modify label def state 6 "Kentucky", modify label def state 8 "Missouri", modify label def state 10 "Ohio", modify label def state 13 "Tennessee", modify label def state 15 "Virginia", modify label def state 16 "West Virginia", modify
1) How can I combine duplicate state names (OHIO and Ohio, ILLINOIS and Illinois, etc)?
2) Why has Stata converted state names into numbers?
Thank you.
Comment