Hello and thank you for taking the time to help.
I am working on an analysis of voter roll purges and want to create a new variable to regress against CCES turnout data but I haven't used stata in over a year and my quant class didn't cover this type of variable generation.
The variables I have consists of the total number of removed voters and the total number of registered voters for 50 states (minus a few removed for lack of data) and election year (2010, 2012, 2014, 2016, and 2018). I'd like to divide the number of purged voters (total_removed) in a year (for ex. 2018) by the total registered voters (total_reg) in the prior year (in this case, 2016) in each state. I'm pretty far out of my depth and I've guessed at a few formulas but nothing's worked.
Do I need to create dummy variables for each pair of years? As in, create a variable for each 2018 - 2016 pair then 2016 - 2014 etc.? That's the only thing I can think of but that also sounds very time intensive and clunky for my reg.
Thank you for any help you can provide.
Related Posts with Generating New Variable in Time Series Data
Longitudinal data - generating variables dependent on observations within each subjectHi everyone, I have longitudinal data (see dataex below). I need to censor each id according to a f…
Missing R-squared from IV regressionQuestion: How can I display/find the missing "within R-squared" from an IV regression? Example of t…
Adding an interaction term into a model or stratifying data , which method is more preferable to analyse interaction terms?Hi Statlists, Hope this post finds you well. May I know why stratification seems to be less prefera…
Residuals in a panel data modelHi I am running a regression (using panel data) looking at the effect of income on food consumption …
How can I make a line graph for data from a certain date range?Hello! I'm working with daily time series data with the date originally in the format "01/29/19" (st…
Subscribe to:
Post Comments (Atom)
0 Response to Generating New Variable in Time Series Data
Post a Comment