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
PPML and fixed effects commandsGood evening, guys. I'm currently working on a gravity model with PPML estimator. Here is the thread…
Exact matching on Propensity Score MatchingDear Stata Forum, I’m trying to perform a Propensity Score Matching with exact matching but found m…
Converting Stata version 16 to Stata version 12 with Stat/Transfer in LinuxDear Forum Members, I have some Stata version 16 data files, which I would like to convert to Stata…
post and postfile help after regressionI am running a simple regression repeated for ~1,000 variables in a loop. I would like to capture th…
reshape errorHi, I am trying to reshape from wide to long, but it keeps saying that "variable id does not uniquel…
Subscribe to:
Post Comments (Atom)
0 Response to Value Label on states
Post a Comment