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
Marking correlation coefficients on pwcorrHi, Using a dataset with many correlated variables, I'm interested in seeing if any of the pairwise …
merging datasets only if two variables matchHi all, I need to merge two datasets, but only if two variables from both dataset match. First data…
Pseudo R2 for logit and mlogit in multiple imputationHello, I am using multiple imputation and survey data with a logit model and would like to calculat…
Formatting dates correctly and calculating age from two datesHello, I'm sure someone has posted about this on the forum before but I can't find the exact answer…
RD Plot with Evenly Spaced binsHi all, I am trying to run RDplot while choosing my number of evenly spaced bins. If I want to have …
Subscribe to:
Post Comments (Atom)
0 Response to Create categorical variables from string variable
Post a Comment