library(haven)
library(socsci) ## install_github("ryanburge/socsci")
library(car)


anes <- read_dta("anes_full.dta")

The Percentage of Nones Using 998

anes %>% 
  mutate(none = car::recode(VCF0152, "998=1; else=0")) %>% 
  filter(VCF0004 >= 1990) %>% 
  group_by(VCF0004) %>% 
  mean_ci(none) 
## # A tibble: 11 x 8
##    VCF0004  mean    sd     n level      se lower upper
##      <dbl> <dbl> <dbl> <int> <dbl>   <dbl> <dbl> <dbl>
##  1    1990 0.134 0.341  1980  0.05 0.00765 0.119 0.149
##  2    1992 0.136 0.342  2485  0.05 0.00687 0.122 0.149
##  3    1994 0.139 0.346  1795  0.05 0.00817 0.123 0.155
##  4    1996 0.13  0.337  1714  0.05 0.00813 0.114 0.146
##  5    1998 0.142 0.349  1281  0.05 0.00976 0.123 0.161
##  6    2000 0.147 0.354  1807  0.05 0.00832 0.130 0.163
##  7    2002 0     0      1511  0.05 0       0     0    
##  8    2004 0.159 0.366  1212  0.05 0.0105  0.139 0.180
##  9    2008 0.178 0.383  2322  0.05 0.00794 0.163 0.194
## 10    2012 0.224 0.417  5914  0.05 0.00542 0.213 0.235
## 11    2016 0     0      4270  0.05 0       0     0

The Percentage of People Who Say That They Never Attend

anes %>% 
  mutate(never = car::recode(VCF0130a, "5=1; else=0")) %>% 
  filter(VCF0004 >= 1990) %>% 
  group_by(VCF0004) %>% 
  mean_ci(never) 
## # A tibble: 11 x 8
##    VCF0004  mean    sd     n level      se lower upper
##      <dbl> <dbl> <dbl> <int> <dbl>   <dbl> <dbl> <dbl>
##  1    1990 0.325 0.469  1980  0.05 0.0105  0.305 0.346
##  2    1992 0.335 0.472  2485  0.05 0.00947 0.316 0.353
##  3    1994 0.314 0.464  1795  0.05 0.0110  0.292 0.335
##  4    1996 0.291 0.454  1714  0.05 0.0110  0.270 0.313
##  5    1998 0.329 0.470  1281  0.05 0.0131  0.303 0.354
##  6    2000 0.306 0.461  1807  0.05 0.0108  0.285 0.327
##  7    2002 0.295 0.456  1511  0.05 0.0117  0.272 0.318
##  8    2004 0.337 0.473  1212  0.05 0.0136  0.310 0.363
##  9    2008 0.342 0.474  2322  0.05 0.00985 0.323 0.361
## 10    2012 0.402 0.490  5914  0.05 0.00638 0.389 0.414
## 11    2016 0.41  0.492  4270  0.05 0.00753 0.395 0.424

That’s an insanely high number of people who say that they never attend, by the way. Very skeptical of this question.

What is going on here….

I wanted to investigate this a little, so I looked at the people who said that they never attended and then how they answered VCF0152 question. I used 2012, because I knew it worked correctly.

anes %>% 
  filter(VCF0004 == 2012) %>% 
  filter(VCF0130a == 5) %>% 
  ct(VCF0152) %>% 
  arrange(-pct)  
## # A tibble: 65 x 3
##                                                       VCF0152     n   pct
##                                                     <dbl+lbl> <int> <dbl>
##  1 998 [998. None; no preference; don't know preference; DK;]  1273 0.536
##  2 400                                                          415 0.175
##  3  99                                                           71 0.03 
##  4 135                                                           72 0.03 
##  5 230                                                           72 0.03 
##  6  10                                                           62 0.026
##  7 149                                                           56 0.024
##  8 220                                                           36 0.015
##  9 110                                                           33 0.014
## 10 270                                                           27 0.011
## # ... with 55 more rows

As you can see, about half of the people who answered they never attended church were sorted as 998’s. But then another 17.5% said that they were Catholic. So, how can you answer 5 to the attendance screener but then still say that you are a Catholic? According to documentation you should have never been asked VCF0152 if you said never to the attendance screener. I’m stuck.