I am trying to make a variable (state_num) for the 50 states and D.C. where Alabama ==1, Alaska ==2, etc. I have the variable "state" where they are all listed by name. Is there a quicker way to do this than replace state_num=1 if state=="Alabama". I could have done that in the time it's taken me to try and figure this out, but I am trying to learn the tips and tricks. I have been out of the stata game for some time now and trying to relearn. Thank you!
Related Posts with Value Label on states
When trimming variables are feasible?Hello everybody, this is my first publication so if i'm writing in the wrong area, i'm sorry. i'm d…
Likelihood ratio interpretation Accelerated Failure Time Survival AnalysisHi there, In my research on the survival of strategies within private equity I'm using an accelerat…
comparing multiple variables from two datasets without IDDear Stata friends, Following Scenario: I have to Datasets with four variables each: Schoolname, Ad…
Finding common values from a variable corresponding to two different values in another variableHello, I'm interested in finding common values from a variable corresponding to two different value…
Splitting stringsI have a string variable containing licence plates, names and dates separated by / . As in 122000200…
Subscribe to:
Post Comments (Atom)
0 Response to Value Label on states
Post a Comment