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
KMATCH Matching Diagnostics Tests AvailabilityI started to work with the KMATCH command for propensity score matching and I am a bit struggling wi…
insufficient observations r(2001);hello every one. I am using on cross-section data . but when I run regression I receive this error: …
SUREG t stat of two coefficientsI have two regression models: DV1 = bVOI1 + bVOI2 + bVOI3 + bVOI4 + Controls DV2 = aVOI1 + aVOI2 +…
Replacing missing variables in a data set with duplicate data by rowI am struggling to replace missing data with a particular value in my dataset which has multiple dup…
How to do many similar loopsHi, Stata experts, I have need to repeat the same foreach loop for different variables but with the…
Subscribe to:
Post Comments (Atom)
0 Response to Value Label on states
Post a Comment