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
frget Fails when called from nested do-fileI'm getting an inexplicable error from frget that I think can only be explained by it having problem…
event momenthi all, I have the following question regarding creating a certain event moment. in this case, I'm …
Would it be possible to combine ssc heatplot with statajournal tabplot? (And plotting empty spaces in tabplot)While this question sounds more meta as it is, I have a specific use case in mind. Assume you want …
Fitted Values From ivtobitHi, I am using stata 16. I am running an ivtobit model. Data is shown below. The deaths data is cen…
Help for financial convergence testingHi all, I am writing a master thesis on the impact of the implementation of financial fair play rul…
Subscribe to:
Post Comments (Atom)
0 Response to Create categorical variables from string variable
Post a Comment