R Markdown

Histogram of Nominate_dim1 for Presidents

Results suggesting polarization for Presidents

This histogram is showing legislator ideologies through displaying presidents who are either very liberal (-1), moderate (0), or very conservative (1). Liberals are defined as being democrats, whereas, conservatives are known as republicans. As shown in the histogram, there are no presidents that reach the extreme ideology of being very liberal or very conservative. Although that is true, they are still labeled either liberal or conservative, just not very liberal or very conservative. There is a pretty even distribution of liberal and conservative presidents with few who are moderate. Although, there are some presidents that are close to being moderate, they are still considered either liberal or conservative. With this being said, in terms of polarization we can conclude that most presidents will take a stance on things through affiliating with either being a liberal or conservative.


Histogram of nominate_dim1 for House Members

Results suggesting polarization for House Members

This histogram is showing legislator ideologies through displaying house members who are either very liberal (-1), moderate (0), or very conservative (1). Liberals are defined as being democrats, whereas, conservatives are known as republicans. As shown in this histogram, we can see that most house members are either liberal or conservative, with significantly fewer members being moderate. To the extremes of the legislator ideologies, there are few members who are very liberal or very conservative. Most of the data suggests that they are either just liberal or conservative. With this being said, in terms of polarization we can conclude that most house members will take a stance on things through affiliating with either being a liberal or conservative. There are few house members that are moderate, meaning they won’t pick a side on things through siding with either political party.


One Sample T-Test’s for House Members

## 
##  One Sample t-test
## 
## data:  HouseData2$nominate_dim1
## t = 1.933, df = 38964, p-value = 0.05324
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  -5.103733e-05  7.355233e-03
## sample estimates:
##   mean of x 
## 0.003652098

One sample T-Test Results for House Members

In this t-test that observes house members and their nominate_dim1 score, we would accept the null hypothesis due to the p-value being bigger than 0.05. The mean of nominate_dim1 scores for house members is 0.00365. The true mean is equal to 0. The probability of observing a difference in this mean is between -5.103 and 7.355.


t.test(President$nominate_dim1, na.rm=TRUE)
## 
##  One Sample t-test
## 
## data:  President$nominate_dim1
## t = 1.0827, df = 104, p-value = 0.2815
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  -0.0351033  0.1195223
## sample estimates:
##  mean of x 
## 0.04220952

One sample T-Test results for Presidents

In this one sample t-test for presidents, we would reject the null hypothesis since the p-value is 0.2815 which is lower than 0.05. In this instance, we would accept the alternative hypothesis which states that the true mean is not equal to 0. The mean of the nominate_dim1 scores for presidents is 0.04220, and we can see from the 95 percent confidence interval that the probability of seeing a difference in this mean is between -0.0351 and 0.1195.


Has Polarization increased over time?

I do think that political polarization has increased over time due to the media glamorization that it gets. Political polarization is when an individual’s stance on a given issue or policy is more likely to be strictly defined by their identification with a particular political party. What this means is that people choose what they stand for based on what their political party stands for. I believe that political polarization has definitely increased over time. I believe this because of the media, and all the attention that is brought to political polarization. For example, for the instance of abortion in America, liberals are known to side with pro-choice, whereas conservatives’ side with pro-life. This is just one instance, but there are many where people make decisions and think about things based on the party they are affiliated with.


Graph of polarization over time

Examining the graph

In 1789, we can see some polarization for conservatives, but little polarization for liberals. Looking at this graph though, we can come to a tentative conclusion that polarization is not constant due to their being no real resemblance of polarization happening. Moving towards 2014, we see instances of polarization, but there is not enough evidence shown in this graph to deem that there was polarization in 2014. Overall, there is no evident polarization shown in this graph.


Graph of polarization over time

## 
##     1    13    22    26    29    37    44    46   100   108   112   114 
##   651  1569   219    77   952     2    28     3 18277     8    10     6 
##   117   200   203   206   208   213   300   310   326   328   329   331 
##     2 15257    32    46     8     1    17    80    28    28    39    22 
##   340   347   354   355   356   370   380   402   403   522   523   537 
##    62     3     6     2     2    41     7     1     2     7     1    26 
##   555   603  1060  1116  1275  1346  3333  3334  4000  4444  5000  6000 
##   805     2     4     1   293    65   100    19   117    12   134     2 
##  7000  7777  8000  8888 
##     7    56    15    72

Analyzing the jitter graph

The jitter graph does a good job of showing the visualization of small data sets, whereas the point graph does better at showing bigger data sets. When you put big data sets into the jitter graph it is hard to see trends in the data. The two parties that the House belong to are Republican and Democrat. The republicans have polarized more than the democrats over time as shown in these graphs. The democratic party is more liberal in terms of the nominate_dim1.


## # A tibble: 30,134 x 23
##    congress chamber icpsr state_icpsr district_code state_abbrev party_code
##       <dbl> <chr>   <dbl>       <dbl>         <dbl> <chr>             <dbl>
##  1       45 House    3283          41             7 AL                  100
##  2       45 House    3494          41             8 AL                  100
##  3       45 House    4349          41             2 AL                  100
##  4       45 House    4376          41             6 AL                  100
##  5       45 House    5043          41             1 AL                  100
##  6       45 House    5659          41             5 AL                  100
##  7       45 House    8436          41             4 AL                  100
##  8       45 House   10157          41             3 AL                  100
##  9       45 House    2155          42             3 AR                  329
## 10       45 House    3508          42             1 AR                  100
## # … with 30,124 more rows, and 16 more variables: occupancy <dbl>,
## #   last_means <dbl>, bioname <chr>, bioguide_id <chr>, born <dbl>,
## #   died <dbl>, nominate_dim1 <dbl>, nominate_dim2 <dbl>,
## #   nominate_log_likelihood <dbl>, nominate_geo_mean_probability <dbl>,
## #   nominate_number_of_votes <dbl>, nominate_number_of_errors <dbl>,
## #   conditional <lgl>, nokken_poole_dim1 <dbl>, nokken_poole_dim2 <dbl>,
## #   Year <dbl>
## 
##   100   114   117   200   213   326   328   329   331   340   347   354 
## 16051     6     2 13835     1    28    19    19    11    62     3     6 
##   355   356   370   380   402   522   523   537  1060 
##     2     2    41     7     1     7     1    26     4

Logic behind the twoparty variable and ifelse command

The point of doing this code was to make the variables in the twoparty and rep_or_dem columns easier to read. In the two-party column, variables that are equal to 200 get assigned a 1, and if they are not equal to 200 they get assigned a 0. These 0 and 1’s resemble either democrats or republicans in the rep_or_dem column. 0 is equal to a democrat and 1 is equal to a republican. The point of this code was to split up the two parties and distinguish who is a democrat and who is a republican.

## 
##   Democrat Republican 
##      16051      13835

Polarization over time for Republicans and Democrats

Analyzing the graph

In this visualization, we can see that the polarization for republicans has increased since 1877, but the polarization for democrats has relatively stayed the same. From 1927 to about 1987, there wasn’t much polarization between the two parties, but in recent years we have seen more polarization between the republicans and democrats. Polarization has become the norm for the two parties in the past few years with republicans polarizing quicker. We can see that as of 2017, republicans are reaching towards the status of being very conservative.


Code For Group_by

House1876 <- House1876 %>% group_by(congress) %>% mutate(congress_mean=mean(nominate_dim1)). This code essentially groups together congress and nominate_dim1 and finds the means for congress members based on the nominat_dim1.


Mean polarization over time split by parties and all congress members

Analyzation of graph

In terms of polarization, it can be seen that republicans and democrats have both increased polarization since 1880. With this being said, republicans are polarizing more than democrats. Of all congress members, most seem to be moderate with some outliers being either slightly conservative or liberal. I think a good measure of polarization would be the mean nominate_dim1 scores. The nominate_dim1 score is a members ideology party based on their vote. This would be a good variable to test in order to find evidence of polarization.


## # A tibble: 47 x 4
##     Year congress_mean dem_mean rep_mean
##    <dbl>         <dbl>    <dbl>    <dbl>
##  1  1877       -0.0233   -0.373    0.368
##  2  1883       NA        -0.347   NA    
##  3  1897        0.0925   -0.389    0.430
##  4  1911       NA        -0.325   NA    
##  5  1919        0.0814   -0.311    0.404
##  6  1921       NA        -0.310   NA    
##  7  1925       NA        -0.281   NA    
##  8  1927       NA        -0.286   NA    
##  9  1931       NA        -0.256   NA    
## 10  1933       -0.0911   -0.251    0.331
## # … with 37 more rows
## # A tibble: 36 x 4
##     Year congress_mean dem_mean rep_mean
##    <dbl>         <dbl>    <dbl>    <dbl>
##  1  1877       -0.0233   -0.373    0.368
##  2  1897        0.0925   -0.389    0.430
##  3  1919        0.0814   -0.311    0.404
##  4  1933       -0.0911   -0.251    0.331
##  5  1945       -0.0166   -0.265    0.303
##  6  1947        0.0551   -0.237    0.285
##  7  1949       -0.0581   -0.276    0.277
##  8  1951       -0.0115   -0.262    0.280
##  9  1953        0.0142   -0.253    0.278
## 10  1955       -0.0212   -0.279    0.277
## # … with 26 more rows
## # A tibble: 36 x 4
##     Year congress_mean dem_mean rep_mean
##    <dbl>         <dbl>    <dbl>    <dbl>
##  1  1877       -0.0233   -0.373    0.368
##  2  1897        0.0925   -0.389    0.430
##  3  1919        0.0814   -0.311    0.404
##  4  1933       -0.0911   -0.251    0.331
##  5  1945       -0.0166   -0.265    0.303
##  6  1947        0.0551   -0.237    0.285
##  7  1949       -0.0581   -0.276    0.277
##  8  1951       -0.0115   -0.262    0.280
##  9  1953        0.0142   -0.253    0.278
## 10  1955       -0.0212   -0.279    0.277
## # … with 26 more rows

Mean polarization over time for Republicans, Democrats and all congress members


Absolute value interpretation

This new polarization variable is the absolute value of the difference between republican and democrat means correlating to the year. The high and low values would show what years republican and democrats together have polarized the most and least amount. A reasonable hypothetical range for this new range would be from -0.1 to 0.1.


T-Test of polarization between republicans and democrats

## 
##  One Sample t-test
## 
## data:  House1876cong$Polarization
## t = 34.395, df = 35, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  0.6221482 0.7001974
## sample estimates:
## mean of x 
## 0.6611728

Analyzation of T-Test results

In this one sample t-test for polarization, we would reject the null hypothesis since the p-value is significantly lower than 0.05. In this instance, we would accept the alternative hypothesis which states that the true mean is not equal to 0. The mean of the polarization scores is 0.6611, and we can see from the 95 percent confidence interval that the probability of seeing a difference in this mean is between 0.6221 and 0.7001.


Graph of polarization between republicans and democrats

Analyzing the graph

Polarization has definitely increased over time as can be seen in the graph above. I think we should be concerned of the increase in polarization over time, since it can lead to a divided house in the congress. I do think that polarization and time correlate due to the fact that politics have become very prevalent in our world and parties have started to split more to the point that we are at now.


## 
## Call:
## lm(formula = House1876cong$dem_mean ~ House1876cong$rep_mean)
## 
## Coefficients:
##            (Intercept)  House1876cong$rep_mean  
##                -0.1598                 -0.4750
## 
## Call:
## lm(formula = House1876cong$dem_mean ~ House1876cong$rep_mean)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.039711 -0.021437 -0.000353  0.010463  0.065601 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            -0.15981    0.02097  -7.622 7.41e-09 ***
## House1876cong$rep_mean -0.47503    0.06024  -7.886 3.50e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02711 on 34 degrees of freedom
## Multiple R-squared:  0.6465, Adjusted R-squared:  0.6361 
## F-statistic: 62.18 on 1 and 34 DF,  p-value: 3.498e-09

Analyzing the linear model

Looking at this linear model, we can come to the conclusion that republicans are more polarized than democrats. We can see this from the max and min scores. The max score is much higher and closer to being very conservative than the min score is to being very liberal. Not only this, but we can also see that the median of the data shows people being liberal instead of conservative. Overall, republicans are more polarized than democrats, but there are more democrats who have polarized than republicans.


## 
##  Pearson's product-moment correlation
## 
## data:  House1876cong$dem_mean and House1876cong$rep_mean
## t = -7.8857, df = 34, p-value = 3.498e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.8959249 -0.6462327
## sample estimates:
##        cor 
## -0.8040584

Analyzing the correlation model

In this correlation model, we would reject the null hypothesis due to the p-value being less than 0.05. The correlation of the polarization between democrats and republicans is -0.8040, with a 95 percent confidence interval of this number being wrong. There is between -0.0895 and -0.6462 chance of the correlation number changing.


Why the results from above cant be published

This data from above is just dependent upon two political parties instead of all of the congress. With this being said, it would be unethical to publish results such as these because they give us a skewed understanding of polarization for all of congress.


What data have we been using ?

We have not been using data from all the congressional sessions. This would be incomplete data because we are not giving a true sample of the whole congress.


House1876_2 <- filter(House1876, Year>1944)

ggplot(House1876_2, aes(x=Year, y=congress_mean)) +
  geom_bar(stat = "identity", color = "Light Blue") +
  scale_fill_manual(values = c("skyblue", "royalblue", "blue", "navy"), limits = c(1944, 1980, 2000, 2020), breaks=c(1944, 1980, 2000, 2020), name ="Test") + labs(x="Year", y="Congress Members", title = "Polarization for congress members since 1944")
## Warning: Removed 2219 rows containing missing values (position_stack).

Analyzing the graph for polarization between republicans and democrats

In this graph, we can see that liberals are polarizing more than conservatives. This contradicts the rest of the data we have gathered earlier in this lab. Earlier in this lab we saw that republicans were polarizing more than democrats. That data is different in this graph. The liberals are at a more extreme polarization than the conservatives in this graph. Although what i have said before is true for earlier years examined, we can also see that republicans are starting to polarize more than democrats post 2000. This trend is showing that democrats used to be more polarized than republicans, but now that is starting to switch, and republicans are polarizing more than democrats.