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
outreg2 for all dataframesHi, I am using Stata 17 and would help in producing tables in all my dataframes. Below is an exampl…
Date-variable: Extracting day-of-month as numericHello everyone, I would highly appreciate your help with the following: I have a date-variable in …
What are the functional form of the fixed-effects regression, random-effects regression and pooled regression?Good morning to the community Stata. I wrote that the functional form of the fixed-effects regressi…
Census division by year fixed effectsHello stata community, My current research needs to account for time varying shocks , and therefore…
Principal component analysisHi dears, I have a question. I would like to apply the PCA for constructing a single index. I have v…
Subscribe to:
Post Comments (Atom)
0 Response to Value Label on states
Post a Comment