Basic analysis of U.S. political ideology by state

Juan Andrés Cabral

We're going to delve into a dataset that captures the political leanings of various U.S. states. This dataset serves as an update to the work of Tausanovitch and Warshaw (2013). You can download the dataset from here. The authors have computed a measure of political inclination that gauges how left-leaning (with smaller values) or right-leaning (with larger values) the residents of each U.S. state are. These calculations are rooted in surveys about specific policy preferences. By amalgamating different surveys, the authors present data spanning various U.S. presidential years for all states.

Christopher Warshaw; Chris Tausanovitch, 2022, "Subnational ideology and presidential vote estimates (v2022)", https://doi.org/10.7910/DVN/BQKU4M, Harvard Dataverse, V1 \ Tausanovitch, C., & Warshaw, C. (2013). Measuring constituent policy preferences in congress, state legislatures, and cities. The Journal of Politics, 75(2), 330-342.

For our analysis, I'll focus on the mrp_ideology_se and mrp_ideology columns. Let's start by checking for any missing values in these two columns and then visualize their distribution.

There are no missing values in the mrp_ideology_se and mrp_ideology columns.

Next, let's visualize the distribution of the mrp_ideology column using a histogram. This will give us a sense of how the ideology scores are distributed across states.

From this visualization, we can observe that most states have average ideology scores between approximately -0.1 and 0.3. This provides a consolidated view of the ideological preferences of states based on the MRP methodology.

Next, it might be interesting to see which states have the highest and lowest MRP ideology scores.

Now, we'll examine the evolution of political preferences over the years.

Ideally, larger samples should have smaller standard errors. Let's analyze if this holds true for this dataset.

There appears to be a negative relationship between the sample size and the MRP ideology standard error

The data on ideological leanings was derived from questions about policy preferences. Therefore, it would be intriguing to see how closely this correlates with individuals' self-reported ideology. Let's create a combined plot that merges histograms of the two variables of interest with a scatter plot to observe the relationship between them.

In essence, the joint plot provides a visual representation of how the model's estimates (mrp_ideology) align with the self-reported ideological preferences (self_ideology). The strong alignment in the center suggests that the model generally captures the self-reported ideological preferences of respondents quite well.