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
Making an average when there are more than two values in different lines (of the same ID)Hi, everyone I am struggling with restructuring my data. Below is the format of my data: PID stand…
Order studies within group by time in meta-analysis forest plotHi everyone I am working on a forest plot. I want to order the studies within each group by publica…
new package twby available on SSC: create a cross-tabulation of graphsThanks to Kit Baum, a new package, twby, is now available on SSC. It is a prefix command for twoway …
To append or to mergeI would like to create a long panel from the 17 waves of panel data from the HILDA survey but am str…
Is % bias is more important than t test results for PSM?My variable of interest is ethnicity. Ethnicity has two categories: natives or migrants. I want to s…
Subscribe to:
Post Comments (Atom)
0 Response to Value Label on states
Post a Comment