Dear All,
I am trying to create a new "state" variable from certain city codes, one can observe that each city code has its own state number at the beginning. For example, 5 is state A and 99 is state Z. I was wondering if it is possible to extract the first (or first two) numbers from a city code and from that, create a new variable which assigns it to a state. I realize this is possible but due to my unfamiliarity with loops I would like to ask for anybody's help.
Thank you very much.
Juan
Related Posts with Creating State variables from city codes
Change Y axis for bar chartHi all, I am trying to make a simple bar chart. All of my means are very close together, between 3.…
Repeated measures ANOVA: Standard errors of estimated marginal means produced by Stata's margins were different from that of SPSS's EMMEANSHi, Why the SE's of estimated marginal means differ in this case? And which one should be used if w…
estout by Ben Jann (available from ssc): Add horizontal lines to table, csv formatHello, after three hours of trying and searching, here is my question: Is there an elegant way to a…
putpdf failed to add table, failed to set borderHello Statalist, I am trying to use putpdf to convert a surveyCTO-formatted survey into pdf, but I …
can't truncate length of trees (X-Axis) in horizontal dendrogramThe dataset I use to construct the attached dendrogram contains no cells with a dissimilarity value …
Subscribe to:
Post Comments (Atom)
0 Response to Creating State variables from city codes
Post a Comment