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
Quadrivariate probit with endogenous dummy variable in the covariatesI am trying to identify the role played by marijuana in the consumption of hard drugs (cocaine, meth…
Question Stata!!Hello, Do you have any idea of how can I create a variable that is equal to the nº of years a perso…
How to export CSV with multiine text dataI have a CSV file in which some of the columns contain multiline text data. See below. Sample file a…
save spssSomehow savespss is broken, random extra empty string variables are added to the file produced, like…
Drop certain observation if certain criteria meets a condition (Panel data)Hello! I have a panel data which consists from the year 2010 to 2019 I want drop all the observatio…
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