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
Empty Fama & Macbeth outputDear all, I estimated the beta coefficient of all 25 portfolios I am using to run the CAPM model. F…
Making regression tables of marginal effects of Sequential Logit modelDear all, I would like to know how to make regression tables of marginal effects of Sequential Logit…
Overlay bar graph with two symbols (and two y-axesHello all, I'm trying to replicate this graph shown below: Array My data is as follows (not sure …
Use of time dummies in fixed effects estimationDear all, I am writing my Master's thesis, where I am doing an FE estimation on the probability of …
Weighted summary statistics and outreg2I've been unable to create a table that shows the weighted summary statistics of the variable travel…
Subscribe to:
Post Comments (Atom)
0 Response to Creating State variables from city codes
Post a Comment