Hello!
I have a problem: I have a dataset which include Chinese cities, however, they are stored in a string variable. For each city there are several observations. Now, I would like to put a number on each of the cities, so for instance: Beijing =1, Tianjin =2 etc.
Is there an appropriate command in Stata to do that?
Thank you in advance!
Related Posts with Create categorical variables from string variable
Differences between command and do-fileHi, I am a beginner in Stata. Recently, I am suffering from some errors that happen only on do-file.…
Moving percentile rankHi Everyone, I was hoping somebody could help me with my following problem: I have an unbalanced pa…
How teffects ipwra on binary outcome works?I was trying to understand how exactly Stata command teffects ipwra works on a binary outcome Y by m…
How to Un-EncodeHi guys, Kindly help. I have a data set with encoded distance figures. I would like to reverse the e…
Exporting results to excel or LaTeX after -estat impact- command following spxregressHello I run a spatial regression using spxregress and after the actual estimation I use the -estat …
Subscribe to:
Post Comments (Atom)
0 Response to Create categorical variables from string variable
Post a Comment