ANES CD + State Data creation and analyses

Create dataset

library(tidyverse)
library(car)

# Download the data
anesraw <- readr::read_csv("Archival Studies/ANES/ANES 2020 data.csv") %>% #%>% # Convert "don't knows" into NAs
  as.data.frame()%>%
  rename(
    state = V203001,
    congdistnum = V203002) %>%
  unite("congdist", state, congdistnum, sep = "-", remove = FALSE) %>% # Creates the "congdist" column
  mutate_all(~ case_when(. < 0  ~ NA, TRUE ~ .))%>%
  mutate_all(~ case_when(. == 99  ~ NA, TRUE ~ .)) %>%
  rowwise() %>%
  mutate(V201225x = as.numeric(V201225x))

Select items

itemstouse <- readxl::read_excel("Archival Studies/ANES/ANESAnalysis.xlsx") %>% filter(is.na(EXCLUDE))

Select moral diversity items

# Items we selected as being "Pre-Moral Diversity"
premd_items <- itemstouse %>%
  dplyr::filter(`Type of variable` == "MD" )%>%
  dplyr::filter(PrePost == "Pre") %>%
  dplyr::select(VariableName) %>%
  dplyr::pull()

# Items we selected as being "Post-Moral Diversity"
postmd_items <- itemstouse %>%
  dplyr::filter(`Type of variable` == "MD" )%>%
  dplyr::filter(PrePost == "Post") %>%
  dplyr::select(VariableName) %>%
  dplyr::pull()

Looseness creation

Alpha values of original items we selected

source("UsefulR/corstars.R")
itemstouse <- readxl::read_excel("Archival Studies/ANES/ANESAnalysis.xlsx") %>% filter(is.na(EXCLUDE))

looseness_items <- itemstouse %>% filter(`Type of variable` == "looseness") %>% select(VariableName) %>% dplyr::pull(.)

loosedataset <- anesraw %>%
  select(looseness_items)

loosedatacor <- corstars(loosedataset)

psych::alpha(loosedataset)
## Some items ( V201379 V201405x V201414x V201415 V201416 V201429 V201626 V202225 V202242x V202256 V202259x V202325 V202331x V202336x V202337 ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = loosedataset)
## 
##   raw_alpha std.alpha G6(smc) average_r   S/N   ase mean   sd median_r
##      -0.33     -0.13    0.28   -0.0038 -0.11 0.022  3.1 0.26   -0.048
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt    -0.37 -0.33 -0.28
## Duhachek -0.37 -0.33 -0.28
## 
##  Reliability if an item is dropped:
##          raw_alpha std.alpha G6(smc) average_r    S/N alpha se var.r  med.r
## V201366     -0.411    -0.170    0.25   -0.0050 -0.145    0.024 0.082 -0.042
## V201368     -0.335    -0.132    0.27   -0.0040 -0.117    0.022 0.084 -0.055
## V201369     -0.338    -0.143    0.27   -0.0043 -0.125    0.022 0.085 -0.042
## V201378     -0.385    -0.143    0.27   -0.0043 -0.125    0.023 0.080 -0.042
## V201379     -0.320    -0.131    0.29   -0.0040 -0.116    0.022 0.085 -0.055
## V201393     -0.341    -0.104    0.30   -0.0032 -0.094    0.022 0.081 -0.055
## V201405x    -0.286    -0.121    0.29   -0.0037 -0.108    0.021 0.082 -0.042
## V201408x    -0.348    -0.071    0.31   -0.0023 -0.066    0.023 0.079 -0.055
## V201411x    -0.366    -0.084    0.30   -0.0027 -0.077    0.023 0.077 -0.042
## V201414x    -0.301    -0.140    0.27   -0.0043 -0.123    0.021 0.082 -0.042
## V201415     -0.315    -0.153    0.25   -0.0046 -0.133    0.022 0.081 -0.042
## V201416     -0.282    -0.126    0.27   -0.0039 -0.112    0.021 0.080 -0.042
## V201417     -0.389    -0.155    0.26   -0.0046 -0.134    0.023 0.080 -0.042
## V201420x    -0.436    -0.149    0.27   -0.0045 -0.130    0.024 0.080 -0.049
## V201423x    -0.415    -0.157    0.26   -0.0047 -0.136    0.024 0.080 -0.042
## V201426x    -0.390    -0.132    0.26   -0.0040 -0.116    0.023 0.074 -0.042
## V201429     -0.038    -0.037    0.32   -0.0012 -0.035    0.016 0.075 -0.042
## V201430     -0.362    -0.147    0.28   -0.0044 -0.128    0.023 0.084 -0.058
## V201626     -0.257    -0.079    0.31   -0.0025 -0.073    0.020 0.079 -0.042
## V202225     -0.349    -0.154    0.27   -0.0046 -0.133    0.022 0.085 -0.078
## V202231x    -0.413    -0.171    0.26   -0.0051 -0.146    0.024 0.082 -0.055
## V202242x    -0.197    -0.079    0.31   -0.0025 -0.073    0.019 0.081 -0.042
## V202248x    -0.366    -0.121    0.28   -0.0037 -0.108    0.023 0.080 -0.042
## V202255x    -0.248    -0.058    0.31   -0.0019 -0.055    0.021 0.079 -0.064
## V202256     -0.222    -0.099    0.29   -0.0031 -0.090    0.020 0.079 -0.055
## V202259x    -0.211    -0.123    0.28   -0.0038 -0.110    0.019 0.078 -0.042
## V202325     -0.328    -0.142    0.27   -0.0043 -0.124    0.022 0.081 -0.042
## V202331x    -0.300    -0.135    0.28   -0.0041 -0.119    0.021 0.084 -0.042
## V202336x    -0.233    -0.118    0.28   -0.0037 -0.106    0.020 0.077 -0.042
## V202337     -0.282    -0.102    0.30   -0.0032 -0.093    0.021 0.080 -0.042
## 
##  Item statistics 
##             n    raw.r  std.r   r.cor  r.drop mean   sd
## V201366  8223  0.34413  0.272  0.2586  0.1379  3.7 1.32
## V201368  8257  0.14908  0.196  0.1168  0.0222  4.6 0.74
## V201369  8233  0.17538  0.217  0.1418  0.0182  4.1 0.95
## V201378  8204  0.30775  0.219  0.1682  0.1040  4.1 1.20
## V201379  8171  0.00906  0.192  0.0294 -0.0394  1.4 0.48
## V201393  8255  0.22175  0.133 -0.0016  0.0178  3.2 1.12
## V201405x 8242  0.09294  0.172  0.0442 -0.0905  2.4 1.61
## V201408x 8166  0.31725  0.057 -0.0938 -0.0075  3.5 2.04
## V201411x 7967  0.34915  0.088 -0.0226  0.0154  3.5 2.01
## V201414x 8161  0.00076  0.212  0.1458 -0.0870  1.5 0.89
## V201415  8152 -0.05389  0.239  0.2548 -0.0785  1.2 0.40
## V201416  8161 -0.10955  0.181  0.1683 -0.1729  1.4 0.71
## V201417  8197  0.32388  0.242  0.2345  0.1658  2.8 0.89
## V201420x 8225  0.41360  0.231  0.1931  0.0858  4.5 2.16
## V201423x 8131  0.36149  0.247  0.2471  0.1390  5.0 1.37
## V201426x 8240  0.41545  0.194  0.2411  0.0192  4.3 2.47
## V201429  7713 -0.13933 -0.026 -0.1941 -0.3878  3.5 2.31
## V201430  8245  0.22784  0.227  0.1114  0.1038  2.0 0.80
## V201626  8104 -0.07289  0.077 -0.0834 -0.1828  2.6 1.11
## V202225  7407  0.17425  0.240  0.1460  0.0536  1.6 0.87
## V202231x 7235  0.33213  0.275  0.2388  0.1968  2.3 1.02
## V202242x 7390  0.04847  0.075 -0.1027 -0.2129  2.7 1.89
## V202248x 7384  0.25469  0.170  0.0707  0.0402  6.1 1.54
## V202255x 7348  0.14311  0.028 -0.1183 -0.1362  3.8 1.97
## V202256  7375  0.03729  0.123  0.0528 -0.1923  4.3 1.67
## V202259x 7384  0.13178  0.176  0.1347 -0.1733  3.6 2.21
## V202325  7384  0.10591  0.216  0.1572 -0.0046  1.5 0.79
## V202331x 7384  0.18436  0.202  0.0767 -0.0676  2.2 1.77
## V202336x 7364  0.09784  0.165  0.1231 -0.1616  2.8 1.88
## V202337  7375 -0.00491  0.130  0.0017 -0.1364  1.9 0.96
## 
## Non missing response frequency for each item
##             1    2    3    4    5    6    7 miss
## V201366  0.10 0.07 0.22 0.21 0.39 0.00 0.00 0.01
## V201368  0.01 0.01 0.07 0.23 0.68 0.00 0.00 0.00
## V201369  0.02 0.03 0.20 0.36 0.39 0.00 0.00 0.01
## V201378  0.04 0.08 0.21 0.12 0.55 0.00 0.00 0.01
## V201379  0.62 0.38 0.00 0.00 0.00 0.00 0.00 0.01
## V201393  0.10 0.12 0.43 0.21 0.14 0.00 0.00 0.00
## V201405x 0.44 0.23 0.04 0.21 0.01 0.04 0.03 0.00
## V201408x 0.26 0.16 0.08 0.06 0.16 0.28 0.00 0.01
## V201411x 0.30 0.11 0.05 0.10 0.21 0.22 0.00 0.04
## V201414x 0.72 0.16 0.05 0.07 0.00 0.00 0.00 0.01
## V201415  0.80 0.20 0.00 0.00 0.00 0.00 0.00 0.02
## V201416  0.68 0.19 0.13 0.00 0.00 0.00 0.00 0.01
## V201417  0.13 0.14 0.55 0.17 0.00 0.00 0.00 0.01
## V201420x 0.15 0.09 0.03 0.28 0.03 0.14 0.28 0.01
## V201423x 0.05 0.05 0.02 0.11 0.29 0.48 0.00 0.02
## V201426x 0.26 0.08 0.02 0.18 0.02 0.09 0.35 0.00
## V201429  0.34 0.10 0.08 0.13 0.09 0.08 0.18 0.07
## V201430  0.33 0.36 0.31 0.00 0.00 0.00 0.00 0.00
## V201626  0.22 0.25 0.26 0.27 0.00 0.00 0.00 0.02
## V202225  0.70 0.04 0.26 0.00 0.00 0.00 0.00 0.11
## V202231x 0.29 0.27 0.31 0.13 0.00 0.00 0.00 0.13
## V202242x 0.34 0.29 0.06 0.17 0.01 0.05 0.08 0.11
## V202248x 0.03 0.02 0.01 0.16 0.02 0.12 0.64 0.11
## V202255x 0.22 0.16 0.03 0.05 0.29 0.25 0.00 0.11
## V202256  0.05 0.12 0.15 0.29 0.15 0.12 0.13 0.11
## V202259x 0.26 0.16 0.03 0.25 0.02 0.09 0.18 0.11
## V202325  0.65 0.16 0.19 0.00 0.00 0.00 0.00 0.11
## V202331x 0.56 0.16 0.02 0.16 0.01 0.03 0.05 0.11
## V202336x 0.37 0.20 0.04 0.25 0.01 0.06 0.07 0.11
## V202337  0.52 0.07 0.42 0.00 0.00 0.00 0.00 0.11

Items that it said I should recode

V201379 V201405x V201414x V201415 V201416 V201429 V201626 V202225 V202242x V202256 V202259x V202325 V202331x V202336x V202337

anesraw$r_V201379  <- car::recode(anesraw$V201379,  "1 =2 ; 2 = 1") # Would you prefer a government official who compromises to get things done, or who sticks to their principles no matter what? (1 = Compromises; 2 = Sticks to principles)
anesraw$r_V201405x <- car::recode(anesraw$V201405x, "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # Do you favor, oppose, or neither favor nor oppose requiring employers tooffer paid leave to parents of new children? 1 = Favor; 7 = Oppose
anesraw$r_V201414x <- car::recode(anesraw$V201414x,  "1 = 4; 2 = 3; 3 = 2; 4 = 1") # Do you favor or oppose laws to protect gays and lesbians against job discrimination? (1 = Favor Strongly; 4 = Oppose Strongly)
anesraw$r_V201415  <- car::recode(anesraw$V201415,  "1 = 2; 2 = 1") # Do you think gay or lesbian couples should be legally permitted to adopt children? (1 = Yes, 2 = No)
anesraw$r_V201416  <- car::recode(anesraw$V201416,  "1 = 3; 2 = 2; 3 = 1") # Which comes closest to your view? You can just tell me the number of your choice. ( 1 = Gay + Lesbian should be allowed to marry; 3 = there should be no legal recognition of gay or lesbian couples' relationships)
anesraw$r_V201429  <- car::recode(anesraw$V201429, "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # What is the best way to deal with the problem of urban unrest and rioting? ( 1= Solve problems of racism and police violence; 7 = Use all available force to maintain law and order)
anesraw$r_V201626  <- car::recode(anesraw$V201626,  "1 = 4; 2 = 3; 3 = 2; 4 = 1") # Some people think that the way people talk needs to change with the times to be more sensitive to people from different backgrounds. Others think that this has already gone too far and many people are just too easily offended ( 1 = The way people talk needs to change a lot; 4 = People are much too easily offended)
anesraw$r_V202225  <- car::recode(anesraw$V202225,  "1 = 1; 2 = 3; 3 = 2") # Do you favor, oppose, or neither favor nor oppose placing limits on political campaign spending? (1 = Favor; 3 = Neither favor)
anesraw$r_V202242x <- car::recode(anesraw$V202242x, "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # Do you favor, oppose, or neither favor nor oppose providing a path to citizenship for unauthorized immigrants who obey the law, pay a fine, and pass security checks? (1 = Favor; 7 = Oppose)
anesraw$r_V202256  <- car::recode(anesraw$V202256,  "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # Would it be good for society to have more government regulation, about the same amount of regulation as there is now, or less government regulation? ( 1 = More, 7 = Less)
anesraw$r_V202259x <- car::recode(anesraw$V202259x, "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # Next, do you favor, oppose, or neither favor nor oppose the governmenttrying to reduce the difference in incomes between the richest and poorest households?  (1 = Favor, 7 = Oppose)
anesraw$r_V202325  <- car::recode(anesraw$V202325,  "1 = 2; 2 = 3; 3 = 1") # Do you favor, oppose, or neither favor nor oppose increasing incometaxes on people making over one million dollars per year? (1 = Favor, 3 = Neither)
anesraw$r_V202331x <- car::recode(anesraw$V202331x, "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # Do you favor, oppose, or neither favor nor oppose requiring children to be vaccinated in order to attend public schools? (1 = Favor; 7 = Oppose)
anesraw$r_V202336x <- car::recode(anesraw$V202336x, "1 = 7; 2 = 6; 3 = 5; 4 = 4; 5 = 3; 6 = 2; 7 = 1") # Do you favor, oppose, or neither favor nor oppose increased government regulation on businesses that produce a great deal of greenhouse emissions linked to climate change? (1 = Favor, 7 = Oppose)
anesraw$r_V202337  <- car::recode(anesraw$V202337,  "1 = 2; 2 = 3; 3 = 1") # Do you think the federal government should make it more difficult for people to buy a gun than it is now, make it easier for people to buy a gun, or keep these rules about the same as they are now? (1 = Difficult, 3 = Keep Same)

## Updating the dataset with the recoded items
notrecoded_looseness_recodeditems <- c(  "V201379",   "V201405x",   "V201414x",   "V201415",   "V201416",   "V201429",   "V201626",   "V202225",   "V202242x",   "V202256",   "V202259x",   "V202325",   "V202331x",   "V202336x",    "V202337")
recoded_looseness_recodeditems <-    c("r_V201379", "r_V201405x", "r_V201414x", "r_V201415", "r_V201416", "r_V201429", "r_V201626", "r_V202225", "r_V202242x", "r_V202256", "r_V202259x", "r_V202325", "r_V202331x", "r_V202336x", "r_V202337")

looseness_items <- itemstouse %>% filter(`Type of variable` == "looseness") %>% select(VariableName) %>% dplyr::pull(.)

# Remove variables I recoded
updatedloosenessitems <- looseness_items[! looseness_items %in% notrecoded_looseness_recodeditems]

# Add recoded variables
updatedloosenessitems_withrecode <- append(updatedloosenessitems, recoded_looseness_recodeditems)

# Take reliabilities
loosedataset_recode <- anesraw %>% dplyr::select(updatedloosenessitems_withrecode)

Recoded reliability

psych::alpha(loosedataset_recode)
## Some items ( r_V202225 r_V202325 ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = loosedataset_recode)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##        0.9      0.89    0.91      0.21 8.1 0.0013  3.6 0.75     0.22
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt      0.9   0.9   0.9
## Duhachek   0.9   0.9   0.9
## 
##  Reliability if an item is dropped:
##            raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## V201366         0.90      0.89    0.91      0.21 7.9   0.0013 0.027  0.22
## V201368         0.90      0.89    0.91      0.22 8.2   0.0013 0.026  0.23
## V201369         0.90      0.89    0.91      0.22 8.2   0.0013 0.026  0.23
## V201378         0.90      0.89    0.90      0.21 7.7   0.0014 0.027  0.21
## V201393         0.90      0.89    0.90      0.21 7.7   0.0014 0.027  0.21
## V201408x        0.89      0.88    0.90      0.21 7.6   0.0014 0.026  0.21
## V201411x        0.89      0.88    0.90      0.21 7.5   0.0014 0.025  0.21
## V201417         0.90      0.89    0.90      0.21 7.7   0.0014 0.026  0.21
## V201420x        0.90      0.89    0.90      0.21 7.7   0.0014 0.027  0.21
## V201423x        0.90      0.88    0.90      0.21 7.7   0.0014 0.026  0.21
## V201426x        0.89      0.88    0.90      0.20 7.3   0.0015 0.024  0.21
## V201430         0.90      0.89    0.91      0.22 8.1   0.0013 0.027  0.23
## V202231x        0.90      0.89    0.91      0.21 7.9   0.0013 0.027  0.21
## V202248x        0.90      0.89    0.90      0.21 7.7   0.0014 0.027  0.21
## V202255x        0.89      0.88    0.90      0.21 7.7   0.0014 0.026  0.21
## r_V201379       0.90      0.89    0.91      0.22 8.2   0.0013 0.027  0.23
## r_V201405x      0.90      0.89    0.91      0.21 7.9   0.0013 0.027  0.21
## r_V201414x      0.90      0.89    0.91      0.21 7.8   0.0013 0.027  0.22
## r_V201415       0.90      0.89    0.90      0.21 7.8   0.0013 0.027  0.22
## r_V201416       0.90      0.89    0.90      0.21 7.7   0.0013 0.026  0.21
## r_V201429       0.89      0.88    0.90      0.20 7.4   0.0015 0.024  0.21
## r_V201626       0.90      0.88    0.90      0.21 7.7   0.0014 0.026  0.21
## r_V202225       0.90      0.90    0.91      0.23 8.9   0.0013 0.020  0.23
## r_V202242x      0.90      0.89    0.90      0.21 7.7   0.0014 0.027  0.21
## r_V202256       0.89      0.88    0.90      0.21 7.6   0.0014 0.026  0.21
## r_V202259x      0.89      0.88    0.90      0.21 7.6   0.0014 0.026  0.21
## r_V202325       0.90      0.90    0.91      0.23 8.6   0.0013 0.024  0.23
## r_V202331x      0.90      0.89    0.91      0.22 8.1   0.0013 0.027  0.23
## r_V202336x      0.89      0.88    0.90      0.21 7.5   0.0014 0.025  0.21
## r_V202337       0.90      0.89    0.91      0.22 8.1   0.0013 0.027  0.23
## 
##  Item statistics 
##               n  raw.r std.r  r.cor r.drop mean   sd
## V201366    8223  0.454  0.48  0.452  0.399  3.7 1.32
## V201368    8257  0.243  0.28  0.246  0.204  4.6 0.74
## V201369    8233  0.255  0.29  0.253  0.211  4.1 0.95
## V201378    8204  0.562  0.57  0.551  0.519  4.1 1.20
## V201393    8255  0.550  0.55  0.524  0.515  3.2 1.12
## V201408x   8166  0.643  0.63  0.619  0.587  3.5 2.04
## V201411x   7967  0.695  0.69  0.685  0.647  3.5 2.01
## V201417    8197  0.564  0.57  0.558  0.536  2.8 0.89
## V201420x   8225  0.605  0.57  0.553  0.537  4.5 2.16
## V201423x   8131  0.598  0.60  0.584  0.551  5.0 1.37
## V201426x   8240  0.814  0.79  0.805  0.774  4.3 2.47
## V201430    8245  0.331  0.36  0.311  0.299  2.0 0.80
## V202231x   7235  0.451  0.47  0.438  0.415  2.3 1.02
## V202248x   7384  0.570  0.56  0.540  0.521  6.1 1.54
## V202255x   7348  0.638  0.60  0.592  0.583  3.8 1.97
## r_V201379  8171  0.211  0.26  0.209  0.185  1.6 0.48
## r_V201405x 8242  0.477  0.46  0.431  0.418  5.6 1.61
## r_V201414x 8161  0.456  0.50  0.470  0.419  3.5 0.89
## r_V201415  8152  0.450  0.51  0.493  0.433  1.8 0.40
## r_V201416  8161  0.508  0.55  0.547  0.480  2.6 0.71
## r_V201429  7713  0.770  0.75  0.758  0.733  4.5 2.31
## r_V201626  8104  0.606  0.60  0.585  0.577  2.4 1.11
## r_V202225  7407 -0.150 -0.12 -0.188 -0.173  1.3 0.55
## r_V202242x 7390  0.564  0.54  0.523  0.503  5.3 1.89
## r_V202256  7375  0.643  0.61  0.606  0.598  3.7 1.67
## r_V202259x 7384  0.675  0.63  0.623  0.618  4.4 2.21
## r_V202325  7384 -0.011  0.04 -0.027 -0.038  2.0 0.59
## r_V202331x 7384  0.341  0.34  0.293  0.266  5.8 1.77
## r_V202336x 7364  0.697  0.67  0.667  0.652  5.2 1.88
## r_V202337  7375  0.298  0.33  0.280  0.274  1.7 0.60
## 
## Non missing response frequency for each item
##               1    2    3    4    5    6    7 miss
## V201366    0.10 0.07 0.22 0.21 0.39 0.00 0.00 0.01
## V201368    0.01 0.01 0.07 0.23 0.68 0.00 0.00 0.00
## V201369    0.02 0.03 0.20 0.36 0.39 0.00 0.00 0.01
## V201378    0.04 0.08 0.21 0.12 0.55 0.00 0.00 0.01
## V201393    0.10 0.12 0.43 0.21 0.14 0.00 0.00 0.00
## V201408x   0.26 0.16 0.08 0.06 0.16 0.28 0.00 0.01
## V201411x   0.30 0.11 0.05 0.10 0.21 0.22 0.00 0.04
## V201417    0.13 0.14 0.55 0.17 0.00 0.00 0.00 0.01
## V201420x   0.15 0.09 0.03 0.28 0.03 0.14 0.28 0.01
## V201423x   0.05 0.05 0.02 0.11 0.29 0.48 0.00 0.02
## V201426x   0.26 0.08 0.02 0.18 0.02 0.09 0.35 0.00
## V201430    0.33 0.36 0.31 0.00 0.00 0.00 0.00 0.00
## V202231x   0.29 0.27 0.31 0.13 0.00 0.00 0.00 0.13
## V202248x   0.03 0.02 0.01 0.16 0.02 0.12 0.64 0.11
## V202255x   0.22 0.16 0.03 0.05 0.29 0.25 0.00 0.11
## r_V201379  0.38 0.62 0.00 0.00 0.00 0.00 0.00 0.01
## r_V201405x 0.03 0.04 0.01 0.21 0.04 0.23 0.44 0.00
## r_V201414x 0.07 0.05 0.16 0.72 0.00 0.00 0.00 0.01
## r_V201415  0.20 0.80 0.00 0.00 0.00 0.00 0.00 0.02
## r_V201416  0.13 0.19 0.68 0.00 0.00 0.00 0.00 0.01
## r_V201429  0.18 0.08 0.09 0.13 0.08 0.10 0.34 0.07
## r_V201626  0.27 0.26 0.25 0.22 0.00 0.00 0.00 0.02
## r_V202225  0.70 0.26 0.04 0.00 0.00 0.00 0.00 0.11
## r_V202242x 0.08 0.05 0.01 0.17 0.06 0.29 0.34 0.11
## r_V202256  0.13 0.12 0.15 0.29 0.15 0.12 0.05 0.11
## r_V202259x 0.18 0.09 0.02 0.25 0.03 0.16 0.26 0.11
## r_V202325  0.19 0.65 0.16 0.00 0.00 0.00 0.00 0.11
## r_V202331x 0.05 0.03 0.01 0.16 0.02 0.16 0.56 0.11
## r_V202336x 0.07 0.06 0.01 0.25 0.04 0.20 0.37 0.11
## r_V202337  0.42 0.52 0.07 0.00 0.00 0.00 0.00 0.11

Remake dataset with updated items

# Remove r_V20225 and r_202325; add V20225 + V202325
updatedloosenessitems_withrecode_v2 <- append(updatedloosenessitems_withrecode[! updatedloosenessitems_withrecode %in% c("r_V202225", "r_V202325")], c("V202225", "V202325"))
loosedataset_recode2 <-  anesraw %>% dplyr::select(updatedloosenessitems_withrecode_v2)

# Turns out removing them didn't matter. Still negatively correlated
psych::alpha(loosedataset_recode2)
## Some items ( V202225 V202325 ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = loosedataset_recode2)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.89      0.88     0.9       0.2 7.4 0.0014  3.6 0.74     0.22
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.89  0.89   0.9
## Duhachek  0.89  0.89   0.9
## 
##  Reliability if an item is dropped:
##            raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## V201366         0.89      0.88    0.90      0.20 7.2   0.0014 0.038  0.22
## V201368         0.89      0.88    0.90      0.21 7.5   0.0014 0.037  0.23
## V201369         0.89      0.88    0.90      0.20 7.5   0.0014 0.038  0.23
## V201378         0.89      0.88    0.90      0.20 7.0   0.0014 0.038  0.21
## V201393         0.89      0.88    0.90      0.20 7.1   0.0014 0.038  0.21
## V201408x        0.89      0.87    0.90      0.19 6.9   0.0015 0.037  0.21
## V201411x        0.89      0.87    0.90      0.19 6.8   0.0015 0.036  0.21
## V201417         0.89      0.88    0.90      0.19 7.0   0.0014 0.037  0.21
## V201420x        0.89      0.88    0.90      0.19 7.0   0.0014 0.037  0.21
## V201423x        0.89      0.87    0.90      0.19 7.0   0.0014 0.037  0.21
## V201426x        0.88      0.87    0.89      0.19 6.7   0.0016 0.034  0.21
## V201430         0.89      0.88    0.90      0.20 7.4   0.0014 0.038  0.23
## V202231x        0.89      0.88    0.90      0.20 7.2   0.0014 0.038  0.21
## V202248x        0.89      0.88    0.90      0.20 7.0   0.0014 0.037  0.21
## V202255x        0.89      0.87    0.90      0.19 7.0   0.0015 0.036  0.21
## r_V201379       0.89      0.88    0.91      0.21 7.5   0.0014 0.038  0.23
## r_V201405x      0.89      0.88    0.90      0.20 7.2   0.0014 0.038  0.21
## r_V201414x      0.89      0.88    0.90      0.20 7.1   0.0014 0.038  0.22
## r_V201415       0.89      0.88    0.90      0.20 7.1   0.0014 0.038  0.22
## r_V201416       0.89      0.88    0.90      0.20 7.0   0.0014 0.037  0.21
## r_V201429       0.88      0.87    0.89      0.19 6.7   0.0015 0.035  0.21
## r_V201626       0.89      0.87    0.90      0.19 7.0   0.0014 0.037  0.21
## r_V202242x      0.89      0.88    0.90      0.20 7.1   0.0014 0.037  0.21
## r_V202256       0.89      0.87    0.90      0.19 7.0   0.0015 0.036  0.21
## r_V202259x      0.89      0.87    0.90      0.19 6.9   0.0015 0.036  0.21
## r_V202331x      0.90      0.88    0.90      0.20 7.4   0.0013 0.038  0.23
## r_V202336x      0.89      0.87    0.90      0.19 6.9   0.0015 0.036  0.21
## r_V202337       0.89      0.88    0.90      0.20 7.4   0.0014 0.038  0.23
## V202225         0.90      0.89    0.91      0.22 8.1   0.0013 0.033  0.23
## V202325         0.90      0.90    0.91      0.23 8.6   0.0013 0.024  0.23
## 
##  Item statistics 
##               n raw.r  std.r r.cor r.drop mean   sd
## V201366    8223  0.45  0.471  0.44   0.39  3.7 1.32
## V201368    8257  0.24  0.274  0.24   0.20  4.6 0.74
## V201369    8233  0.25  0.288  0.25   0.21  4.1 0.95
## V201378    8204  0.56  0.568  0.55   0.51  4.1 1.20
## V201393    8255  0.55  0.544  0.52   0.51  3.2 1.12
## V201408x   8166  0.64  0.630  0.62   0.59  3.5 2.04
## V201411x   7967  0.70  0.690  0.69   0.65  3.5 2.01
## V201417    8197  0.57  0.580  0.57   0.54  2.8 0.89
## V201420x   8225  0.61  0.574  0.55   0.54  4.5 2.16
## V201423x   8131  0.60  0.605  0.59   0.55  5.0 1.37
## V201426x   8240  0.81  0.789  0.80   0.77  4.3 2.47
## V201430    8245  0.33  0.361  0.32   0.30  2.0 0.80
## V202231x   7235  0.45  0.472  0.44   0.42  2.3 1.02
## V202248x   7384  0.57  0.560  0.54   0.52  6.1 1.54
## V202255x   7348  0.64  0.596  0.59   0.58  3.8 1.97
## r_V201379  8171  0.21  0.262  0.21   0.18  1.6 0.48
## r_V201405x 8242  0.48  0.463  0.43   0.42  5.6 1.61
## r_V201414x 8161  0.46  0.501  0.48   0.42  3.5 0.89
## r_V201415  8152  0.45  0.512  0.50   0.43  1.8 0.40
## r_V201416  8161  0.51  0.557  0.55   0.48  2.6 0.71
## r_V201429  7713  0.77  0.749  0.76   0.73  4.5 2.31
## r_V201626  8104  0.61  0.601  0.59   0.58  2.4 1.11
## r_V202242x 7390  0.56  0.545  0.52   0.50  5.3 1.89
## r_V202256  7375  0.64  0.613  0.61   0.60  3.7 1.67
## r_V202259x 7384  0.67  0.626  0.62   0.61  4.4 2.21
## r_V202331x 7384  0.34  0.331  0.29   0.26  5.8 1.77
## r_V202336x 7364  0.69  0.668  0.66   0.65  5.2 1.88
## r_V202337  7375  0.29  0.316  0.27   0.27  1.7 0.60
## V202225    7407 -0.11 -0.095 -0.16  -0.15  1.6 0.87
## V202325    7384 -0.46 -0.418 -0.49  -0.49  1.5 0.79
## 
## Non missing response frequency for each item
##               1    2    3    4    5    6    7 miss
## V201366    0.10 0.07 0.22 0.21 0.39 0.00 0.00 0.01
## V201368    0.01 0.01 0.07 0.23 0.68 0.00 0.00 0.00
## V201369    0.02 0.03 0.20 0.36 0.39 0.00 0.00 0.01
## V201378    0.04 0.08 0.21 0.12 0.55 0.00 0.00 0.01
## V201393    0.10 0.12 0.43 0.21 0.14 0.00 0.00 0.00
## V201408x   0.26 0.16 0.08 0.06 0.16 0.28 0.00 0.01
## V201411x   0.30 0.11 0.05 0.10 0.21 0.22 0.00 0.04
## V201417    0.13 0.14 0.55 0.17 0.00 0.00 0.00 0.01
## V201420x   0.15 0.09 0.03 0.28 0.03 0.14 0.28 0.01
## V201423x   0.05 0.05 0.02 0.11 0.29 0.48 0.00 0.02
## V201426x   0.26 0.08 0.02 0.18 0.02 0.09 0.35 0.00
## V201430    0.33 0.36 0.31 0.00 0.00 0.00 0.00 0.00
## V202231x   0.29 0.27 0.31 0.13 0.00 0.00 0.00 0.13
## V202248x   0.03 0.02 0.01 0.16 0.02 0.12 0.64 0.11
## V202255x   0.22 0.16 0.03 0.05 0.29 0.25 0.00 0.11
## r_V201379  0.38 0.62 0.00 0.00 0.00 0.00 0.00 0.01
## r_V201405x 0.03 0.04 0.01 0.21 0.04 0.23 0.44 0.00
## r_V201414x 0.07 0.05 0.16 0.72 0.00 0.00 0.00 0.01
## r_V201415  0.20 0.80 0.00 0.00 0.00 0.00 0.00 0.02
## r_V201416  0.13 0.19 0.68 0.00 0.00 0.00 0.00 0.01
## r_V201429  0.18 0.08 0.09 0.13 0.08 0.10 0.34 0.07
## r_V201626  0.27 0.26 0.25 0.22 0.00 0.00 0.00 0.02
## r_V202242x 0.08 0.05 0.01 0.17 0.06 0.29 0.34 0.11
## r_V202256  0.13 0.12 0.15 0.29 0.15 0.12 0.05 0.11
## r_V202259x 0.18 0.09 0.02 0.25 0.03 0.16 0.26 0.11
## r_V202331x 0.05 0.03 0.01 0.16 0.02 0.16 0.56 0.11
## r_V202336x 0.07 0.06 0.01 0.25 0.04 0.20 0.37 0.11
## r_V202337  0.42 0.52 0.07 0.00 0.00 0.00 0.00 0.11
## V202225    0.70 0.04 0.26 0.00 0.00 0.00 0.00 0.11
## V202325    0.65 0.16 0.19 0.00 0.00 0.00 0.00 0.11

Correlation

corstars(loosedataset_recode)

Final items we use in the analyses

preloosenessitems  <- c("V201369","V201378","r_V201379","V201393","V201403","V201405x","V201406","V201408x","V201411x","r_V201414x","r_V201415","r_V201416","V201417","V201420x","V201423x","V201426x","r_V201429","V201430","r_V201626")
postloosenessitems <- c("r_V202225","V202231x","V202240","r_V202242x","V202248x","V202255x","r_V202256","r_V202259x","r_V202325","r_V202331x","r_V202336x","r_V202337","V202613","V202621")
allloosenessitems <- append(preloosenessitems, postloosenessitems)

Correlation

corstars(loosedataset_recode)

Final items we use in the analyses

preloosenessitems  <- c("V201369","V201378","r_V201379","V201393","V201403","V201405x","V201406","V201408x","V201411x","r_V201414x","r_V201415","r_V201416","V201417","V201420x","V201423x","V201426x","r_V201429","V201430","r_V201626")
postloosenessitems <- c("r_V202225","V202231x","V202240","r_V202242x","V202248x","V202255x","r_V202256","r_V202259x","r_V202325","r_V202331x","r_V202336x","r_V202337","V202613","V202621")
allloosenessitems <- append(preloosenessitems, postloosenessitems)

Congressional District

Build the dataset

congressionaldistrict1 <- anesraw 

Create dataframe of pre- and post- moral diversity SDs

# Pre MD
sds_premd_congressionaldistrict1 <- congressionaldistrict1 %>%
  select(congdist, premd_items) %>%
  as.data.frame()%>%
  mutate_if(is.numeric, .funs = ~scale(.x, center = T, scale = T)[, 1]) %>%
  group_by(congdist) %>%
  summarise_at(vars(premd_items), funs(sd(., na.rm = TRUE)))

# Post MD
sds_postmd_congressionaldistrict1 <- congressionaldistrict1 %>%
  select(congdist, postmd_items)  %>%
  as.data.frame()%>%
  mutate_if(is.numeric, .funs = ~scale(.x, center = T, scale = T)[, 1]) %>%
  group_by(congdist) %>%
  summarise_at(vars(postmd_items), funs(sd(., na.rm = TRUE)))

PCA

# To create PCA
congdist_premddata <- sds_premd_congressionaldistrict1 %>% tibble::column_to_rownames("congdist")
congdist_postmddata <- sds_postmd_congressionaldistrict1%>% tibble::column_to_rownames("congdist")
congdist_allmddata <- sds_all <- sds_premd_congressionaldistrict1 %>% left_join(sds_postmd_congressionaldistrict1) %>% tibble::column_to_rownames("congdist")

# Pre MD - Impute missing values
for(i in 1:ncol(congdist_premddata)) {
  congdist_premddata[is.na(congdist_premddata[, i]), i] <- mean(congdist_premddata[, i], na.rm = TRUE)
}

# Post MD - Impute missing values
for(i in 1:ncol(congdist_postmddata)) {
  congdist_postmddata[is.na(congdist_postmddata[, i]), i] <- mean(congdist_postmddata[, i], na.rm = TRUE)
}

# All MD - Impute missing values
for(i in 1:ncol(sds_all)) {
  congdist_allmddata[is.na(congdist_allmddata[, i]), i] <- mean(congdist_allmddata[, i], na.rm = TRUE)
}

# Create PCAs
congdist_premdpc <- as.data.frame(prcomp(congdist_premddata, scale. = TRUE)$x[,1]) %>% rownames_to_column("congdist")
congdist_postmdpc <- as.data.frame(prcomp(congdist_postmddata, scale. = TRUE)$x[,1]) %>% rownames_to_column("congdist")
congdist_allmdpc <- as.data.frame(prcomp(congdist_allmddata, scale. = TRUE)$x[,1]) %>% rownames_to_column("congdist")

Combine Moral Diversity PCAs

congdist_moraldiversitydata <- congdist_premdpc %>%
  left_join(congdist_postmdpc) %>%
  left_join(congdist_allmdpc) %>%
  rename(
    premoraldiversity = 2,
    postmoraldiversity = 3,
    allmdpc = 4
  ) %>%
  separate(congdist, into = c("state", "distnum"), sep = "-", remove = FALSE)%>%
  as.data.frame()

Looseness

# Combine all of the looseness items
congdist_avgdlooseness <- congressionaldistrict1 %>% 
  dplyr::select(congdist, preloosenessitems, postloosenessitems) %>%
  as.data.frame() %>%
  mutate_if(is.numeric, .funs = ~scale(.x, center = T, scale = T)[, 1]) %>%
  dplyr::mutate(
    preloosemean = mean(c_across(preloosenessitems), na.rm = TRUE),
    postloosemean = mean(c_across(postloosenessitems), na.rm = TRUE),
    allloosenessmean = mean(c_across(allloosenessitems), na.rm = TRUE))%>%
  dplyr::select(congdist, allloosenessitems, preloosemean, postloosemean, allloosenessmean) %>%
  select(congdist, preloosemean, postloosemean, allloosenessmean) %>%
  dplyr::group_by(congdist) %>%
  dplyr::summarize_if(
    is.numeric, mean
  )

Censorship

# Select the censorship items I plan to use
itemstouse <- readxl::read_excel("Archival Studies/ANES/ANESAnalysis.xlsx") %>% filter(is.na(EXCLUDE))

# Create a vector of the variable names
censorshipnames <- itemstouse %>%
  dplyr::filter(`Type of variable` == "censor")  %>%
  select(VariableName) %>%
  dplyr::pull()

# Create a dataframe with the all censorship items
congdist_censorshiptotal <-  congressionaldistrict1 %>%
  as.data.frame() %>%
  select(congdist, censorshipnames, V201627) %>%
  dplyr::mutate(across(where(is.numeric), scale)) %>%
  dplyr::rowwise() %>%
  dplyr::mutate(censorshipmean = mean(c_across(censorshipnames), na.rm = TRUE)) %>%
  dplyr::group_by(congdist) %>%
  dplyr::summarize_if(
    is.numeric, mean, na.rm = TRUE
  )

Combine datasets

congdist_anesdataraw <- congdist_moraldiversitydata %>%
  left_join(congdist_avgdlooseness, by = "congdist") %>%
  left_join(congdist_censorshiptotal, by = "congdist") 

State

Build the dataset

state1 <- congressionaldistrict1 

Create dataframe of pre- and post- moral diversity SDs

# Pre MD
sds_premd_state1 <- state1 %>%
  select(state, premd_items) %>%
  as.data.frame()%>%
  mutate_if(is.numeric, .funs = ~scale(.x, center = T, scale = T)[, 1]) %>%
  group_by(state) %>%
  summarise_at(vars(premd_items), funs(sd(., na.rm = TRUE)))

# Post MD
sds_postmd_state1 <- state1 %>%
  select(state, postmd_items)  %>%
  as.data.frame()%>%
  mutate_if(is.numeric, .funs = ~scale(.x, center = T, scale = T)[, 1]) %>%
  group_by(state) %>%
  summarise_at(vars(postmd_items), funs(sd(., na.rm = TRUE)))

PCA

I did not run the chunks below because I the signs flipped. However, the absolute values are identical.

# To create PCA
state_premddata <- sds_premd_state1 %>% tibble::column_to_rownames("state")
state_postmddata <- sds_postmd_state1%>% tibble::column_to_rownames("state")
state_allmddata <- sds_all <- sds_premd_state1 %>% left_join(sds_postmd_state1) %>% tibble::column_to_rownames("state")

# Pre MD - Impute missing values
for(i in 1:ncol(state_premddata)) {
  state_premddata[is.na(state_premddata[, i]), i] <- mean(state_premddata[, i], na.rm = TRUE)
}

# Post MD - Impute missing values
for(i in 1:ncol(state_postmddata)) {
  state_postmddata[is.na(state_postmddata[, i]), i] <- mean(state_postmddata[, i], na.rm = TRUE)
}

# All MD - Impute missing values
for(i in 1:ncol(sds_all)) {
  state_allmddata[is.na(state_allmddata[, i]), i] <- mean(state_allmddata[, i], na.rm = TRUE)
}

# Create PCAs
state_premdpc <- as.data.frame(prcomp(state_premddata, scale. = TRUE)$x[,1]) %>% rownames_to_column("state")
state_postmdpc <- as.data.frame(prcomp(state_postmddata, scale. = TRUE)$x[,1]) %>% rownames_to_column("state")
state_allmdpc <- as.data.frame(prcomp(state_allmddata, scale. = TRUE)$x[,1]) %>% rownames_to_column("state")

Combine Moral Diversity PCAs

state_moraldiversitydata <- congdist_moraldiversitydata %>%
  group_by(state) %>%
  dplyr::summarize_if(is.numeric, mean, na.rm = TRUE)

Looseness

# Combine all of the looseness items
state_avgdlooseness <- state1 %>% 
  dplyr::select(state, preloosenessitems, postloosenessitems) %>%
  as.data.frame() %>%
  mutate_if(is.numeric, .funs = ~scale(.x, center = T, scale = T)[, 1]) %>%
  dplyr::mutate(
    preloosemean = mean(c_across(preloosenessitems), na.rm = TRUE),
    postloosemean = mean(c_across(postloosenessitems), na.rm = TRUE),
    allloosenessmean = mean(c_across(allloosenessitems), na.rm = TRUE))%>%
  dplyr::select(state, allloosenessitems, preloosemean, postloosemean, allloosenessmean)%>%
  as.data.frame() %>%
  select(state, preloosemean, postloosemean, allloosenessmean) %>%
  dplyr::group_by(state) %>%
  dplyr::summarize_if(
    is.numeric, mean
  )

Censorship

# Select the censorship items I plan to use
itemstouse <- readxl::read_excel("Archival Studies/ANES/ANESAnalysis.xlsx") %>% filter(is.na(EXCLUDE))

# Create a vector of the variable names
censorshipnames <- itemstouse %>%
  dplyr::filter(`Type of variable` == "censor")  %>%
  select(VariableName) %>%
  dplyr::pull()

# Create a dataframe with the all censorship items
state_censorshiptotal <-  state1 %>%
  as.data.frame() %>%
  select(state, censorshipnames, V201627) %>%
  dplyr::mutate(across(where(is.numeric), scale)) %>%
  dplyr::rowwise() %>%
  dplyr::mutate(censorshipmean = mean(c_across(censorshipnames), na.rm = TRUE)) %>%
  dplyr::group_by(state) %>%
  dplyr::summarize_if(
    is.numeric, mean, na.rm = TRUE
  )

Combine datasets

state_anesdataraw <- state_moraldiversitydata %>%
  left_join(state_avgdlooseness, by = "state") %>%
  left_join(state_censorshiptotal, by = "state")

Do we need to nest in state for each censorship item?

No: the highest ICC is ~ .30

library(lme4)
var_list <- c("V201353", "V201356x", "V201359x", "V201362x", "V201375x")
map_dfr(var_list,
                  function(x){
                    formula_mlm = as.formula(paste0(x,"~ allmdpc + (1|state)"));
                    model_fit = lmer(formula_mlm,data=congdist_anesdataraw);
                    re_variances = VarCorr(model_fit,comp="Variance") %>% 
                      data.frame() %>% 
                      dplyr::mutate(variable = x);
                    return(re_variances)
                  }) %>% 
  dplyr::select(variable,grp,vcov) %>% 
  pivot_wider(names_from="grp",values_from="vcov") %>% 
  dplyr::mutate(icc = state/(state+Residual))

Scale reliabilities

Correlation between PRE MD and POST MD

with(congdist_anesdataraw, cor.test(premoraldiversity, postmoraldiversity))
## 
##  Pearson's product-moment correlation
## 
## data:  premoraldiversity and postmoraldiversity
## t = -8.6, df = 434, p-value <0.0000000000000002
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.4600 -0.2995
## sample estimates:
##     cor 
## -0.3826

Correlation between PRE Looseness and POST Looseness

with(congdist_anesdataraw, cor.test(preloosemean, postloosemean))
## 
##  Pearson's product-moment correlation
## 
## data:  preloosemean and postloosemean
## t = NA, df = 434, p-value = NA
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  NA NA
## sample estimates:
## cor 
##  NA

Reliabilities of censorship

with(congressionaldistrict1, psych::alpha(data.frame(cbind(V201353, V201356x, V201362x, V201375x))))
## Some items ( V201353 V201375x ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = data.frame(cbind(V201353, V201356x, V201362x, 
##     V201375x)))
## 
##   raw_alpha std.alpha G6(smc) average_r   S/N   ase mean   sd median_r
##      -0.48     -0.59   -0.22      -0.1 -0.37 0.026  3.8 0.78    -0.25
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt    -0.53 -0.48 -0.43
## Duhachek -0.53 -0.48 -0.43
## 
##  Reliability if an item is dropped:
##          raw_alpha std.alpha G6(smc) average_r   S/N alpha se var.r med.r
## V201353     -0.280     -0.30  -0.050    -0.084 -0.23    0.024 0.109 -0.24
## V201356x    -0.432     -0.33  -0.106    -0.090 -0.25    0.027 0.075 -0.24
## V201362x    -0.737     -0.57  -0.193    -0.137 -0.36    0.034 0.099 -0.31
## V201375x    -0.011     -0.36  -0.072    -0.097 -0.26    0.015 0.117 -0.26
## 
##  Item statistics 
##             n raw.r std.r r.cor r.drop mean  sd
## V201353  8134 0.094  0.38   NaN -0.238  2.6 1.0
## V201356x 8257 0.562  0.40   NaN -0.141  4.3 2.1
## V201362x 8251 0.596  0.48   NaN -0.043  3.0 2.0
## V201375x 8214 0.338  0.41   NaN -0.289  5.1 1.9
## 
## Non missing response frequency for each item
##             1    2    3    4    5    6    7 miss
## V201353  0.14 0.34 0.32 0.14 0.05 0.00 0.00 0.02
## V201356x 0.15 0.09 0.02 0.37 0.02 0.09 0.27 0.00
## V201362x 0.30 0.21 0.06 0.25 0.02 0.06 0.10 0.00
## V201375x 0.07 0.07 0.02 0.28 0.03 0.17 0.36 0.01

Reliabilities of Pre-looseness

with(congressionaldistrict1, psych::alpha(data.frame(congressionaldistrict1[preloosenessitems])))
## Some items ( V201403 V201405x ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = data.frame(congressionaldistrict1[preloosenessitems]))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.81      0.82    0.87      0.19 4.5 0.0023  3.1 0.67     0.23
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.81  0.81  0.82
## Duhachek  0.81  0.81  0.82
## 
##  Reliability if an item is dropped:
##            raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## V201369         0.81      0.82    0.88      0.21 4.7   0.0023 0.063  0.26
## V201378         0.80      0.81    0.87      0.19 4.2   0.0025 0.062  0.21
## r_V201379       0.81      0.82    0.88      0.20 4.6   0.0023 0.064  0.26
## V201393         0.80      0.81    0.87      0.19 4.2   0.0025 0.062  0.23
## V201403         0.82      0.84    0.88      0.23 5.4   0.0022 0.047  0.25
## V201405x        0.85      0.85    0.88      0.24 5.5   0.0018 0.041  0.25
## V201406         0.80      0.80    0.85      0.18 4.1   0.0024 0.057  0.21
## V201408x        0.79      0.80    0.84      0.18 4.0   0.0026 0.055  0.21
## V201411x        0.78      0.80    0.86      0.18 3.9   0.0027 0.058  0.21
## r_V201414x      0.80      0.81    0.87      0.19 4.2   0.0024 0.062  0.22
## r_V201415       0.81      0.81    0.86      0.19 4.2   0.0024 0.061  0.23
## r_V201416       0.80      0.80    0.86      0.19 4.1   0.0024 0.060  0.21
## V201417         0.80      0.80    0.86      0.19 4.1   0.0025 0.061  0.21
## V201420x        0.80      0.81    0.86      0.19 4.2   0.0025 0.061  0.22
## V201423x        0.79      0.80    0.86      0.19 4.1   0.0025 0.060  0.21
## V201426x        0.77      0.79    0.85      0.18 3.8   0.0030 0.055  0.21
## r_V201429       0.78      0.80    0.85      0.18 3.9   0.0028 0.056  0.21
## V201430         0.81      0.82    0.87      0.20 4.4   0.0024 0.064  0.25
## r_V201626       0.80      0.81    0.86      0.19 4.1   0.0025 0.060  0.21
## 
##  Item statistics 
##               n raw.r std.r r.cor r.drop mean   sd
## V201369    8233  0.23  0.25  0.16   0.15  4.1 0.95
## V201378    8204  0.56  0.55  0.51   0.48  4.1 1.20
## r_V201379  8171  0.22  0.30  0.22   0.19  1.6 0.48
## V201393    8255  0.53  0.52  0.47   0.46  3.2 1.12
## V201403    8245 -0.16 -0.13 -0.19  -0.22  1.5 0.82
## V201405x   8242 -0.24 -0.22 -0.28  -0.36  2.4 1.61
## V201406    8168  0.61  0.62  0.65   0.59  1.5 0.50
## V201408x   8166  0.69  0.69  0.73   0.59  3.5 2.04
## V201411x   7967  0.73  0.71  0.70   0.65  3.5 2.01
## r_V201414x 8161  0.46  0.52  0.48   0.40  3.5 0.89
## r_V201415  8152  0.47  0.56  0.54   0.45  1.8 0.40
## r_V201416  8161  0.54  0.61  0.60   0.50  2.6 0.71
## V201417    8197  0.59  0.59  0.56   0.54  2.8 0.89
## V201420x   8225  0.62  0.56  0.52   0.50  4.5 2.16
## V201423x   8131  0.61  0.60  0.57   0.53  5.0 1.37
## V201426x   8240  0.83  0.77  0.78   0.75  4.3 2.47
## r_V201429  7713  0.78  0.72  0.73   0.70  4.5 2.31
## V201430    8245  0.37  0.40  0.33   0.32  2.0 0.80
## r_V201626  8104  0.60  0.58  0.54   0.54  2.4 1.11
## 
## Non missing response frequency for each item
##               1    2    3    4    5    6    7 miss
## V201369    0.02 0.03 0.20 0.36 0.39 0.00 0.00 0.01
## V201378    0.04 0.08 0.21 0.12 0.55 0.00 0.00 0.01
## r_V201379  0.38 0.62 0.00 0.00 0.00 0.00 0.00 0.01
## V201393    0.10 0.12 0.43 0.21 0.14 0.00 0.00 0.00
## V201403    0.71 0.08 0.21 0.00 0.00 0.00 0.00 0.00
## V201405x   0.44 0.23 0.04 0.21 0.01 0.04 0.03 0.00
## V201406    0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.01
## V201408x   0.26 0.16 0.08 0.06 0.16 0.28 0.00 0.01
## V201411x   0.30 0.11 0.05 0.10 0.21 0.22 0.00 0.04
## r_V201414x 0.07 0.05 0.16 0.72 0.00 0.00 0.00 0.01
## r_V201415  0.20 0.80 0.00 0.00 0.00 0.00 0.00 0.02
## r_V201416  0.13 0.19 0.68 0.00 0.00 0.00 0.00 0.01
## V201417    0.13 0.14 0.55 0.17 0.00 0.00 0.00 0.01
## V201420x   0.15 0.09 0.03 0.28 0.03 0.14 0.28 0.01
## V201423x   0.05 0.05 0.02 0.11 0.29 0.48 0.00 0.02
## V201426x   0.26 0.08 0.02 0.18 0.02 0.09 0.35 0.00
## r_V201429  0.18 0.08 0.09 0.13 0.08 0.10 0.34 0.07
## V201430    0.33 0.36 0.31 0.00 0.00 0.00 0.00 0.00
## r_V201626  0.27 0.26 0.25 0.22 0.00 0.00 0.00 0.02

Reliabilities of Post-looseness

with(congressionaldistrict1, psych::alpha(data.frame(congressionaldistrict1[postloosenessitems])))
## Some items ( r_V202225 V202240 r_V202325 ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = data.frame(congressionaldistrict1[postloosenessitems]))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.71      0.58    0.67       0.1 1.4 0.0038  3.1 0.63     0.13
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt      0.7  0.71  0.72
## Duhachek   0.7  0.71  0.72
## 
##  Reliability if an item is dropped:
##            raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
## r_V202225       0.73      0.63    0.71     0.136 1.73   0.0037 0.057 0.175
## V202231x        0.69      0.54    0.65     0.095 1.16   0.0039 0.064 0.094
## V202240         0.75      0.67    0.71     0.158 2.06   0.0035 0.040 0.175
## r_V202242x      0.69      0.55    0.62     0.101 1.24   0.0040 0.049 0.092
## V202248x        0.68      0.52    0.63     0.091 1.10   0.0041 0.057 0.092
## V202255x        0.64      0.47    0.58     0.075 0.89   0.0047 0.052 0.092
## r_V202256       0.64      0.48    0.58     0.076 0.91   0.0046 0.051 0.092
## r_V202259x      0.64      0.49    0.60     0.080 0.96   0.0047 0.052 0.092
## r_V202325       0.72      0.62    0.70     0.128 1.62   0.0037 0.063 0.179
## r_V202331x      0.71      0.56    0.66     0.105 1.29   0.0036 0.063 0.119
## r_V202336x      0.64      0.49    0.59     0.079 0.95   0.0047 0.050 0.092
## r_V202337       0.71      0.56    0.66     0.102 1.25   0.0039 0.065 0.140
## 
##  Item statistics 
##               n    raw.r  std.r  r.cor r.drop mean   sd
## r_V202225  7407 -0.10936  0.057 -0.145 -0.171  1.3 0.55
## V202231x   7235  0.42830  0.496  0.393  0.326  2.3 1.02
## V202240    7395 -0.31294 -0.182 -0.346 -0.390  1.5 0.77
## r_V202242x 7390  0.54585  0.435  0.421  0.367  5.3 1.89
## V202248x   7384  0.57860  0.544  0.483  0.444  6.1 1.54
## V202255x   7348  0.74771  0.717  0.756  0.619  3.8 1.97
## r_V202256  7375  0.73632  0.703  0.737  0.629  3.7 1.67
## r_V202259x 7384  0.74026  0.660  0.662  0.587  4.4 2.21
## r_V202325  7384  0.00011  0.139 -0.065 -0.067  2.0 0.59
## r_V202331x 7384  0.43424  0.389  0.259  0.248  5.8 1.77
## r_V202336x 7364  0.74351  0.670  0.681  0.622  5.2 1.88
## r_V202337  7375  0.30419  0.423  0.294  0.241  1.7 0.60
## 
## Non missing response frequency for each item
##               1    2    3    4    5    6    7 miss
## r_V202225  0.70 0.26 0.04 0.00 0.00 0.00 0.00 0.11
## V202231x   0.29 0.27 0.31 0.13 0.00 0.00 0.00 0.13
## V202240    0.69 0.14 0.17 0.00 0.00 0.00 0.00 0.11
## r_V202242x 0.08 0.05 0.01 0.17 0.06 0.29 0.34 0.11
## V202248x   0.03 0.02 0.01 0.16 0.02 0.12 0.64 0.11
## V202255x   0.22 0.16 0.03 0.05 0.29 0.25 0.00 0.11
## r_V202256  0.13 0.12 0.15 0.29 0.15 0.12 0.05 0.11
## r_V202259x 0.18 0.09 0.02 0.25 0.03 0.16 0.26 0.11
## r_V202325  0.19 0.65 0.16 0.00 0.00 0.00 0.00 0.11
## r_V202331x 0.05 0.03 0.01 0.16 0.02 0.16 0.56 0.11
## r_V202336x 0.07 0.06 0.01 0.25 0.04 0.20 0.37 0.11
## r_V202337  0.42 0.52 0.07 0.00 0.00 0.00 0.00 0.11

Reliabilities of all looseness

with(congressionaldistrict1, psych::alpha(data.frame(congressionaldistrict1[allloosenessitems])))
## Some items ( V201403 V201405x r_V202225 V202240 r_V202325 ) were negatively correlated with the total scale and 
## probably should be reversed.  
## To do this, run the function again with the 'check.keys=TRUE' option
## 
## Reliability analysis   
## Call: psych::alpha(x = data.frame(congressionaldistrict1[allloosenessitems]))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.87      0.85    0.89      0.15 5.7 0.0016  3.1 0.61     0.18
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.87  0.87  0.87
## Duhachek  0.87  0.87  0.87
## 
##  Reliability if an item is dropped:
##            raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## V201369         0.87      0.85    0.90      0.16 5.7   0.0016 0.054  0.21
## V201378         0.86      0.84    0.89      0.15 5.3   0.0017 0.053  0.18
## r_V201379       0.87      0.85    0.90      0.16 5.7   0.0016 0.054  0.21
## V201393         0.86      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## V201403         0.88      0.86    0.90      0.17 6.3   0.0016 0.047  0.21
## V201405x        0.89      0.87    0.90      0.18 6.4   0.0014 0.044  0.21
## V201406         0.87      0.84    0.88      0.15 5.2   0.0017 0.051  0.18
## V201408x        0.86      0.84    0.88      0.15 5.2   0.0017 0.050  0.18
## V201411x        0.86      0.84    0.88      0.15 5.1   0.0018 0.050  0.18
## r_V201414x      0.87      0.84    0.89      0.15 5.4   0.0017 0.053  0.18
## r_V201415       0.87      0.84    0.89      0.15 5.4   0.0016 0.053  0.18
## r_V201416       0.87      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## V201417         0.86      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## V201420x        0.86      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## V201423x        0.86      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## V201426x        0.85      0.83    0.88      0.14 5.0   0.0019 0.048  0.18
## r_V201429       0.85      0.84    0.88      0.14 5.1   0.0018 0.049  0.18
## V201430         0.87      0.85    0.89      0.16 5.5   0.0016 0.054  0.20
## r_V201626       0.86      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## r_V202225       0.87      0.86    0.90      0.17 6.1   0.0016 0.051  0.21
## V202231x        0.87      0.84    0.89      0.15 5.4   0.0017 0.054  0.18
## V202240         0.88      0.86    0.90      0.18 6.4   0.0016 0.046  0.21
## r_V202242x      0.86      0.84    0.89      0.15 5.4   0.0017 0.051  0.18
## V202248x        0.86      0.84    0.89      0.15 5.3   0.0017 0.052  0.18
## V202255x        0.86      0.84    0.89      0.15 5.2   0.0017 0.051  0.18
## r_V202256       0.86      0.84    0.89      0.15 5.2   0.0017 0.051  0.18
## r_V202259x      0.86      0.84    0.89      0.15 5.2   0.0018 0.051  0.18
## r_V202325       0.87      0.86    0.90      0.17 6.0   0.0016 0.053  0.21
## r_V202331x      0.87      0.85    0.89      0.16 5.6   0.0016 0.054  0.20
## r_V202336x      0.86      0.84    0.89      0.15 5.2   0.0018 0.050  0.18
## r_V202337       0.87      0.85    0.89      0.16 5.6   0.0016 0.054  0.20
## 
##  Item statistics 
##               n raw.r  std.r  r.cor r.drop mean   sd
## V201369    8233  0.21  0.226  0.167  0.166  4.1 0.95
## V201378    8204  0.55  0.547  0.523  0.502  4.1 1.20
## r_V201379  8171  0.21  0.264  0.206  0.184  1.6 0.48
## V201393    8255  0.55  0.548  0.524  0.514  3.2 1.12
## V201403    8245 -0.22 -0.195 -0.240 -0.271  1.5 0.82
## V201405x   8242 -0.31 -0.291 -0.339 -0.396  2.4 1.61
## V201406    8168  0.59  0.614  0.640  0.580  1.5 0.50
## V201408x   8166  0.66  0.682  0.713  0.605  3.5 2.04
## V201411x   7967  0.70  0.699  0.698  0.650  3.5 2.01
## r_V201414x 8161  0.44  0.478  0.450  0.400  3.5 0.89
## r_V201415  8152  0.45  0.514  0.500  0.431  1.8 0.40
## r_V201416  8161  0.51  0.561  0.555  0.476  2.6 0.71
## V201417    8197  0.56  0.564  0.548  0.530  2.8 0.89
## V201420x   8225  0.60  0.559  0.538  0.524  4.5 2.16
## V201423x   8131  0.59  0.579  0.564  0.535  5.0 1.37
## V201426x   8240  0.82  0.791  0.809  0.775  4.3 2.47
## r_V201429  7713  0.76  0.742  0.753  0.724  4.5 2.31
## V201430    8245  0.35  0.376  0.328  0.310  2.0 0.80
## r_V201626  8104  0.60  0.598  0.582  0.572  2.4 1.11
## r_V202225  7407 -0.13 -0.073 -0.147 -0.151  1.3 0.55
## V202231x   7235  0.46  0.484  0.449  0.423  2.3 1.02
## V202240    7395 -0.33 -0.274 -0.330 -0.358  1.5 0.77
## r_V202242x 7390  0.54  0.491  0.487  0.469  5.3 1.89
## V202248x   7384  0.56  0.534  0.509  0.499  6.1 1.54
## V202255x   7348  0.65  0.608  0.605  0.587  3.8 1.97
## r_V202256  7375  0.65  0.618  0.614  0.600  3.7 1.67
## r_V202259x 7384  0.67  0.620  0.612  0.606  4.4 2.21
## r_V202325  7384 -0.02  0.029 -0.047 -0.051  2.0 0.59
## r_V202331x 7384  0.35  0.336  0.288  0.264  5.8 1.77
## r_V202336x 7364  0.69  0.652  0.647  0.636  5.2 1.88
## r_V202337  7375  0.30  0.332  0.280  0.274  1.7 0.60
## 
## Non missing response frequency for each item
##               1    2    3    4    5    6    7 miss
## V201369    0.02 0.03 0.20 0.36 0.39 0.00 0.00 0.01
## V201378    0.04 0.08 0.21 0.12 0.55 0.00 0.00 0.01
## r_V201379  0.38 0.62 0.00 0.00 0.00 0.00 0.00 0.01
## V201393    0.10 0.12 0.43 0.21 0.14 0.00 0.00 0.00
## V201403    0.71 0.08 0.21 0.00 0.00 0.00 0.00 0.00
## V201405x   0.44 0.23 0.04 0.21 0.01 0.04 0.03 0.00
## V201406    0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.01
## V201408x   0.26 0.16 0.08 0.06 0.16 0.28 0.00 0.01
## V201411x   0.30 0.11 0.05 0.10 0.21 0.22 0.00 0.04
## r_V201414x 0.07 0.05 0.16 0.72 0.00 0.00 0.00 0.01
## r_V201415  0.20 0.80 0.00 0.00 0.00 0.00 0.00 0.02
## r_V201416  0.13 0.19 0.68 0.00 0.00 0.00 0.00 0.01
## V201417    0.13 0.14 0.55 0.17 0.00 0.00 0.00 0.01
## V201420x   0.15 0.09 0.03 0.28 0.03 0.14 0.28 0.01
## V201423x   0.05 0.05 0.02 0.11 0.29 0.48 0.00 0.02
## V201426x   0.26 0.08 0.02 0.18 0.02 0.09 0.35 0.00
## r_V201429  0.18 0.08 0.09 0.13 0.08 0.10 0.34 0.07
## V201430    0.33 0.36 0.31 0.00 0.00 0.00 0.00 0.00
## r_V201626  0.27 0.26 0.25 0.22 0.00 0.00 0.00 0.02
## r_V202225  0.70 0.26 0.04 0.00 0.00 0.00 0.00 0.11
## V202231x   0.29 0.27 0.31 0.13 0.00 0.00 0.00 0.13
## V202240    0.69 0.14 0.17 0.00 0.00 0.00 0.00 0.11
## r_V202242x 0.08 0.05 0.01 0.17 0.06 0.29 0.34 0.11
## V202248x   0.03 0.02 0.01 0.16 0.02 0.12 0.64 0.11
## V202255x   0.22 0.16 0.03 0.05 0.29 0.25 0.00 0.11
## r_V202256  0.13 0.12 0.15 0.29 0.15 0.12 0.05 0.11
## r_V202259x 0.18 0.09 0.02 0.25 0.03 0.16 0.26 0.11
## r_V202325  0.19 0.65 0.16 0.00 0.00 0.00 0.00 0.11
## r_V202331x 0.05 0.03 0.01 0.16 0.02 0.16 0.56 0.11
## r_V202336x 0.07 0.06 0.01 0.25 0.04 0.20 0.37 0.11
## r_V202337  0.42 0.52 0.07 0.00 0.00 0.00 0.00 0.11

Congressional district Linear Regressions

DV: Looseness

Pre MD –> Pre looseness

summary(lm(preloosemean~premoraldiversity, congdist_anesdataraw))
## 
## Call:
## lm(formula = preloosemean ~ premoraldiversity, data = congdist_anesdataraw)
## 
## Residuals:
##                                   Min                                    1Q                                Median                                    3Q                                   Max 
## -0.0000000000000000000000000000000096 -0.0000000000000000000000000000000046 -0.0000000000000000000000000000000031 -0.0000000000000000000000000000000018  0.0000000000000000000000000000013891 
## 
## Coefficients:
##                                                Estimate                            Std. Error              t value            Pr(>|t|)    
## (Intercept)       0.00000000000000003429670765708743018 0.00000000000000000000000000000000320 10722980050021052.00 <0.0000000000000002 ***
## premoraldiversity 0.00000000000000000000000000000000148 0.00000000000000000000000000000000240                 0.62                0.54    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0000000000000000000000000000000668 on 434 degrees of freedom
## Multiple R-squared:  0.499,  Adjusted R-squared:  0.498 
## F-statistic:  433 on 1 and 434 DF,  p-value: <0.0000000000000002

Pre MD –> Post looseness

summary(lm(postloosemean~premoraldiversity, congdist_anesdataraw))
## 
## Call:
## lm(formula = postloosemean ~ premoraldiversity, data = congdist_anesdataraw)
## 
## Residuals:
##                                  Min                                   1Q                               Median                                   3Q                                  Max 
## -0.000000000000000000000000000030817  0.000000000000000000000000000000041  0.000000000000000000000000000000069  0.000000000000000000000000000000101  0.000000000000000000000000000000212 
## 
## Coefficients:
##                                                Estimate                            Std. Error              t value            Pr(>|t|)    
## (Intercept)       -0.0000000000000002807191227500628565  0.0000000000000000000000000000000710 -3956192494309554.50 <0.0000000000000002 ***
## premoraldiversity -0.0000000000000000000000000000000329  0.0000000000000000000000000000000532                -0.62                0.54    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.00000000000000000000000000000148 on 434 degrees of freedom
## Multiple R-squared:   0.5,   Adjusted R-squared:  0.499 
## F-statistic:  434 on 1 and 434 DF,  p-value: <0.0000000000000002

Post MD –> Post looseness

summary(lm(postloosemean~postmoraldiversity, congdist_anesdataraw))
## 
## Call:
## lm(formula = postloosemean ~ postmoraldiversity, data = congdist_anesdataraw)
## 
## Residuals:
##                                  Min                                   1Q                               Median                                   3Q                                  Max 
## -0.000000000000000000000000000030829  0.000000000000000000000000000000050  0.000000000000000000000000000000073  0.000000000000000000000000000000090  0.000000000000000000000000000000163 
## 
## Coefficients:
##                                                 Estimate                            Std. Error              t value            Pr(>|t|)    
## (Intercept)        -0.0000000000000002807191227500628565  0.0000000000000000000000000000000710 -3955419925683549.00 <0.0000000000000002 ***
## postmoraldiversity -0.0000000000000000000000000000000158  0.0000000000000000000000000000000342                -0.46                0.65    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.00000000000000000000000000000148 on 434 degrees of freedom
## Multiple R-squared:   0.5,   Adjusted R-squared:  0.499 
## F-statistic:  434 on 1 and 434 DF,  p-value: <0.0000000000000002

All MD –> All looseness

summary(lm(allloosenessmean~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = allloosenessmean ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##                                  Min                                   1Q                               Median                                   3Q                                  Max 
## -0.000000000000000000000000000000114 -0.000000000000000000000000000000076 -0.000000000000000000000000000000067 -0.000000000000000000000000000000054  0.000000000000000000000000000028384 
## 
## Coefficients:
##                                           Estimate                             Std. Error              t value            Pr(>|t|)    
## (Intercept) -0.00000000000000015965810324423840777  0.00000000000000000000000000000006533 -2443795319904543.50 <0.0000000000000002 ***
## allmdpc     -0.00000000000000000000000000000000789  0.00000000000000000000000000000002949                -0.27                0.79    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.00000000000000000000000000000136 on 434 degrees of freedom
## Multiple R-squared:   0.5,   Adjusted R-squared:  0.499 
## F-statistic:  434 on 1 and 434 DF,  p-value: <0.0000000000000002

Pre MD –> Censorship

summary(lm(censorshipmean~premoraldiversity, congdist_anesdataraw))
## 
## Call:
## lm(formula = censorshipmean ~ premoraldiversity, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4067 -0.0707 -0.0057  0.0710  0.4198 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)   
## (Intercept)       -0.000103   0.005045   -0.02   0.9837   
## premoraldiversity  0.011619   0.003781    3.07   0.0023 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.105 on 434 degrees of freedom
## Multiple R-squared:  0.0213, Adjusted R-squared:  0.019 
## F-statistic: 9.44 on 1 and 434 DF,  p-value: 0.00225

Post MD –> Censorship

summary(lm(censorshipmean~postmoraldiversity, congdist_anesdataraw))
## 
## Call:
## lm(formula = censorshipmean ~ postmoraldiversity, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4123 -0.0705 -0.0055  0.0658  0.4062 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        -0.000103   0.005020   -0.02  0.98363    
## postmoraldiversity -0.008998   0.002419   -3.72  0.00023 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.105 on 434 degrees of freedom
## Multiple R-squared:  0.0309, Adjusted R-squared:  0.0287 
## F-statistic: 13.8 on 1 and 434 DF,  p-value: 0.000226

DV: Censorship

Note: I used the combined T1 + T2 moral diversity measures

Item Sig? Dir.
How often people denied right to vote (higher values = more often) Y +
FAVOR OR OPPOSE VOTE BY MAIL. Y. -
Favor or oppose requiring ID when voting (higher value = oppose) Y +.
Favor or oppose allowing felons to vote (higher = oppose) Y -
Favor or oppose restricting journalist access (higher = favor) Y +.
Self-censor N NA

Mean

Interpret this with caution, given the low alpha of the combined measures

summary(lm(censorshipmean~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = censorshipmean ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4038 -0.0709 -0.0048  0.0662  0.4003 
## 
## Coefficients:
##              Estimate Std. Error t value  Pr(>|t|)    
## (Intercept) -0.000103   0.004974   -0.02      0.98    
## allmdpc      0.010568   0.002245    4.71 0.0000034 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.104 on 434 degrees of freedom
## Multiple R-squared:  0.0486, Adjusted R-squared:  0.0464 
## F-statistic: 22.2 on 1 and 434 DF,  p-value: 0.00000338

How often people denied right to vote (higher values = more often)

summary(lm(V201353~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = V201353 ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7323 -0.1893 -0.0335  0.1823  0.9197 
## 
## Coefficients:
##             Estimate Std. Error t value        Pr(>|t|)    
## (Intercept)  0.00713    0.01373    0.52             0.6    
## allmdpc      0.04366    0.00620    7.04 0.0000000000073 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.287 on 434 degrees of freedom
## Multiple R-squared:  0.103,  Adjusted R-squared:  0.101 
## F-statistic: 49.6 on 1 and 434 DF,  p-value: 0.00000000000734

FAVOR OR OPPOSE VOTE BY MAIL (higher value = oppose)

summary(lm(V201356x~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = V201356x ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.9723 -0.2351  0.0116  0.2372  1.1748 
## 
## Coefficients:
##             Estimate Std. Error t value            Pr(>|t|)    
## (Intercept) -0.00277    0.01586   -0.17                0.86    
## allmdpc     -0.07556    0.00716  -10.56 <0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.331 on 434 degrees of freedom
## Multiple R-squared:  0.204,  Adjusted R-squared:  0.203 
## F-statistic:  111 on 1 and 434 DF,  p-value: <0.0000000000000002

Favor or oppose requiring ID when voting (higher value = oppose)

summary(lm(V201359x~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = V201359x ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7396 -0.1971 -0.0269  0.1992  1.0112 
## 
## Coefficients:
##             Estimate Std. Error t value            Pr(>|t|)    
## (Intercept) 0.000414   0.014245    0.03                0.98    
## allmdpc     0.077455   0.006430   12.05 <0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.297 on 434 degrees of freedom
## Multiple R-squared:  0.251,  Adjusted R-squared:  0.249 
## F-statistic:  145 on 1 and 434 DF,  p-value: <0.0000000000000002

Favor or oppose allowing felons to vote (higher = oppose)

summary(lm(V201362x~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = V201362x ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.8736 -0.1817 -0.0096  0.1817  0.9119 
## 
## Coefficients:
##             Estimate Std. Error t value       Pr(>|t|)    
## (Intercept)  0.00206    0.01376    0.15           0.88    
## allmdpc     -0.04326    0.00621   -6.97 0.000000000012 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.287 on 434 degrees of freedom
## Multiple R-squared:  0.101,  Adjusted R-squared:  0.0985 
## F-statistic: 48.5 on 1 and 434 DF,  p-value: 0.0000000000121

Favor or oppose restricting journalist access (higher values = oppose)

summary(lm(V201375x~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = V201375x ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1744 -0.1805 -0.0033  0.1799  0.8216 
## 
## Coefficients:
##             Estimate Std. Error t value            Pr(>|t|)    
## (Intercept) -0.00840    0.01253   -0.67                 0.5    
## allmdpc      0.05154    0.00566    9.11 <0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.262 on 434 degrees of freedom
## Multiple R-squared:  0.161,  Adjusted R-squared:  0.159 
## F-statistic:   83 on 1 and 434 DF,  p-value: <0.0000000000000002

How often self-censor (higher = more often) # Not significant

summary(lm(V201627~allmdpc, congdist_anesdataraw))
## 
## Call:
## lm(formula = V201627 ~ allmdpc, data = congdist_anesdataraw)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -0.668 -0.181  0.007  0.172  0.798 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.00184    0.01197   -0.15     0.88
## allmdpc      0.00158    0.00540    0.29     0.77
## 
## Residual standard error: 0.25 on 434 degrees of freedom
## Multiple R-squared:  0.000198,   Adjusted R-squared:  -0.00211 
## F-statistic: 0.086 on 1 and 434 DF,  p-value: 0.77

State-level

Pre- and Post- comparisons

Pre MD –> Pre looseness

summary(lm(preloosemean~premoraldiversity, state_anesdataraw))
## 
## Call:
## lm(formula = preloosemean ~ premoraldiversity, data = state_anesdataraw)
## 
## Residuals:
##                                    Min                                     1Q                                 Median                                     3Q                                    Max 
## -0.00000000000000000000000000000001926 -0.00000000000000000000000000000000643 -0.00000000000000000000000000000000399 -0.00000000000000000000000000000000059  0.00000000000000000000000000000020342 
## 
## Coefficients:
##                                                Estimate                            Std. Error             t value            Pr(>|t|)    
## (Intercept)       0.00000000000000003429670765708739321 0.00000000000000000000000000000000415 8261308721096011.00 <0.0000000000000002 ***
## premoraldiversity 0.00000000000000000000000000000000496 0.00000000000000000000000000000000507                0.98                0.33    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0000000000000000000000000000000296 on 49 degrees of freedom
## Multiple R-squared:  0.501,  Adjusted R-squared:  0.49 
## F-statistic: 49.1 on 1 and 49 DF,  p-value: 0.00000000641

Pre MD –> Post looseness

summary(lm(postloosemean~premoraldiversity, state_anesdataraw))
## 
## Call:
## lm(formula = postloosemean ~ premoraldiversity, data = state_anesdataraw)
## 
## Residuals:
##                                   Min                                    1Q                                Median                                    3Q                                   Max 
## -0.0000000000000000000000000000007674  0.0000000000000000000000000000000022  0.0000000000000000000000000000000151  0.0000000000000000000000000000000242  0.0000000000000000000000000000000727 
## 
## Coefficients:
##                                                Estimate                            Std. Error               t value            Pr(>|t|)    
## (Intercept)       -0.0000000000000002807191227500614267  0.0000000000000000000000000000000157 -17923840549010830.00 <0.0000000000000002 ***
## premoraldiversity -0.0000000000000000000000000000000187  0.0000000000000000000000000000000191                 -0.98                0.33    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.000000000000000000000000000000112 on 49 degrees of freedom
## Multiple R-squared:  0.516,  Adjusted R-squared:  0.507 
## F-statistic: 52.3 on 1 and 49 DF,  p-value: 0.00000000289

Post MD –> Post looseness

summary(lm(postloosemean~postmoraldiversity, state_anesdataraw))
## 
## Call:
## lm(formula = postloosemean ~ postmoraldiversity, data = state_anesdataraw)
## 
## Residuals:
##                                   Min                                    1Q                                Median                                    3Q                                   Max 
## -0.0000000000000000000000000000007738  0.0000000000000000000000000000000063  0.0000000000000000000000000000000153  0.0000000000000000000000000000000239  0.0000000000000000000000000000000458 
## 
## Coefficients:
##                                                 Estimate                            Std. Error               t value            Pr(>|t|)    
## (Intercept)        -0.0000000000000002807191227500614267  0.0000000000000000000000000000000158 -17728379537046776.00 <0.0000000000000002 ***
## postmoraldiversity -0.0000000000000000000000000000000104  0.0000000000000000000000000000000141                 -0.74                0.47    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.000000000000000000000000000000112 on 49 degrees of freedom
## Multiple R-squared:  0.512,  Adjusted R-squared:  0.502 
## F-statistic: 51.3 on 1 and 49 DF,  p-value: 0.00000000371

All MD –> All looseness

summary(lm(allloosenessmean~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = allloosenessmean ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##                                   Min                                    1Q                                Median                                    3Q                                   Max 
## -0.0000000000000000000000000000005368  0.0000000000000000000000000000000079  0.0000000000000000000000000000000108  0.0000000000000000000000000000000135  0.0000000000000000000000000000000191 
## 
## Coefficients:
##                                           Estimate                             Std. Error               t value            Pr(>|t|)    
## (Intercept) -0.00000000000000015965810324423993619  0.00000000000000000000000000000001092 -14626751543888870.00 <0.0000000000000002 ***
## allmdpc      0.00000000000000000000000000000000295  0.00000000000000000000000000000000836                  0.35                0.73    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0000000000000000000000000000000776 on 49 degrees of freedom
## Multiple R-squared:  0.509,  Adjusted R-squared:  0.499 
## F-statistic: 50.8 on 1 and 49 DF,  p-value: 0.00000000419

Pre MD –> Censorship

summary(lm(censorshipmean~premoraldiversity, state_anesdataraw))
## 
## Call:
## lm(formula = censorshipmean ~ premoraldiversity, data = state_anesdataraw)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.11811 -0.04323  0.00453  0.04316  0.10939 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       -0.01011    0.00863   -1.17  0.24693    
## premoraldiversity  0.03761    0.01054    3.57  0.00081 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0616 on 49 degrees of freedom
## Multiple R-squared:  0.206,  Adjusted R-squared:  0.19 
## F-statistic: 12.7 on 1 and 49 DF,  p-value: 0.000814

Post MD –> Censorship

summary(lm(censorshipmean~postmoraldiversity, state_anesdataraw))
## 
## Call:
## lm(formula = censorshipmean ~ postmoraldiversity, data = state_anesdataraw)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.13075 -0.04303 -0.00238  0.04612  0.11765 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)   
## (Intercept)        -0.00601    0.00900   -0.67   0.5072   
## postmoraldiversity -0.02337    0.00803   -2.91   0.0054 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0638 on 49 degrees of freedom
## Multiple R-squared:  0.147,  Adjusted R-squared:  0.13 
## F-statistic: 8.47 on 1 and 49 DF,  p-value: 0.00541

All MD –> Censorship

Item Sig? Dir.
How often people denied right to vote Y -
FAVOR OR OPPOSE VOTE BY MAIL. (higher value = oppose Y +
Favor or oppose requiring ID when voting (higher value = oppose) Y -
Favor or oppose allowing felons to vote (higher = oppose) Y +
Favor or oppose restricting journalist access (higher = favor) Y -
Self-censor Y +

Mean

Interpret this with caution, given the low alpha of the combined measures

summary(lm(censorshipmean~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = censorshipmean ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.12914 -0.03894 -0.00128  0.04701  0.11984 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.00621    0.00879   -0.71   0.4830   
## allmdpc      0.02238    0.00673    3.33   0.0017 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0624 on 49 degrees of freedom
## Multiple R-squared:  0.184,  Adjusted R-squared:  0.168 
## F-statistic: 11.1 on 1 and 49 DF,  p-value: 0.00167

How often people denied right to vote (higher values = more often)

summary(lm(V201353~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = V201353 ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.5417 -0.0852 -0.0218  0.0949  0.3867 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -0.0348     0.0234   -1.49   0.1439    
## allmdpc       0.0758     0.0180    4.22   0.0001 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.167 on 49 degrees of freedom
## Multiple R-squared:  0.267,  Adjusted R-squared:  0.252 
## F-statistic: 17.8 on 1 and 49 DF,  p-value: 0.000104

FAVOR OR OPPOSE VOTE BY MAIL (higher value = oppose)

summary(lm(V201356x~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = V201356x ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6665 -0.1198  0.0115  0.1552  0.4740 
## 
## Coefficients:
##             Estimate Std. Error t value  Pr(>|t|)    
## (Intercept) -0.00327    0.03222   -0.10      0.92    
## allmdpc     -0.13382    0.02468   -5.42 0.0000018 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.229 on 49 degrees of freedom
## Multiple R-squared:  0.375,  Adjusted R-squared:  0.362 
## F-statistic: 29.4 on 1 and 49 DF,  p-value: 0.00000179

Favor or oppose requiring ID when voting (higher value = oppose)

summary(lm(V201359x~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = V201359x ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -0.388 -0.104 -0.012  0.123  0.397 
## 
## Coefficients:
##             Estimate Std. Error t value     Pr(>|t|)    
## (Intercept)  0.00375    0.02497    0.15         0.88    
## allmdpc      0.13549    0.01912    7.08 0.0000000049 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.177 on 49 degrees of freedom
## Multiple R-squared:  0.506,  Adjusted R-squared:  0.496 
## F-statistic: 50.2 on 1 and 49 DF,  p-value: 0.00000000491

Favor or oppose allowing felons to vote (higher = oppose)

summary(lm(V201362x~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = V201362x ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4408 -0.0736 -0.0375  0.0700  0.4954 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)   0.0218     0.0247    0.88   0.3817   
## allmdpc      -0.0612     0.0190   -3.23   0.0022 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.176 on 49 degrees of freedom
## Multiple R-squared:  0.176,  Adjusted R-squared:  0.159 
## F-statistic: 10.4 on 1 and 49 DF,  p-value: 0.00222

Favor or oppose restricting journalist access (higher = oppose)

summary(lm(V201375x~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = V201375x ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.4062 -0.0740 -0.0228  0.1056  0.3869 
## 
## Coefficients:
##             Estimate Std. Error t value   Pr(>|t|)    
## (Intercept)  -0.0191     0.0218   -0.88       0.39    
## allmdpc       0.0985     0.0167    5.91 0.00000032 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.155 on 49 degrees of freedom
## Multiple R-squared:  0.416,  Adjusted R-squared:  0.404 
## F-statistic: 34.9 on 1 and 49 DF,  p-value: 0.000000323

How often self-censor (higher = more often)

summary(lm(V201627~allmdpc, state_anesdataraw))
## 
## Call:
## lm(formula = V201627 ~ allmdpc, data = state_anesdataraw)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.3188 -0.0548  0.0195  0.0700  0.1940 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -0.00926    0.01511   -0.61    0.543  
## allmdpc     -0.02086    0.01157   -1.80    0.078 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.107 on 49 degrees of freedom
## Multiple R-squared:  0.0622, Adjusted R-squared:  0.0431 
## F-statistic: 3.25 on 1 and 49 DF,  p-value: 0.0775