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
Semykina and Wooldridge Estimator (2010)Hello everyone! I am planning to use Semykina and Wooldridge Estimator (2010) for my thesis as my sa…
reporting prevalence estimates between two groups adjusting for sociodemographic differencesHello STATALIST family. I am interested with reporting prevalence for severity of depressive symptom…
How can I make further tests after a 2SLS-probitDear statalists: I want to do a weak-iv test and an endogenous test after a 2sls-probit. Because the…
Graphing adjusted odds ratio (multiple line graph)Can someone please share with me of the STATA command that I can use 1) to predict adjusted odds rat…
Creating a square matrix using two relational variablesHi, I've spent 5-6 hours browsing the help files and past posts, but could not find the answer to w…
Subscribe to:
Post Comments (Atom)
0 Response to Create categorical variables from string variable
Post a Comment