I have a variable with city names and I want to create a new variable which a unique number for each city.
I want my dataset to look like as follows:
CITY_NAME CITY_ID
Delhi 1
Delhi 1
Kolkata 2
Mumbai 3
Mumbai 3
Pune 4
How do I generate the numerical variable CITY_ID from the variable CITY_NAME?
Related Posts with How do I generate a numerical variable from a string variable?
Panel regression with moderatorDear all, I am conducting a fixed effects panel regression with a IV several DVs and a moderator (M…
Need help with creating a Growth Incidence Curve in Stata. I am very new to this wonderful software.Hey there! My name is Philip and I'm currently studying for a bachelors degree in economics. I reall…
Dropping unmatched dataHi everyone, I need some help in processing data for my phd research. I started with a dataset inclu…
Endogeneity 2SLSHi there, I have to report on the difference in estimates of 2SLS and OLS (same model) and the endo…
Wanted: New Home for Survey Sampling textsI've retired from professional work and I'd like to donate the stat books in my library to a good ho…
Subscribe to:
Post Comments (Atom)
0 Response to How do I generate a numerical variable from a string variable?
Post a Comment