Hi y'all
I would be most grateful if anyone out there has written a simple code to categorize states in Democrat, Republican and Swing state in 2016. I have 4000+ observations that have states listed as numerical so if anyone already has a code to generate new variable and segregate the numeric state into D, R, or S (for 2016 results), that would be most helpful. Does anyone already have it? Thank you.
Related Posts with egen or gen newvar to categorize the 50 states into Democrat, Republican, or Swing based on 2016 election results
drop duplicates valuesHello, I want to drop duplicates values of a variable if the number of copies are less than five. T…
How to identify and operate characters in a string variable?Hi Statalisters, I am new to Stata and encounter some problems. I have a dataset with some string …
merge two files.Dear All, I find this question here (in Chinese). There are two files. The first one is something li…
When I double-click a .dta file, Stata recognizes it as an R file! How to fix it?Today, I went to work on Stata and double clicked a .dta file. The computer presented the message b…
Time dummies to estimate the length of relationshipsI am working with 18 waves of panel data (HILDA) and in each wave, respondents state their marital s…
Subscribe to:
Post Comments (Atom)
0 Response to egen or gen newvar to categorize the 50 states into Democrat, Republican, or Swing based on 2016 election results
Post a Comment