IAM: Subgroup analysis - Primary Outcome

This script takes the main dataset df_final.rds and produces the results of selected tests conducted for different covariate-defined subgroups and the differences of the estimates across subgroups. It also implements Romano-Wolf corrections.

Test Dictionary

Subgroup Dictionary

Note: Pre-survey outcomes are post-treatment in the case of accuracy nudge tests, so those subgroups are not included.

Setup

Package loading

options(warn=-1)
options(scipen=999)
suppressMessages(library(estimatr))
suppressMessages(library(stats))
suppressMessages(library(tidyverse))
suppressMessages(library(rmarkdown))
suppressMessages(library(tictoc))
suppressMessages(library(stargazer))
suppressMessages(library(ggpattern))
suppressMessages(library(doParallel))
suppressMessages(library(mltools))
suppressMessages(library(data.table))
suppressMessages(library(RItools))
suppressMessages(library(stringr))
suppressMessages(library(grf))
suppressMessages(library(multcomp))
nrCores = detectCores()
cl = makeCluster(nrCores)
registerDoParallel(cl)

Bring necessary packages to clusters for parallel computing

clusterEvalQ(cl, {suppressMessages(library(estimatr))
suppressMessages(library(stats))
suppressMessages(library(tidyverse))
suppressMessages(library(rmarkdown))
suppressMessages(library(multcomp))})
## [[1]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[2]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[3]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[4]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[5]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[6]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[7]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[8]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[9]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[10]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"     
## 
## [[11]]
##  [1] "multcomp"  "TH.data"   "MASS"      "survival"  "mvtnorm"   "rmarkdown"
##  [7] "lubridate" "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
## [13] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "estimatr"  "stats"    
## [19] "graphics"  "grDevices" "utils"     "datasets"  "methods"   "base"

Conversion to .rmd file

# convert_ipynb(paste(getwd(),"subgroup_analysis_primary_outcome.ipynb",sep="/"),
#               output = xfun::with_ext(paste(getwd(),"subgroup_analysis_primary_outcome",sep="/"), "Rmd"))

Useful functions

# Computes standard errors of a given continuous variable or one-hot binary variable, respectively #
se_cont = function(x, na.rm=FALSE) {
  if (na.rm) x <- na.omit(x)
  sqrt(var(x)/length(x))}

se_binary = function(x, na.rm=FALSE) {
  if (na.rm) x <- na.omit(x)
  sqrt(mean(x)*(1-mean(x))/length(x))}
# Adds the level 'missing' to factor variables #
addmissing = function(x){
  if(is.factor(x)) return(factor(x, levels=c(levels(x), "missing")))
  return(x)}

Data pre-processing and outcome construction

# This function takes the main csv as input and outputs a list of dataframes used to conduct the different tests in the analysis #
# It also has the option to apply filtering by attention check status #
pre_processing = function(data,att_check="all"){  
    
# Family 1 subsets to posts that were shared in the pre, then looks at the misinfo counterparts in post #
course_tests_data = data[data$type == "Base posts" & data$pre_post == "pre",]
course_tests_data$share_post = NA
course_tests_data$type_post = NA
#course_tests_data$accuracy_score_post = NA  
    
# non_counterparts subsets to all misinfo posts in the pre and misinfo posts that are not counterparts in the post
non_counterparts_data = data[data$type != "Base posts" & data$pre_post == "pre",]

# Identify who shared 0, 1, 2 or 3 base posts in the pre #
groups = aggregate(share~user,course_tests_data,sum)
colnames(groups) = c("user","group")
course_tests_data = left_join(course_tests_data,groups,by="user")
    
# Followup preprocessing #
followup_course_tests_data = data[!is.na(data$att_check_followup) & data$type == "Base posts" & data$pre_post == "post",]
followup_course_tests_data$share_followup = NA
followup_course_tests_data$type_followup = NA
followup_course_tests_data$Q4 = NA
followup_course_tests_data$Q5 = NA    

# Identify who shared 0, 1, 2 or 3 base posts in the post #
groups_followup = aggregate(share~user,followup_course_tests_data,sum)
colnames(groups_followup) = c("user","group")
followup_course_tests_data = left_join(followup_course_tests_data,groups_followup,by="user")    

# For each user #
for (u in unique(course_tests_data$user)){
    # Take the vector of facts that were seen in the pre as base # 
    F = course_tests_data$fact[course_tests_data$user == u]
    # Add the non-counterpart posts to that data #
    non_counterparts_data = rbind(non_counterparts_data,data[data$user == u & data$type != "Base posts" & data$pre_post == "post" & !data$fact %in% F,])
    # For each of these facts #
    for (f in F){
        # Take the sharing decision of the misinfo counterpart in the post # 
        course_tests_data$share_post[course_tests_data$user == u & course_tests_data$fact == f] = data$share[data$user == u & data$fact == f & data$pre_post == "post"]
        # Take the post type of the misinfo counterpart in the post #
        course_tests_data$type_post[course_tests_data$user == u & course_tests_data$fact == f] = data$type[data$user == u & data$fact == f & data$pre_post == "post"]    
        # Take the post type of the misinfo counterpart in the post #
        #course_tests_data$accuracy_score_post[course_tests_data$user == u & course_tests_data$fact == f] = data$accuracy_score[data$user == u & data$fact == f & data$pre_post == "post"]
        }
    
    F = followup_course_tests_data$fact[followup_course_tests_data$user == u]
    # Extract reflective questions #
    followup_course_tests_data$Q4[followup_course_tests_data$user == u] = main_data$reflective_4.contain_course_keyword[main_data$user == u & main_data$order == 1]
    followup_course_tests_data$Q5[followup_course_tests_data$user == u] = main_data$reflective_5.contain_course_keyword[main_data$user == u & main_data$order == 1]
    # For each of these facts #
    for (f in F){
        # Take the sharing decision of the misinfo counterpart in the followup # 
        followup_course_tests_data$share_followup[followup_course_tests_data$user == u & followup_course_tests_data$fact == f] = data$share[data$user == u & data$fact == f & data$pre_post == "followup"]
        # Take the post type of the misinfo counterpart in the post #
        followup_course_tests_data$type_followup[followup_course_tests_data$user == u & followup_course_tests_data$fact == f] = data$type[data$user == u & data$fact == f & data$pre_post == "followup"]}}

    # Main Outcome # 
    
    course_tests_data_final = aggregate(share_post~user*group*treatment*accuracy*att_check_pre*att_check_post,course_tests_data[course_tests_data$share == 1,],mean)
    #course_tests_data_final$accuracy_score_post = aggregate(accuracy_score_post~user)[,2]
    course_tests_data_by_type_final = aggregate(share_post~user*type_post*treatment*accuracy*att_check_pre*att_check_post,course_tests_data[course_tests_data$share == 1,],mean)
    #course_tests_data_by_type_final$accuracy_score_post = aggregate(accuracy_score_post~user*type_post,course_tests_data[course_tests_data$share == 1,],mean)[,3]
    
    # Followup Outcome #
    followup_course_tests_data_final = aggregate(share_followup~user*group*treatment*priming*att_check_pre*att_check_post*att_check_followup,followup_course_tests_data[followup_course_tests_data$share == 1,],mean)
    followup_course_tests_data_by_type_final = aggregate(share_followup~user*treatment*type_followup*att_check_pre*att_check_post*att_check_followup,followup_course_tests_data[followup_course_tests_data$share == 1,],mean)

    # Followup text outcomes #

    followup_course_text_tests_data_final = aggregate(Q4~user*group*treatment*priming*att_check_pre*att_check_post*att_check_followup,followup_course_tests_data,mean)
    colnames(followup_course_text_tests_data_final)[8] = "Q4"
    followup_course_text_tests_data_final$Q5 = aggregate(Q5~user*group*treatment*priming*att_check_pre*att_check_post*att_check_followup,followup_course_tests_data,mean)[,8]
    
    # Opposite Outcome #

    # Aggregate at the user level by computing averages #
    opposite_tests_data_final = aggregate(share_post~user*group*treatment*accuracy*att_check_pre*att_check_post,course_tests_data[course_tests_data$share == 0,],mean)  # Subset to those facts that were not shared in the pre (as base) #
    #opposite_tests_data_final$accuracy_score_post = aggregate(accuracy_score~user,course_tests_data[course_tests_data$share == 0,],mean)[,2]

    # Non-corresponding Outcome #
    
    non_counterparts_data_final = aggregate(share~user*treatment*accuracy*att_check_pre*att_check_post,non_counterparts_data[non_counterparts_data$pre_post=="pre",],mean)
    colnames(non_counterparts_data_final)[6] = "pre"
    non_counterparts_data_final$post = aggregate(share~user*treatment*accuracy*att_check_pre*att_check_post,non_counterparts_data[non_counterparts_data$pre_post=="post",],mean)[,6]
    non_counterparts_data_final$diff = non_counterparts_data_final$post - non_counterparts_data_final$pre

    # Outcomes using all misinfo posts # 
    
    # Sharing #
    all_posts_data_final = aggregate(share~user*treatment*accuracy*att_check_pre*att_check_post,data[data$type!="Base posts" & data$pre_post=="pre",],mean)    
    colnames(all_posts_data_final)[6] = "share_pre"
    all_posts_data_final$share_post = aggregate(share~user*treatment*accuracy*att_check_pre*att_check_post,data[data$type!="Base posts" & data$pre_post=="post",],mean)[,6] 
    all_posts_data_final$share_diff = all_posts_data_final$share_post - all_posts_data_final$share_pre
    
    # Discernment #
    all_posts_data_final$disc_pre = aggregate(disc_score~user*treatment*accuracy*att_check_pre*att_check_post,data[data$pre_post=="pre",],sum)[,6]
    all_posts_data_final$disc_post = aggregate(disc_score~user*treatment*accuracy*att_check_pre*att_check_post,data[data$pre_post=="post",],sum)[,6]
    all_posts_data_final$disc_diff = all_posts_data_final$disc_post - all_posts_data_final$disc_pre
    
    # Accuracy Discernment #
    all_posts_data_final$acc_disc_pre = aggregate(acc_disc_score~user*treatment*accuracy*att_check_pre*att_check_post,data[data$pre_post=="pre",],sum)[,6]
    all_posts_data_final$acc_disc_post = aggregate(acc_disc_score~user*treatment*accuracy*att_check_pre*att_check_post,data[data$pre_post=="post",],sum)[,6]
    all_posts_data_final$acc_disc_diff = all_posts_data_final$acc_disc_post - all_posts_data_final$acc_disc_pre

    # Adding 'course' variable #
    
    course_tests_data_final$course = ifelse(course_tests_data_final$treatment == "No-course Baseline","control",
                                      ifelse(course_tests_data_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    
    course_tests_data_by_type_final$course = ifelse(course_tests_data_by_type_final$treatment == "No-course Baseline","control",
                                      ifelse(course_tests_data_by_type_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    
    followup_course_tests_data_final$course = ifelse(followup_course_tests_data_final$treatment == "No-course Baseline","control",
                                      ifelse(followup_course_tests_data_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    
    followup_course_tests_data_by_type_final$course = ifelse(followup_course_tests_data_by_type_final$treatment == "No-course Baseline","control",
                                      ifelse(followup_course_tests_data_by_type_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))

    followup_course_text_tests_data_final$course = ifelse(followup_course_text_tests_data_final$treatment == "No-course Baseline","control",
                                      ifelse(followup_course_text_tests_data_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    
    opposite_tests_data_final$course = ifelse(opposite_tests_data_final$treatment == "No-course Baseline","control",
                                      ifelse(opposite_tests_data_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    
    non_counterparts_data_final$course = ifelse(non_counterparts_data_final$treatment == "No-course Baseline","control",
                                      ifelse(non_counterparts_data_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    
    all_posts_data_final$course = ifelse(all_posts_data_final$treatment == "No-course Baseline","control",
                                      ifelse(all_posts_data_final$treatment %in% c("Reasoning","Emotions","Combo"),"treatment",NA))
    # Apply attention check filter as specified #      
    if(att_check == "passed"){
        return(list("course_tests_data_final"=course_tests_data_final[course_tests_data_final$att_check_pre=="1" & course_tests_data_final$att_check_post=="1",],
            "course_tests_data_by_type_final" = course_tests_data_by_type_final[course_tests_data_by_type_final$att_check_pre=="1" & course_tests_data_by_type_final$att_check_post=="1",],
            "followup_course_tests_data_final" = followup_course_tests_data_final[followup_course_tests_data_final$att_check_pre=="1" & followup_course_tests_data_final$att_check_post=="1" &followup_course_tests_data_final$att_check_followup=="1",],
            "followup_course_tests_data_by_type_final" = followup_course_tests_data_by_type_final[followup_course_tests_data_by_type_final$att_check_pre=="1" & followup_course_tests_data_by_type_final$att_check_post=="1" &followup_course_tests_data_by_type_final$att_check_followup=="1",],
            "followup_course_text_tests_data_final" = followup_course_text_tests_data_final[followup_course_tests_data_final$att_check_pre=="1" & followup_course_tests_data_final$att_check_post=="1" &followup_course_tests_data_final$att_check_followup=="1",],
            "opposite_tests_data_final" = opposite_tests_data_final[opposite_tests_data_final$att_check_pre=="1" & opposite_tests_data_final$att_check_post=="1",],
            "non_counterparts_data_final" = non_counterparts_data_final[non_counterparts_data_final$att_check_pre=="1" & non_counterparts_data_final$att_check_post=="1",],
            "all_posts_data_final" = all_posts_data_final[all_posts_data_final$att_check_pre=="1" & all_posts_data_final$att_check_post=="1",]))}

    if(att_check == "not_passed"){
        return(list("course_tests_data_final"=course_tests_data_final[course_tests_data_final$att_check_pre=="0" & course_tests_data_final$att_check_post=="0",],
            "course_tests_data_by_type_final" = course_tests_data_by_type_final[course_tests_data_by_type_final$att_check_pre=="0" & course_tests_data_by_type_final$att_check_post=="0",],
            "followup_course_tests_data_final" = followup_course_tests_data_final[followup_course_tests_data_final$att_check_pre=="0" & followup_course_tests_data_final$att_check_post=="0" &followup_course_tests_data_final$att_check_followup=="0",],
            "followup_course_tests_data_by_type_final" = followup_course_tests_data_by_type_final[followup_course_tests_data_by_type_final$att_check_pre=="0" & followup_course_tests_data_by_type_final$att_check_post=="0" &followup_course_tests_data_by_type_final$att_check_followup=="0",],
            "followup_course_text_tests_data_final" = followup_course_text_tests_data_final[followup_course_tests_data_final$att_check_pre=="0" & followup_course_tests_data_final$att_check_post=="0" &followup_course_tests_data_final$att_check_followup=="0",],
            "opposite_tests_data_final" = opposite_tests_data_final[opposite_tests_data_final$att_check_pre=="0" & opposite_tests_data_final$att_check_post=="0",],
            "non_counterparts_data_final" = non_counterparts_data_final[non_counterparts_data_final$att_check_pre=="0" & non_counterparts_data_final$att_check_post=="0",],
            "all_posts_data_final" = all_posts_data_final[all_posts_data_final$att_check_pre=="0" & all_posts_data_final$att_check_post=="0",]))}

    if(att_check == "all"){
        return(list("course_tests_data_final"=course_tests_data_final,
            "course_tests_data_by_type_final" = course_tests_data_by_type_final,
            "followup_course_tests_data_final" = followup_course_tests_data_final,
            "followup_course_text_tests_data_final" = followup_course_text_tests_data_final,
            "followup_course_tests_data_by_type_final" = followup_course_tests_data_by_type_final,
            "opposite_tests_data_final" = opposite_tests_data_final,
            "non_counterparts_data_final" = non_counterparts_data_final,
            "all_posts_data_final" = all_posts_data_final))}
}    

Data loading and cleaning

data = read_rds("../../intermediate_outcomes/intermediate_data_wide.rds")
data$social_media_share_above_40 = data$social_media_share_40_60 + data$social_media_share_60_80 + data$social_media_share_80_100
# Create vectors with names and display names of covariates by type to use later #
covariates_continuous = c("age","social_media_hours","base_rate_pre","base_total_acc_score_pre",
                          "misinfo_pre","misinfo_total_acc_score_pre")
covariates_categorical = c("gender_Man","education_High_school_or_less","marital_Married_or_in_a_domestic_partnership",
                           "location_Mostly_rural","religion_Christian","religiosity_Attends",
                           "social_media_share_above_40","att_check_pre")
subgroups_all = covariates_categorical
# Add percentile based subgroups (for continuous covariates #
for (cov in covariates_continuous){
    
    percs = ntile(data[,cov],4)
    data$med = factor(ifelse(!is.na(percs) & (percs == 1 | percs == 2),"M1",
                 ifelse(!is.na(percs) & (percs == 3 | percs == 4),"M2",NA)))
#     data_covs$quart = factor(ifelse(!is.na(percs) & percs == 1,"Q1",
#              ifelse(!is.na(percs) & percs == 2,NA, # Replace NA with Q2 as desired #
#              ifelse(!is.na(percs) & percs == 3,NA, # Replace NA with Q3 as desired #          
#              ifelse(!is.na(percs) & percs == 4,"Q4",NA)))))
    
    colnames(data)[ncol(data)] = paste(cov,c("_med"),sep="")
    subgroups_all = c(subgroups_all,paste(cov,c("_med"),sep=""))}
# Reorder subgroups #
subgroups_all = c(subgroups_all[startsWith(subgroups_all,"age")],subgroups_all[!startsWith(subgroups_all,"age")])
subgroups_all = c(subgroups_all[!startsWith(subgroups_all,"social_media") & !startsWith(subgroups_all,"share_pre") & !startsWith(subgroups_all,"acc_disc_score_pre") & !startsWith(subgroups_all,"att_check")],
              subgroups_all[startsWith(subgroups_all,"social_media_hours")],subgroups_all[startsWith(subgroups_all,"social_media_share")],
              subgroups_all[startsWith(subgroups_all,"share_pre")], subgroups_all[startsWith(subgroups_all,"acc_disc")],subgroups_all[startsWith(subgroups_all,"att_check")])
# Mutate subgroup variables to factor #
data[,subgroups_all] = lapply(data[,subgroups_all], as.factor)
# Add treatment indicators for each test #
data$treatment_6 = recode(data$treatment,"Reasoning"="1","Emotions" = "no","Combo" = "no","No-course Baseline" = "no","Facts Baseline" = "0")
data$treatment_7 = recode(data$treatment,"Reasoning"="no","Emotions" = "1","Combo" = "no","No-course Baseline" = "no","Facts Baseline" = "0")
data$treatment_8 = recode(data$treatment,"Reasoning"="no","Emotions" = "no","Combo" = "1","No-course Baseline" = "no","Facts Baseline" = "0")
data$treatment_9 = recode(data$treatment,"Reasoning"="no","Emotions" = "no","Combo" = "no","No-course Baseline" = "0","Facts Baseline" = "1")
data$treatment_10 = recode(data$treatment,"Reasoning"="1","Emotions" = "0","Combo" = "no","No-course Baseline" = "no","Facts Baseline" = "no")
data$treatment_11 = recode(data$treatment,"Reasoning"="1","Emotions" = "no","Combo" = "0","No-course Baseline" = "no","Facts Baseline" = "no")
data$treatment_12 = recode(data$treatment,"Reasoning"="no","Emotions" = "1","Combo" = "0","No-course Baseline" = "no","Facts Baseline" = "no")

data[,startsWith(colnames(data),"treatment_") & !startsWith(colnames(data),"treatment_end")] = sapply(data[,startsWith(colnames(data),"treatment_") & !startsWith(colnames(data),"treatment_end")],function(x){na_if(x,"no")})

Subgroup analysis

Primary outcome

# Pre-allocate dataframe #
subgroup_results = data.frame(matrix(NA,0,6))
#pre_subgroup_results = data.frame(matrix(NA,0,6))
tests_of_interest <- c(7, 8, 12)
# Compute each test for each of the defined subgroups #
# Iterate over desired tests #
for (test in tests_of_interest){
    # Create a temporary dataframe #
    by_test_subgroup_results = data.frame(matrix(NA,0,6))
    # Iterate over subgroups #
    for (cov in subgroups_all){
        # Create the formula so that the treatment effects for each subgroup are included in the regression, and not the diff-in-diff #
        form = formula(paste("pre_spec_outcome_rates ~ 0 + treatment_",test,"*", cov," - treatment_",test,sep=""))
        # Linear model to estimate treatment effects by subgroup #
        model = lm_robust(form,data)
        # Quasipoisson model to estimate treatment effects as a percentage of the baseline by subgroup (Poisson model assumes equality of mean and variance, this breaks it) # 
        model_perc = glm(form, family = 'quasipoisson', data)
        # Extract output from the regressions #
        baselines = coef(summary(model))[!startsWith(rownames(coef(summary(model))),"treatment"),][,1]
        coefs = coef(summary(model))[startsWith(rownames(coef(summary(model))),"treatment"),][,1:4]
        # Add number of observations by subgroup #
        obs = table(data[cov])
        # Define the diff-in-diff coefficients as required by multcomp package #
        coefs = cbind(baselines,coefs,obs)
        rownames(coefs) = paste("treatment_",test,"1:",rownames(coefs),sep="")
        colnames(coefs) = NULL
        hyp_names = combn(rownames(coefs),2)
        # Iterate over differences in subgroups #
        hyps = c()
        for (h in 1:ncol(hyp_names)){
            hyps = c(hyps,paste(hyp_names[1,h],"-",hyp_names[2,h],"= 0"))}
        # Extract results and fill the dataframe #
        comps = summary(glht(model, hyps),test=adjusted("none"))
        comps2 = summary(glht(model_perc, hyps),test=adjusted("none"))
        comps_results = cbind(NA,comps$test$coefficients,comps$test$sigma,comps$test$tstat,comps$test$pvalues,NA)
        rownames(comps_results) = paste(rownames(comps_results),"_lev",sep="")
        comps2_results = cbind(NA,comps2$test$coefficients,comps2$test$sigma,comps2$test$tstat,comps2$test$pvalues,NA)
        rownames(comps2_results) = paste(rownames(comps2_results),"_perc",sep="")
        by_test_subgroup_results = rbind(by_test_subgroup_results, coefs, comps_results, comps2_results)}
        rownames(by_test_subgroup_results) = paste("test_",test,str_replace_all(rownames(by_test_subgroup_results),paste("treatment_",test,"1",sep=""),""),sep="")
        subgroup_results  = rbind(subgroup_results ,by_test_subgroup_results)}

#    by_test_subgroup_results = data.frame(matrix(NA,0,6))
#    for (cov in pre_subgroups){
#        form = formula(paste("share_pre ~ 0+",cov,sep=""))
#        model = lm_robust(form,pre_data)
#        hyp_names = combn(rownames(coef(summary(model))),2)
#        hyps = c()
#        for (h in 1:ncol(hyp_names)){
#            hyps = c(hyps,paste(hyp_names[1,h],"-",hyp_names[2,h],"= 0"))}
#        comps = summary(glht(model, hyps),test=adjusted("none"))
#        comps_results = cbind(NA,comps$test$coefficients,comps$test$sigma,comps$test$tstat,comps$test$pvalues,NA)
#        by_test_subgroup_results = rbind(by_test_subgroup_results, comps_results)
#        rownames(by_test_subgroup_results) = paste("test_",test,":",rownames(by_test_subgroup_results),sep="")
#    pre_subgroup_results = rbind(pre_subgroup_results,by_test_subgroup_results)}
# Rename columns after stacking #
colnames(subgroup_results) = c("baseline","estimate","std.err","ts","p_val","obs")
#colnames(pre_subgroup_results) = c("baseline","estimate","std.err","ts","p_val","obs")

# Construct confidence intervals taking into account one and two-sided tests #
subgroup_results$CI_low =  ifelse(is.na(subgroup_results$obs),subgroup_results$estimate - 1.96*subgroup_results$std.err,-Inf)
subgroup_results$CI_upp =  ifelse(is.na(subgroup_results$obs),subgroup_results$estimate + 1.96*subgroup_results$std.err,subgroup_results$estimate + 1.64*subgroup_results$std.err)

subgroup_results$CI_low[startsWith(rownames(subgroup_results),"test_10")] = subgroup_results$estimate[startsWith(rownames(subgroup_results),"test_10")] - 1.96*subgroup_results$std.err[startsWith(rownames(subgroup_results),"test_10")]
subgroup_results$CI_low[startsWith(rownames(subgroup_results),"test_11")] = subgroup_results$estimate[startsWith(rownames(subgroup_results),"test_11")] - 1.96*subgroup_results$std.err[startsWith(rownames(subgroup_results),"test_11")]
subgroup_results$CI_low[startsWith(rownames(subgroup_results),"test_12")] = subgroup_results$estimate[startsWith(rownames(subgroup_results),"test_12")] - 1.96*subgroup_results$std.err[startsWith(rownames(subgroup_results),"test_12")]

#pre_subgroup_results$CI_low =  pre_subgroup_results$estimate - 1.96*pre_subgroup_results$std.err
#pre_subgroup_results$CI_upp =  pre_subgroup_results$estimate + 1.96*pre_subgroup_results$std.err
write.csv(subgroup_results, "tables/conditional_misinfo_subgroup.csv")

RW correction

This part of the script applies the Romano-Wolf correction. Even though it is parallelized, it takes a long time. Please look at https://docs.iza.org/dp12845.pdf for references.

# Since we have two-sided tests along with one-sided tests, we need to adapt the two-sided statistics accordingly: #
# Identify the tests that are two sided #
two_sided = rownames(subgroup_results)[!is.infinite(subgroup_results$CI_low)]
# We create the dataframes with the results separately by hypothesis involving differences in levels, differences in percentage changes, and treatment effect by subgroups #
sorted_orig_lev = subgroup_results[endsWith(rownames(subgroup_results),"lev"),]
sorted_orig_perc = subgroup_results[endsWith(rownames(subgroup_results),"perc"),]
sorted_orig_single = subgroup_results[!endsWith(rownames(subgroup_results),"lev") & ! endsWith(rownames(subgroup_results),"perc"),]
# We check if we reject the null hypothesis using the unadjusted p-values
alpha = 0.05
sorted_orig_lev$reject = sorted_orig_lev$p_val < alpha
sorted_orig_perc$reject = sorted_orig_perc$p_val < alpha
sorted_orig_single$reject = sorted_orig_single$p_val < alpha
# We adapt the t-statistic of the two-sided tests:
sorted_orig_lev[rownames(sorted_orig_lev) %in% two_sided,"ts"] = -abs(sorted_orig_lev[rownames(sorted_orig_lev) %in% two_sided,"ts"])
sorted_orig_perc[rownames(sorted_orig_perc) %in% two_sided,"ts"] = -abs(sorted_orig_perc[rownames(sorted_orig_perc) %in% two_sided,"ts"])
sorted_orig_single[rownames(sorted_orig_single) %in% two_sided,"ts"] = -abs(sorted_orig_single[rownames(sorted_orig_single) %in% two_sided,"ts"])
# We sort the hypotheses by the size of the original t-statistic #
sorted_orig_lev = sorted_orig_lev[order(sorted_orig_lev$ts),]
sorted_orig_perc = sorted_orig_perc[order(sorted_orig_perc$ts),]
sorted_orig_single = sorted_orig_single[order(sorted_orig_single$ts),]
# Now that we have what we need, we can implement Romano-Wolf correction #
# We need to bootstrap the sample B times (this essentially means sample with replacement keeping n constant) and compute  #
# the "null statistics" of each hypothesis we are testing for each bootstrapped sample. These require three elements: #
# 1) the original estimates --we already got those-- #
# 2) the same estimates but computed from the bootstrapped sample #
# 3) the standard errors from 2 #
B = 1000
num_hyp_lev = nrow(sorted_orig_lev)
num_hyp_perc = nrow(sorted_orig_perc)
num_hyp_single = nrow(sorted_orig_single)
RW = function(b){
    # We sample with replacement the indices which will make up our bootstrap sample #
    idx = sample(1:nrow(data),nrow(data),TRUE)
    boot_data = data[idx,]
    # We repeat exactly the same procedure as before to get the bootstrap estimates and standard errors #
    boot_subgroup_results = data.frame(matrix(NA,nrow=0,ncol=2))
    for (test in tests_of_interest){
        boot_by_test_subgroup_results = data.frame(matrix(NA,0,2))
        for (cov in subgroups_all){
        form = formula(paste("pre_spec_outcome_rates ~ 0 + treatment_",test,"*", cov," - treatment_",test,sep=""))
        model = lm_robust(form,boot_data)
        model_perc = glm(form, family = 'quasipoisson', boot_data)
        coefs = coef(summary(model))[startsWith(rownames(coef(summary(model))),"treatment"),][,1:2]
        colnames(coefs) = NULL
        hyp_names = combn(rownames(coefs),2)
        hyps = c()
        for (h in 1:ncol(hyp_names)){
            hyps = c(hyps,paste(hyp_names[1,h],"-",hyp_names[2,h],"= 0"))}
        comps = summary(glht(model, hyps),test=adjusted("none"))
        comps2 = summary(glht(model_perc, hyps),test=adjusted("none"))
        comps_results = cbind(comps$test$coefficients,comps$test$sigma)
        rownames(comps_results) = paste(rownames(comps_results),"_lev",sep="")
        comps2_results = cbind(comps2$test$coefficients,comps2$test$sigma)
        rownames(comps2_results) = paste(rownames(comps2_results),"_perc",sep="")
        boot_by_test_subgroup_results = rbind(boot_by_test_subgroup_results, coefs, comps_results, comps2_results)}
        rownames(boot_by_test_subgroup_results) = paste("test_",test,str_replace_all(rownames(boot_by_test_subgroup_results),paste("treatment_",test,"1",sep=""),""),sep="")
    boot_subgroup_results = rbind(boot_subgroup_results,boot_by_test_subgroup_results)}
    
    colnames(boot_subgroup_results) = c("estimate","std.err")
    # The null statistic is computed by subtracting the original estimate from the bootstrap sample and dividing #
    # by the standard error of the bootstraped estimate #
    # Remember the absolute value since we are testing a two-sided hypothesis #
    # Also, note that we sort the columns of the bootstrapped statistics by the order of significance as required by RW #
    Bs_lev = (boot_subgroup_results[rownames(sorted_orig_lev),"estimate"] - sorted_orig_lev$estimate)/boot_subgroup_results[rownames(sorted_orig_lev),"std.err"]
    Bs_perc = (boot_subgroup_results[rownames(sorted_orig_perc),"estimate"] - sorted_orig_perc$estimate)/boot_subgroup_results[rownames(sorted_orig_perc),"std.err"]
    Bs_single = (boot_subgroup_results[rownames(sorted_orig_single),"estimate"] - sorted_orig_single$estimate)/boot_subgroup_results[rownames(sorted_orig_single),"std.err"]
    
    return(rbind(Bs_lev,Bs_perc,Bs_single))}
# Run the RW function using parallelization #
start_time <- Sys.time()
set.seed(777)
boot_output = foreach(b = 1:B) %dopar% RW(b)
bootstrapped_statistics = do.call(rbind.data.frame, boot_output)
end_time <- Sys.time()
end_time - start_time
## Time difference of 1.247819 mins
# Convert the output to dataframes #
bootstrapped_statistics_lev = bootstrapped_statistics[startsWith(rownames(bootstrapped_statistics),"Bs_lev"),1:nrow(sorted_orig_lev)]
bootstrapped_statistics_perc = bootstrapped_statistics[startsWith(rownames(bootstrapped_statistics),"Bs_perc"),1:nrow(sorted_orig_perc)]
bootstrapped_statistics_single = bootstrapped_statistics[startsWith(rownames(bootstrapped_statistics),"Bs_single"),1:nrow(sorted_orig_single)]
# Important, we keep the order of the sorted set of hypotheses #
colnames(bootstrapped_statistics_lev) = rownames(sorted_orig_lev)
colnames(bootstrapped_statistics_perc) = rownames(sorted_orig_perc)
colnames(bootstrapped_statistics_single) = rownames(sorted_orig_single)
# We adapt the t-statistics of the two-sided tests:
bootstrapped_statistics_lev[rownames(sorted_orig_lev) %in% two_sided] = -abs(bootstrapped_statistics_lev[rownames(sorted_orig_lev) %in% two_sided])
bootstrapped_statistics_perc[rownames(sorted_orig_perc) %in% two_sided] = -abs(bootstrapped_statistics_perc[rownames(sorted_orig_perc) %in% two_sided])
bootstrapped_statistics_single[rownames(sorted_orig_single) %in% two_sided] = -abs(bootstrapped_statistics_single[rownames(sorted_orig_single) %in% two_sided])
# Now we compute the "max" statistics and the empirical quantiles #
min_stats_lev = data.frame(matrix(NA,B,num_hyp_lev))
colnames(min_stats_lev) = colnames(bootstrapped_statistics_lev)
for (h in 1:(num_hyp_lev-1)){
    min_stats_lev[,h] = apply(bootstrapped_statistics_lev[,h:num_hyp_lev], MARGIN=1, FUN=min)}
min_stats_lev[,num_hyp_lev] = bootstrapped_statistics_lev[,num_hyp_lev]

# Now we compute the "max" statistics and the empirical quantiles #
min_stats_perc = data.frame(matrix(NA,B,num_hyp_perc))
colnames(min_stats_perc) = colnames(bootstrapped_statistics_perc)
for (h in 1:(num_hyp_perc-1)){
    min_stats_perc[,h] = apply(bootstrapped_statistics_perc[,h:num_hyp_perc], MARGIN=1, FUN=min)}
min_stats_perc[,num_hyp_perc] = bootstrapped_statistics_perc[,num_hyp_perc]

# Now we compute the "max" statistics and the empirical quantiles #
min_stats_single = data.frame(matrix(NA,B,num_hyp_single))
colnames(min_stats_single) = colnames(bootstrapped_statistics_single)
for (h in 1:(num_hyp_single-1)){
    min_stats_single[,h] = apply(bootstrapped_statistics_single[,h:num_hyp_single], MARGIN=1, FUN=min)}
min_stats_single[,num_hyp_single] = bootstrapped_statistics_single[,num_hyp_single]
# And the empirical quantiles given the significance level #
Cs_lev = unname(apply(min_stats_lev, MARGIN=2, FUN=quantile, probs=c(alpha)))

# And the empirical quantiles given the significance level #
Cs_perc = unname(apply(min_stats_perc, MARGIN=2, FUN=quantile, probs=c(alpha)))

# And the empirical quantiles given the significance level #
Cs_single = unname(apply(min_stats_single, MARGIN=2, FUN=quantile, probs=c(alpha)))
# And finally we run the rejection algorithm
sorted_orig_lev$adjust_rejected = NA
# R will index the hypothesis we need to test at each round
R = 1
# r will be the counter of rejected hypotheses at each round
r = Inf
# The while loop stops if no hypotheses are rejected in a round or if we reject all.
while (r > 0 & R <= num_hyp_lev){
    # We compare the original t-statistics of the hypotheses we haven't tested at each round with the quantiles
    sorted_orig_lev$adjust_rejected[R:num_hyp_lev] = (sorted_orig_lev$ts[R:num_hyp_lev] < Cs_lev[R])
    r = sum(sorted_orig_lev$adjust_rejected[R:num_hyp_lev])
    R = r + R}

# And finally we run the rejection algorithm
sorted_orig_perc$adjust_rejected = NA
# R will index the hypothesis we need to test at each round
R = 1
# r will be the counter of rejected hypotheses at each round
r = Inf
# The while loop stops if no hypotheses are rejected in a round or if we reject all.
while (r > 0 & R <= num_hyp_perc){
    # We compare the original t-statistics of the hypotheses we haven't tested at each round with the quantiles
    sorted_orig_perc$adjust_rejected[R:num_hyp_perc] = (sorted_orig_perc$ts[R:num_hyp_perc] < Cs_perc[R])
    r = sum(sorted_orig_perc$adjust_rejected[R:num_hyp_perc])
    R = r + R}

# And finally we run the rejection algorithm
sorted_orig_single$adjust_rejected = NA
# R will index the hypothesis we need to test at each round
R = 1
# r will be the counter of rejected hypotheses at each round
r = Inf
# The while loop stops if no hypotheses are rejected in a round or if we reject all.
while (r > 0 & R <= num_hyp_single){
    # We compare the original t-statistics of the hypotheses we haven't tested at each round with the quantiles
    sorted_orig_single$adjust_rejected[R:num_hyp_single] = (sorted_orig_single$ts[R:num_hyp_single] < Cs_single[R])
    r = sum(sorted_orig_single$adjust_rejected[R:num_hyp_single])
    R = r + R}
# We can also compute the adjusted p-values
sorted_orig_lev$p_val_RW = NA
sorted_orig_lev$p_val_RW[1] = (sum(min_stats_lev[,1]<=sorted_orig_lev$ts[1])+1)/(B+1)
for (h in 2:num_hyp_lev){
    sorted_orig_lev$p_val_RW[h] = max((sum(min_stats_lev[,h]<=sorted_orig_lev$ts[h])+1)/(B+1), sorted_orig_lev$p_val_RW[h-1])}

# We can also compute the adjusted p-values
sorted_orig_perc$p_val_RW = NA
sorted_orig_perc$p_val_RW[1] = (sum(min_stats_perc[,1]<=sorted_orig_perc$ts[1])+1)/(B+1)
for (h in 2:num_hyp_perc){
    sorted_orig_perc$p_val_RW[h] = max((sum(min_stats_perc[,h]<=sorted_orig_perc$ts[h])+1)/(B+1), sorted_orig_perc$p_val_RW[h-1])}

# We can also compute the adjusted p-values
sorted_orig_single$p_val_RW = NA
sorted_orig_single$p_val_RW[1] = (sum(min_stats_single[,1]<=sorted_orig_single$ts[1])+1)/(B+1)
for (h in 2:num_hyp_single){
    sorted_orig_single$p_val_RW[h] = max((sum(min_stats_single[,h]<=sorted_orig_single$ts[h])+1)/(B+1), sorted_orig_single$p_val_RW[h-1])}
#Compare them to Bonferroni's and Holm's p-values (note that the minimum p-value in RW is 1/(B+1))
sorted_orig_lev$p_val_bonf = p.adjust(sorted_orig_lev$p_val,"bonferroni")
sorted_orig_lev$p_val_holm = p.adjust(sorted_orig_lev$p_val,"holm")

# Compare them to Bonferroni's p-values (note that the minimum p-value in RW is 1/(B+1))
sorted_orig_perc$p_val_bonf = p.adjust(sorted_orig_perc$p_val,"bonferroni")
sorted_orig_perc$p_val_holm = p.adjust(sorted_orig_perc$p_val,"holm")

# Compare them to Bonferroni's p-values (note that the minimum p-value in RW is 1/(B+1))
sorted_orig_single$p_val_bonf = p.adjust(sorted_orig_single$p_val,"bonferroni")
sorted_orig_single$p_val_holm = p.adjust(sorted_orig_single$p_val,"holm")
# Stack results #
final = rbind(sorted_orig_lev,sorted_orig_perc,sorted_orig_single)
# Filter columns #
final_subgroup_results = final[rownames(final),c("obs","baseline","estimate","std.err","CI_low","CI_upp","p_val","p_val_holm","p_val_RW")]

Visualization

# Extract the name of the tests #
tests = rownames(final_subgroup_results)
tests
##   [1] "test_7:base_rate_pre_medM1 - :base_rate_pre_medM2_lev"                                                      
##   [2] "test_7:misinfo_pre_medM1 - :misinfo_pre_medM2_lev"                                                          
##   [3] "test_7:misinfo_total_acc_score_pre_medM1 - :misinfo_total_acc_score_pre_medM2_lev"                          
##   [4] "test_12:gender_Man0 - :gender_Man1_lev"                                                                     
##   [5] "test_12:education_High_school_or_less0 - :education_High_school_or_less1_lev"                               
##   [6] "test_12:misinfo_total_acc_score_pre_medM1 - :misinfo_total_acc_score_pre_medM2_lev"                         
##   [7] "test_12:base_rate_pre_medM1 - :base_rate_pre_medM2_lev"                                                     
##   [8] "test_7:religion_Christian0 - :religion_Christian1_lev"                                                      
##   [9] "test_12:misinfo_pre_medM1 - :misinfo_pre_medM2_lev"                                                         
##  [10] "test_7:gender_Man0 - :gender_Man1_lev"                                                                      
##  [11] "test_12:social_media_hours_medM1 - :social_media_hours_medM2_lev"                                           
##  [12] "test_8:education_High_school_or_less0 - :education_High_school_or_less1_lev"                                
##  [13] "test_8:misinfo_pre_medM1 - :misinfo_pre_medM2_lev"                                                          
##  [14] "test_8:location_Mostly_rural0 - :location_Mostly_rural1_lev"                                                
##  [15] "test_8:base_rate_pre_medM1 - :base_rate_pre_medM2_lev"                                                      
##  [16] "test_12:att_check_pre0 - :att_check_pre1_lev"                                                               
##  [17] "test_12:religiosity_Attends0 - :religiosity_Attends1_lev"                                                   
##  [18] "test_7:base_total_acc_score_pre_medM1 - :base_total_acc_score_pre_medM2_lev"                                
##  [19] "test_12:age_medM1 - :age_medM2_lev"                                                                         
##  [20] "test_12:religion_Christian0 - :religion_Christian1_lev"                                                     
##  [21] "test_8:misinfo_total_acc_score_pre_medM1 - :misinfo_total_acc_score_pre_medM2_lev"                          
##  [22] "test_7:age_medM1 - :age_medM2_lev"                                                                          
##  [23] "test_8:social_media_hours_medM1 - :social_media_hours_medM2_lev"                                            
##  [24] "test_8:base_total_acc_score_pre_medM1 - :base_total_acc_score_pre_medM2_lev"                                
##  [25] "test_8:att_check_pre0 - :att_check_pre1_lev"                                                                
##  [26] "test_8:gender_Man0 - :gender_Man1_lev"                                                                      
##  [27] "test_12:location_Mostly_rural0 - :location_Mostly_rural1_lev"                                               
##  [28] "test_7:location_Mostly_rural0 - :location_Mostly_rural1_lev"                                                
##  [29] "test_8:religion_Christian0 - :religion_Christian1_lev"                                                      
##  [30] "test_7:religiosity_Attends0 - :religiosity_Attends1_lev"                                                    
##  [31] "test_8:religiosity_Attends0 - :religiosity_Attends1_lev"                                                    
##  [32] "test_7:social_media_hours_medM1 - :social_media_hours_medM2_lev"                                            
##  [33] "test_12:marital_Married_or_in_a_domestic_partnership0 - :marital_Married_or_in_a_domestic_partnership1_lev" 
##  [34] "test_12:social_media_share_above_400 - :social_media_share_above_401_lev"                                   
##  [35] "test_7:att_check_pre0 - :att_check_pre1_lev"                                                                
##  [36] "test_8:marital_Married_or_in_a_domestic_partnership0 - :marital_Married_or_in_a_domestic_partnership1_lev"  
##  [37] "test_8:social_media_share_above_400 - :social_media_share_above_401_lev"                                    
##  [38] "test_12:base_total_acc_score_pre_medM1 - :base_total_acc_score_pre_medM2_lev"                               
##  [39] "test_7:education_High_school_or_less0 - :education_High_school_or_less1_lev"                                
##  [40] "test_7:marital_Married_or_in_a_domestic_partnership0 - :marital_Married_or_in_a_domestic_partnership1_lev"  
##  [41] "test_8:age_medM1 - :age_medM2_lev"                                                                          
##  [42] "test_7:social_media_share_above_400 - :social_media_share_above_401_lev"                                    
##  [43] "test_12:gender_Man0 - :gender_Man1_perc"                                                                    
##  [44] "test_7:gender_Man0 - :gender_Man1_perc"                                                                     
##  [45] "test_8:education_High_school_or_less0 - :education_High_school_or_less1_perc"                               
##  [46] "test_12:education_High_school_or_less0 - :education_High_school_or_less1_perc"                              
##  [47] "test_7:religion_Christian0 - :religion_Christian1_perc"                                                     
##  [48] "test_12:social_media_hours_medM1 - :social_media_hours_medM2_perc"                                          
##  [49] "test_12:base_rate_pre_medM1 - :base_rate_pre_medM2_perc"                                                    
##  [50] "test_12:misinfo_total_acc_score_pre_medM1 - :misinfo_total_acc_score_pre_medM2_perc"                        
##  [51] "test_7:base_rate_pre_medM1 - :base_rate_pre_medM2_perc"                                                     
##  [52] "test_12:att_check_pre0 - :att_check_pre1_perc"                                                              
##  [53] "test_8:social_media_share_above_400 - :social_media_share_above_401_perc"                                   
##  [54] "test_12:misinfo_pre_medM1 - :misinfo_pre_medM2_perc"                                                        
##  [55] "test_7:misinfo_total_acc_score_pre_medM1 - :misinfo_total_acc_score_pre_medM2_perc"                         
##  [56] "test_12:religiosity_Attends0 - :religiosity_Attends1_perc"                                                  
##  [57] "test_8:location_Mostly_rural0 - :location_Mostly_rural1_perc"                                               
##  [58] "test_7:social_media_share_above_400 - :social_media_share_above_401_perc"                                   
##  [59] "test_12:religion_Christian0 - :religion_Christian1_perc"                                                    
##  [60] "test_7:social_media_hours_medM1 - :social_media_hours_medM2_perc"                                           
##  [61] "test_12:age_medM1 - :age_medM2_perc"                                                                        
##  [62] "test_7:misinfo_pre_medM1 - :misinfo_pre_medM2_perc"                                                         
##  [63] "test_7:att_check_pre0 - :att_check_pre1_perc"                                                               
##  [64] "test_12:location_Mostly_rural0 - :location_Mostly_rural1_perc"                                              
##  [65] "test_8:social_media_hours_medM1 - :social_media_hours_medM2_perc"                                           
##  [66] "test_8:age_medM1 - :age_medM2_perc"                                                                         
##  [67] "test_8:gender_Man0 - :gender_Man1_perc"                                                                     
##  [68] "test_7:religiosity_Attends0 - :religiosity_Attends1_perc"                                                   
##  [69] "test_7:marital_Married_or_in_a_domestic_partnership0 - :marital_Married_or_in_a_domestic_partnership1_perc" 
##  [70] "test_8:att_check_pre0 - :att_check_pre1_perc"                                                               
##  [71] "test_8:religiosity_Attends0 - :religiosity_Attends1_perc"                                                   
##  [72] "test_12:marital_Married_or_in_a_domestic_partnership0 - :marital_Married_or_in_a_domestic_partnership1_perc"
##  [73] "test_8:misinfo_pre_medM1 - :misinfo_pre_medM2_perc"                                                         
##  [74] "test_8:misinfo_total_acc_score_pre_medM1 - :misinfo_total_acc_score_pre_medM2_perc"                         
##  [75] "test_8:religion_Christian0 - :religion_Christian1_perc"                                                     
##  [76] "test_7:age_medM1 - :age_medM2_perc"                                                                         
##  [77] "test_8:base_total_acc_score_pre_medM1 - :base_total_acc_score_pre_medM2_perc"                               
##  [78] "test_8:base_rate_pre_medM1 - :base_rate_pre_medM2_perc"                                                     
##  [79] "test_7:location_Mostly_rural0 - :location_Mostly_rural1_perc"                                               
##  [80] "test_7:base_total_acc_score_pre_medM1 - :base_total_acc_score_pre_medM2_perc"                               
##  [81] "test_12:social_media_share_above_400 - :social_media_share_above_401_perc"                                  
##  [82] "test_12:base_total_acc_score_pre_medM1 - :base_total_acc_score_pre_medM2_perc"                              
##  [83] "test_7:education_High_school_or_less0 - :education_High_school_or_less1_perc"                               
##  [84] "test_8:marital_Married_or_in_a_domestic_partnership0 - :marital_Married_or_in_a_domestic_partnership1_perc" 
##  [85] "test_7:base_rate_pre_medM2"                                                                                 
##  [86] "test_7:misinfo_pre_medM2"                                                                                   
##  [87] "test_7:religion_Christian1"                                                                                 
##  [88] "test_7:religiosity_Attends1"                                                                                
##  [89] "test_7:misinfo_total_acc_score_pre_medM2"                                                                   
##  [90] "test_7:base_total_acc_score_pre_medM2"                                                                      
##  [91] "test_7:education_High_school_or_less0"                                                                      
##  [92] "test_7:social_media_share_above_401"                                                                        
##  [93] "test_7:marital_Married_or_in_a_domestic_partnership0"                                                       
##  [94] "test_8:base_rate_pre_medM2"                                                                                 
##  [95] "test_8:religion_Christian1"                                                                                 
##  [96] "test_7:location_Mostly_rural0"                                                                              
##  [97] "test_7:age_medM1"                                                                                           
##  [98] "test_8:education_High_school_or_less0"                                                                      
##  [99] "test_8:religiosity_Attends1"                                                                                
## [100] "test_8:misinfo_pre_medM2"                                                                                   
## [101] "test_7:social_media_hours_medM1"                                                                            
## [102] "test_7:att_check_pre0"                                                                                      
## [103] "test_7:gender_Man0"                                                                                         
## [104] "test_7:gender_Man1"                                                                                         
## [105] "test_8:base_total_acc_score_pre_medM2"                                                                      
## [106] "test_7:att_check_pre1"                                                                                      
## [107] "test_8:gender_Man1"                                                                                         
## [108] "test_8:marital_Married_or_in_a_domestic_partnership0"                                                       
## [109] "test_7:social_media_hours_medM2"                                                                            
## [110] "test_8:misinfo_total_acc_score_pre_medM2"                                                                   
## [111] "test_7:age_medM2"                                                                                           
## [112] "test_8:social_media_share_above_401"                                                                        
## [113] "test_8:att_check_pre0"                                                                                      
## [114] "test_8:social_media_hours_medM2"                                                                            
## [115] "test_7:location_Mostly_rural1"                                                                              
## [116] "test_7:marital_Married_or_in_a_domestic_partnership1"                                                       
## [117] "test_7:social_media_share_above_400"                                                                        
## [118] "test_8:age_medM2"                                                                                           
## [119] "test_7:base_total_acc_score_pre_medM1"                                                                      
## [120] "test_8:location_Mostly_rural0"                                                                              
## [121] "test_8:location_Mostly_rural1"                                                                              
## [122] "test_8:age_medM1"                                                                                           
## [123] "test_7:education_High_school_or_less1"                                                                      
## [124] "test_8:social_media_share_above_400"                                                                        
## [125] "test_8:social_media_hours_medM1"                                                                            
## [126] "test_7:misinfo_total_acc_score_pre_medM1"                                                                   
## [127] "test_8:att_check_pre1"                                                                                      
## [128] "test_8:base_total_acc_score_pre_medM1"                                                                      
## [129] "test_8:misinfo_total_acc_score_pre_medM1"                                                                   
## [130] "test_7:misinfo_pre_medM1"                                                                                   
## [131] "test_8:misinfo_pre_medM1"                                                                                   
## [132] "test_8:marital_Married_or_in_a_domestic_partnership1"                                                       
## [133] "test_8:base_rate_pre_medM1"                                                                                 
## [134] "test_7:base_rate_pre_medM1"                                                                                 
## [135] "test_8:gender_Man0"                                                                                         
## [136] "test_12:gender_Man0"                                                                                        
## [137] "test_12:base_rate_pre_medM2"                                                                                
## [138] "test_8:education_High_school_or_less1"                                                                      
## [139] "test_12:misinfo_total_acc_score_pre_medM2"                                                                  
## [140] "test_12:education_High_school_or_less1"                                                                     
## [141] "test_12:misinfo_pre_medM2"                                                                                  
## [142] "test_12:social_media_hours_medM1"                                                                           
## [143] "test_8:religiosity_Attends0"                                                                                
## [144] "test_12:att_check_pre1"                                                                                     
## [145] "test_12:age_medM1"                                                                                          
## [146] "test_12:religiosity_Attends1"                                                                               
## [147] "test_12:religion_Christian1"                                                                                
## [148] "test_12:location_Mostly_rural0"                                                                             
## [149] "test_7:religiosity_Attends0"                                                                                
## [150] "test_12:social_media_share_above_401"                                                                       
## [151] "test_12:base_total_acc_score_pre_medM2"                                                                     
## [152] "test_12:marital_Married_or_in_a_domestic_partnership1"                                                      
## [153] "test_8:religion_Christian0"                                                                                 
## [154] "test_12:marital_Married_or_in_a_domestic_partnership0"                                                      
## [155] "test_12:base_total_acc_score_pre_medM1"                                                                     
## [156] "test_12:religiosity_Attends0"                                                                               
## [157] "test_12:social_media_share_above_400"                                                                       
## [158] "test_7:religion_Christian0"                                                                                 
## [159] "test_12:religion_Christian0"                                                                                
## [160] "test_12:education_High_school_or_less0"                                                                     
## [161] "test_12:age_medM2"                                                                                          
## [162] "test_12:att_check_pre0"                                                                                     
## [163] "test_12:location_Mostly_rural1"                                                                             
## [164] "test_12:social_media_hours_medM2"                                                                           
## [165] "test_12:base_rate_pre_medM1"                                                                                
## [166] "test_12:misinfo_total_acc_score_pre_medM1"                                                                  
## [167] "test_12:gender_Man1"                                                                                        
## [168] "test_12:misinfo_pre_medM1"
# Adjust the name of the tests for display purposes #
tests = str_replace_all(tests, ":", "")

tests = str_replace_all(tests, "test_10", "Test 10: ")
tests = str_replace_all(tests, "test_11", "Test 11: ")
tests = str_replace_all(tests, "test_12", "Test 12: ")
tests = str_replace_all(tests, "test_6", "Test 6: ")
tests = str_replace_all(tests, "test_7", "Test 7: ")
tests = str_replace_all(tests, "test_8", "Test 8: ")
tests = str_replace_all(tests, "test_9", "Test 9: ")

tests = str_replace_all(tests, "_medM1", "Below median")
tests = str_replace_all(tests, "_medM2", "Above median")

tests = str_replace_all(tests, "att_check_pre0", "Fail AC")
tests = str_replace_all(tests, "att_check_pre1", "Pass AC")
tests = str_replace_all(tests, "gender_Man0", "Gender: Woman")
tests = str_replace_all(tests, "gender_Man1", "Gender: Man")
tests = str_replace_all(tests, "education_High_school_or_less0", "Education: More than High School")
tests = str_replace_all(tests, "education_High_school_or_less1", "Education: High School or Less")
tests = str_replace_all(tests, "base_rate_pre", "Base Rate Pre ")
tests = str_replace_all(tests, "misinfo_pre", "Misinfo Rate Pre ")
tests = str_replace_all(tests, "base_total_acc_score_pre", "Base Acc Score Pre ")
tests = str_replace_all(tests, "misinfo_total_acc_score_pre", "Misinfo Acc Score Pre ")
tests = str_replace_all(tests, "High school or less1", "High School or Less")

tests = str_replace_all(tests, "marital_Married_or_in_a_domestic_partnership1", "Married ")
tests = str_replace_all(tests, "marital_Married_or_in_a_domestic_partnership0", "Non-Married ")
tests = str_replace_all(tests, "location_Mostly_rural0", "Location: Non Rural ")
tests = str_replace_all(tests, "location_Mostly_rural1", "Location: Mostly Rural ")
tests = str_replace_all(tests, "religion_Christian0", "Religion: Non-Christian ")
tests = str_replace_all(tests, "religion_Christian1", "Religion: Christian ")
tests = str_replace_all(tests, "religiosity_Attends0", "Religiosity: Does not attend ")
tests = str_replace_all(tests, "religiosity_Attends1", "Religiosity: Attends ")
tests = str_replace_all(tests, "social_media_share_above_400", "Prop. of content shared below 40% ")
tests = str_replace_all(tests, "social_media_share_above_401", "Prop. of content shared above 40% ")
tests = str_replace_all(tests, "age", "Age: ")



tests = str_replace_all(tests, "social_media_hours", "Hrs/day on social media: ")
tests = str_replace_all(tests, "share_pre_all", "Pre-survey sharing: ")
tests = str_replace_all(tests, "share_pre_misinfo", "Pre-survey misinfo sharing: ")
tests = str_replace_all(tests, "acc_disc_score_pre", "Pre-survey accuracy disc. score: ")
tests = str_replace_all(tests, "att_check_group", "Pre-survey attention checks: ")
tests = str_replace_all(tests, "zero", "0-20%")
tests = str_replace_all(tests, "twenty", "20-40%")
tests = str_replace_all(tests, "forty", "40-60%")
tests = str_replace_all(tests, "sixty", "60-80%")
tests = str_replace_all(tests, "eighty", "80-100%")
tests = str_replace_all(tests, "no", "None")
tests = str_replace_all(tests, "one", "One")
tests = str_replace_all(tests, "all", "All")
tests = str_replace_all(tests, "NOnet", "not")
tests = str_replace_all(tests, "_", " ")
tests
##   [1] "Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev"                        
##   [2] "Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev"                  
##   [3] "Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev"        
##   [4] "Test 12: Gender: Woman - Gender: Man lev"                                                   
##   [5] "Test 12: Education: More than High School - Education: High School or Less lev"             
##   [6] "Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev"       
##   [7] "Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev"                       
##   [8] "Test 7: Religion: Non-Christian  - Religion: Christian  lev"                                
##   [9] "Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev"                 
##  [10] "Test 7: Gender: Woman - Gender: Man lev"                                                    
##  [11] "Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev" 
##  [12] "Test 8: Education: More than High School - Education: High School or Less lev"              
##  [13] "Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev"                  
##  [14] "Test 8: Location: Non Rural  - Location: Mostly Rural  lev"                                 
##  [15] "Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev"                        
##  [16] "Test 12: Fail AC - Pass AC lev"                                                             
##  [17] "Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev"                         
##  [18] "Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev"              
##  [19] "Test 12: Age: Below median - Age: Above median lev"                                         
##  [20] "Test 12: Religion: Non-Christian  - Religion: Christian  lev"                               
##  [21] "Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev"        
##  [22] "Test 7: Age: Below median - Age: Above median lev"                                          
##  [23] "Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev"  
##  [24] "Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev"              
##  [25] "Test 8: Fail AC - Pass AC lev"                                                              
##  [26] "Test 8: Gender: Woman - Gender: Man lev"                                                    
##  [27] "Test 12: Location: Non Rural  - Location: Mostly Rural  lev"                                
##  [28] "Test 7: Location: Non Rural  - Location: Mostly Rural  lev"                                 
##  [29] "Test 8: Religion: Non-Christian  - Religion: Christian  lev"                                
##  [30] "Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev"                          
##  [31] "Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev"                          
##  [32] "Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev"  
##  [33] "Test 12: Non-Married  - Married  lev"                                                       
##  [34] "Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev"       
##  [35] "Test 7: Fail AC - Pass AC lev"                                                              
##  [36] "Test 8: Non-Married  - Married  lev"                                                        
##  [37] "Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev"        
##  [38] "Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev"             
##  [39] "Test 7: Education: More than High School - Education: High School or Less lev"              
##  [40] "Test 7: Non-Married  - Married  lev"                                                        
##  [41] "Test 8: Age: Below median - Age: Above median lev"                                          
##  [42] "Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev"        
##  [43] "Test 12: Gender: Woman - Gender: Man perc"                                                  
##  [44] "Test 7: Gender: Woman - Gender: Man perc"                                                   
##  [45] "Test 8: Education: More than High School - Education: High School or Less perc"             
##  [46] "Test 12: Education: More than High School - Education: High School or Less perc"            
##  [47] "Test 7: Religion: Non-Christian  - Religion: Christian  perc"                               
##  [48] "Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc"
##  [49] "Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc"                      
##  [50] "Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc"      
##  [51] "Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc"                       
##  [52] "Test 12: Fail AC - Pass AC perc"                                                            
##  [53] "Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc"       
##  [54] "Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc"                
##  [55] "Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc"       
##  [56] "Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc"                        
##  [57] "Test 8: Location: Non Rural  - Location: Mostly Rural  perc"                                
##  [58] "Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc"       
##  [59] "Test 12: Religion: Non-Christian  - Religion: Christian  perc"                              
##  [60] "Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc" 
##  [61] "Test 12: Age: Below median - Age: Above median perc"                                        
##  [62] "Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc"                 
##  [63] "Test 7: Fail AC - Pass AC perc"                                                             
##  [64] "Test 12: Location: Non Rural  - Location: Mostly Rural  perc"                               
##  [65] "Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc" 
##  [66] "Test 8: Age: Below median - Age: Above median perc"                                         
##  [67] "Test 8: Gender: Woman - Gender: Man perc"                                                   
##  [68] "Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc"                         
##  [69] "Test 7: Non-Married  - Married  perc"                                                       
##  [70] "Test 8: Fail AC - Pass AC perc"                                                             
##  [71] "Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc"                         
##  [72] "Test 12: Non-Married  - Married  perc"                                                      
##  [73] "Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc"                 
##  [74] "Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc"       
##  [75] "Test 8: Religion: Non-Christian  - Religion: Christian  perc"                               
##  [76] "Test 7: Age: Below median - Age: Above median perc"                                         
##  [77] "Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc"             
##  [78] "Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc"                       
##  [79] "Test 7: Location: Non Rural  - Location: Mostly Rural  perc"                                
##  [80] "Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc"             
##  [81] "Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc"      
##  [82] "Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc"            
##  [83] "Test 7: Education: More than High School - Education: High School or Less perc"             
##  [84] "Test 8: Non-Married  - Married  perc"                                                       
##  [85] "Test 7: Base Rate Pre Above median"                                                         
##  [86] "Test 7: Misinfo Rate Pre Above median"                                                      
##  [87] "Test 7: Religion: Christian "                                                               
##  [88] "Test 7: Religiosity: Attends "                                                              
##  [89] "Test 7: Misinfo Acc Score Pre Above median"                                                 
##  [90] "Test 7: Base Acc Score Pre Above median"                                                    
##  [91] "Test 7: Education: More than High School"                                                   
##  [92] "Test 7: Prop. of content shared above 40% "                                                 
##  [93] "Test 7: Non-Married "                                                                       
##  [94] "Test 8: Base Rate Pre Above median"                                                         
##  [95] "Test 8: Religion: Christian "                                                               
##  [96] "Test 7: Location: Non Rural "                                                               
##  [97] "Test 7: Age: Below median"                                                                  
##  [98] "Test 8: Education: More than High School"                                                   
##  [99] "Test 8: Religiosity: Attends "                                                              
## [100] "Test 8: Misinfo Rate Pre Above median"                                                      
## [101] "Test 7: Hrs/day on social media: Below median"                                              
## [102] "Test 7: Fail AC"                                                                            
## [103] "Test 7: Gender: Woman"                                                                      
## [104] "Test 7: Gender: Man"                                                                        
## [105] "Test 8: Base Acc Score Pre Above median"                                                    
## [106] "Test 7: Pass AC"                                                                            
## [107] "Test 8: Gender: Man"                                                                        
## [108] "Test 8: Non-Married "                                                                       
## [109] "Test 7: Hrs/day on social media: Above median"                                              
## [110] "Test 8: Misinfo Acc Score Pre Above median"                                                 
## [111] "Test 7: Age: Above median"                                                                  
## [112] "Test 8: Prop. of content shared above 40% "                                                 
## [113] "Test 8: Fail AC"                                                                            
## [114] "Test 8: Hrs/day on social media: Above median"                                              
## [115] "Test 7: Location: Mostly Rural "                                                            
## [116] "Test 7: Married "                                                                           
## [117] "Test 7: Prop. of content shared below 40% "                                                 
## [118] "Test 8: Age: Above median"                                                                  
## [119] "Test 7: Base Acc Score Pre Below median"                                                    
## [120] "Test 8: Location: Non Rural "                                                               
## [121] "Test 8: Location: Mostly Rural "                                                            
## [122] "Test 8: Age: Below median"                                                                  
## [123] "Test 7: Education: High School or Less"                                                     
## [124] "Test 8: Prop. of content shared below 40% "                                                 
## [125] "Test 8: Hrs/day on social media: Below median"                                              
## [126] "Test 7: Misinfo Acc Score Pre Below median"                                                 
## [127] "Test 8: Pass AC"                                                                            
## [128] "Test 8: Base Acc Score Pre Below median"                                                    
## [129] "Test 8: Misinfo Acc Score Pre Below median"                                                 
## [130] "Test 7: Misinfo Rate Pre Below median"                                                      
## [131] "Test 8: Misinfo Rate Pre Below median"                                                      
## [132] "Test 8: Married "                                                                           
## [133] "Test 8: Base Rate Pre Below median"                                                         
## [134] "Test 7: Base Rate Pre Below median"                                                         
## [135] "Test 8: Gender: Woman"                                                                      
## [136] "Test 12: Gender: Woman"                                                                     
## [137] "Test 12: Base Rate Pre Above median"                                                        
## [138] "Test 8: Education: High School or Less"                                                     
## [139] "Test 12: Misinfo Acc Score Pre Above median"                                                
## [140] "Test 12: Education: High School or Less"                                                    
## [141] "Test 12: Misinfo Rate Pre Above median"                                                     
## [142] "Test 12: Hrs/day on social media: Below median"                                             
## [143] "Test 8: Religiosity: Does not attend "                                                      
## [144] "Test 12: Pass AC"                                                                           
## [145] "Test 12: Age: Below median"                                                                 
## [146] "Test 12: Religiosity: Attends "                                                             
## [147] "Test 12: Religion: Christian "                                                              
## [148] "Test 12: Location: Non Rural "                                                              
## [149] "Test 7: Religiosity: Does not attend "                                                      
## [150] "Test 12: Prop. of content shared above 40% "                                                
## [151] "Test 12: Base Acc Score Pre Above median"                                                   
## [152] "Test 12: Married "                                                                          
## [153] "Test 8: Religion: Non-Christian "                                                           
## [154] "Test 12: Non-Married "                                                                      
## [155] "Test 12: Base Acc Score Pre Below median"                                                   
## [156] "Test 12: Religiosity: Does not attend "                                                     
## [157] "Test 12: Prop. of content shared below 40% "                                                
## [158] "Test 7: Religion: Non-Christian "                                                           
## [159] "Test 12: Religion: Non-Christian "                                                          
## [160] "Test 12: Education: More than High School"                                                  
## [161] "Test 12: Age: Above median"                                                                 
## [162] "Test 12: Fail AC"                                                                           
## [163] "Test 12: Location: Mostly Rural "                                                           
## [164] "Test 12: Hrs/day on social media: Above median"                                             
## [165] "Test 12: Base Rate Pre Below median"                                                        
## [166] "Test 12: Misinfo Acc Score Pre Below median"                                                
## [167] "Test 12: Gender: Man"                                                                       
## [168] "Test 12: Misinfo Rate Pre Below median"
# Rename the dataframe with the results #
rownames(final_subgroup_results) = tests
# Store the results #
saveRDS(final_subgroup_results,"subgroup_results_primary_outcome.RDS")
write.csv(final_subgroup_results, "tables/conditional_misinfo_subgroup_RW.csv")
# Snapshot of diff-in-diff by increasing p-value #
diff = final_subgroup_results[is.na(final_subgroup_results$obs),]
round(diff[order(diff$p_val_RW),],4)
##                                                                                             obs
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                          NA
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    NA
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          NA
## Test 12: Gender: Woman - Gender: Man perc                                                    NA
## Test 12: Gender: Woman - Gender: Man lev                                                     NA
## Test 7: Gender: Woman - Gender: Man perc                                                     NA
## Test 12: Education: More than High School - Education: High School or Less lev               NA
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev         NA
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                         NA
## Test 8: Education: More than High School - Education: High School or Less perc               NA
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                  NA
## Test 12: Education: More than High School - Education: High School or Less perc              NA
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                   NA
## Test 7: Gender: Woman - Gender: Man lev                                                      NA
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   NA
## Test 8: Education: More than High School - Education: High School or Less lev                NA
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                 NA
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  NA
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    NA
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                        NA
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        NA
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                   NA
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                         NA
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                          NA
## Test 12: Fail AC - Pass AC lev                                                               NA
## Test 12: Fail AC - Pass AC perc                                                              NA
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                           NA
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                NA
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         NA
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  NA
## Test 12: Age: Below median - Age: Above median lev                                           NA
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                 NA
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          NA
## Test 7: Age: Below median - Age: Above median lev                                            NA
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    NA
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                NA
## Test 8: Fail AC - Pass AC lev                                                                NA
## Test 8: Gender: Woman - Gender: Man lev                                                      NA
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                  NA
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                   NA
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                  NA
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                            NA
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                            NA
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    NA
## Test 12: Non-Married  - Married  lev                                                         NA
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         NA
## Test 7: Fail AC - Pass AC lev                                                                NA
## Test 8: Non-Married  - Married  lev                                                          NA
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          NA
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               NA
## Test 7: Education: More than High School - Education: High School or Less lev                NA
## Test 7: Non-Married  - Married  lev                                                          NA
## Test 8: Age: Below median - Age: Above median lev                                            NA
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          NA
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         NA
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                          NA
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                  NA
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         NA
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                NA
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   NA
## Test 12: Age: Below median - Age: Above median perc                                          NA
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   NA
## Test 7: Fail AC - Pass AC perc                                                               NA
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                 NA
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   NA
## Test 8: Age: Below median - Age: Above median perc                                           NA
## Test 8: Gender: Woman - Gender: Man perc                                                     NA
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                           NA
## Test 7: Non-Married  - Married  perc                                                         NA
## Test 8: Fail AC - Pass AC perc                                                               NA
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                           NA
## Test 12: Non-Married  - Married  perc                                                        NA
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   NA
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         NA
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                 NA
## Test 7: Age: Below median - Age: Above median perc                                           NA
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               NA
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                         NA
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                  NA
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               NA
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        NA
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              NA
## Test 7: Education: More than High School - Education: High School or Less perc               NA
## Test 8: Non-Married  - Married  perc                                                         NA
##                                                                                             baseline
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                               NA
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                         NA
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev               NA
## Test 12: Gender: Woman - Gender: Man perc                                                         NA
## Test 12: Gender: Woman - Gender: Man lev                                                          NA
## Test 7: Gender: Woman - Gender: Man perc                                                          NA
## Test 12: Education: More than High School - Education: High School or Less lev                    NA
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev              NA
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                              NA
## Test 8: Education: More than High School - Education: High School or Less perc                    NA
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                       NA
## Test 12: Education: More than High School - Education: High School or Less perc                   NA
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                        NA
## Test 7: Gender: Woman - Gender: Man lev                                                           NA
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev        NA
## Test 8: Education: More than High School - Education: High School or Less lev                     NA
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                      NA
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc       NA
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                         NA
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                             NA
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc             NA
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                        NA
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                              NA
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                               NA
## Test 12: Fail AC - Pass AC lev                                                                    NA
## Test 12: Fail AC - Pass AC perc                                                                   NA
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                                NA
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                     NA
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc              NA
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                       NA
## Test 12: Age: Below median - Age: Above median lev                                                NA
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                      NA
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev               NA
## Test 7: Age: Below median - Age: Above median lev                                                 NA
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev         NA
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                     NA
## Test 8: Fail AC - Pass AC lev                                                                     NA
## Test 8: Gender: Woman - Gender: Man lev                                                           NA
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                       NA
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                        NA
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                       NA
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                                 NA
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                                 NA
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev         NA
## Test 12: Non-Married  - Married  lev                                                              NA
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev              NA
## Test 7: Fail AC - Pass AC lev                                                                     NA
## Test 8: Non-Married  - Married  lev                                                               NA
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev               NA
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                    NA
## Test 7: Education: More than High School - Education: High School or Less lev                     NA
## Test 7: Non-Married  - Married  lev                                                               NA
## Test 8: Age: Below median - Age: Above median lev                                                 NA
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev               NA
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc              NA
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                               NA
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                       NA
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc              NA
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                     NA
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc        NA
## Test 12: Age: Below median - Age: Above median perc                                               NA
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                        NA
## Test 7: Fail AC - Pass AC perc                                                                    NA
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                      NA
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc        NA
## Test 8: Age: Below median - Age: Above median perc                                                NA
## Test 8: Gender: Woman - Gender: Man perc                                                          NA
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                                NA
## Test 7: Non-Married  - Married  perc                                                              NA
## Test 8: Fail AC - Pass AC perc                                                                    NA
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                                NA
## Test 12: Non-Married  - Married  perc                                                             NA
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                        NA
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc              NA
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                      NA
## Test 7: Age: Below median - Age: Above median perc                                                NA
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                    NA
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                              NA
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                       NA
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                    NA
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc             NA
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                   NA
## Test 7: Education: More than High School - Education: High School or Less perc                    NA
## Test 8: Non-Married  - Married  perc                                                              NA
##                                                                                             estimate
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                           0.0860
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                     0.0826
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev           0.0763
## Test 12: Gender: Woman - Gender: Man perc                                                    -0.1657
## Test 12: Gender: Woman - Gender: Man lev                                                     -0.0690
## Test 7: Gender: Woman - Gender: Man perc                                                     -0.1247
## Test 12: Education: More than High School - Education: High School or Less lev                0.0558
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.0481
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.0492
## Test 8: Education: More than High School - Education: High School or Less perc               -0.1132
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                   0.1007
## Test 12: Education: More than High School - Education: High School or Less perc               0.1156
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.0429
## Test 7: Gender: Woman - Gender: Man lev                                                      -0.0452
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   -0.0420
## Test 8: Education: More than High School - Education: High School or Less lev                -0.0489
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                  0.1991
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  -0.0990
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                     0.0397
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                         0.0989
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         0.0947
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                    0.0415
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                          0.0817
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                           0.0368
## Test 12: Fail AC - Pass AC lev                                                                0.0339
## Test 12: Fail AC - Pass AC perc                                                               0.0808
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                            0.0754
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                 0.0316
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         -0.0765
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   0.0811
## Test 12: Age: Below median - Age: Above median lev                                           -0.0296
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                  0.0624
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev           0.0282
## Test 7: Age: Below median - Age: Above median lev                                            -0.0254
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev     0.0261
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                 0.0242
## Test 8: Fail AC - Pass AC lev                                                                -0.0236
## Test 8: Gender: Woman - Gender: Man lev                                                       0.0239
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                  -0.0213
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                    0.0202
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                   0.0383
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                             0.0363
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                            -0.0391
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    -0.0159
## Test 12: Non-Married  - Married  lev                                                          0.0140
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          0.0118
## Test 7: Fail AC - Pass AC lev                                                                 0.0103
## Test 8: Non-Married  - Married  lev                                                          -0.0092
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          -0.0082
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                0.0074
## Test 7: Education: More than High School - Education: High School or Less lev                 0.0069
## Test 7: Non-Married  - Married  lev                                                           0.0048
## Test 8: Age: Below median - Age: Above median lev                                             0.0042
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev           0.0036
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc          0.0671
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                           0.1696
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                   0.0666
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         -0.0629
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                 0.1428
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   -0.0566
## Test 12: Age: Below median - Age: Above median perc                                          -0.0588
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                    0.0485
## Test 7: Fail AC - Pass AC perc                                                                0.0440
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                 -0.0502
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc    0.0423
## Test 8: Age: Below median - Age: Above median perc                                            0.0421
## Test 8: Gender: Woman - Gender: Man perc                                                      0.0410
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                            0.0838
## Test 7: Non-Married  - Married  perc                                                          0.0391
## Test 8: Fail AC - Pass AC perc                                                               -0.0368
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                           -0.0858
## Test 12: Non-Married  - Married  perc                                                         0.0383
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   -0.0326
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         -0.0276
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                  0.0563
## Test 7: Age: Below median - Age: Above median perc                                           -0.0167
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               -0.0168
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                         -0.0171
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                   0.0164
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               -0.0141
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         0.0136
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               0.0027
## Test 7: Education: More than High School - Education: High School or Less perc                0.0024
## Test 8: Non-Married  - Married  perc                                                          0.0008
##                                                                                             std.err
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.0283
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.0275
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.0279
## Test 12: Gender: Woman - Gender: Man perc                                                    0.0692
## Test 12: Gender: Woman - Gender: Man lev                                                     0.0301
## Test 7: Gender: Woman - Gender: Man perc                                                     0.0621
## Test 12: Education: More than High School - Education: High School or Less lev               0.0323
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev         0.0281
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                         0.0288
## Test 8: Education: More than High School - Education: High School or Less perc               0.0652
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                  0.0614
## Test 12: Education: More than High School - Education: High School or Less perc              0.0718
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                   0.0279
## Test 7: Gender: Woman - Gender: Man lev                                                      0.0299
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   0.0287
## Test 8: Education: More than High School - Education: High School or Less lev                0.0336
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                 0.1292
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  0.0650
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.0282
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                        0.0685
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        0.0662
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                   0.0313
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                         0.0608
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.0290
## Test 12: Fail AC - Pass AC lev                                                               0.0288
## Test 12: Fail AC - Pass AC perc                                                              0.0653
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                           0.0666
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                0.0282
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         0.0639
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  0.0686
## Test 12: Age: Below median - Age: Above median lev                                           0.0286
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                 0.0618
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.0286
## Test 7: Age: Below median - Age: Above median lev                                            0.0283
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    0.0293
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                0.0291
## Test 8: Fail AC - Pass AC lev                                                                0.0294
## Test 8: Gender: Woman - Gender: Man lev                                                      0.0311
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                  0.0308
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                   0.0304
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                  0.0655
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                            0.0630
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                            0.0682
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    0.0284
## Test 12: Non-Married  - Married  lev                                                         0.0304
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         0.0296
## Test 7: Fail AC - Pass AC lev                                                                0.0285
## Test 8: Non-Married  - Married  lev                                                          0.0311
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          0.0305
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               0.0286
## Test 7: Education: More than High School - Education: High School or Less lev                0.0325
## Test 7: Non-Married  - Married  lev                                                          0.0298
## Test 8: Age: Below median - Age: Above median lev                                            0.0292
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          0.0294
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         0.0593
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                          0.1510
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                  0.0618
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         0.0634
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                0.1467
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   0.0582
## Test 12: Age: Below median - Age: Above median perc                                          0.0649
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   0.0610
## Test 7: Fail AC - Pass AC perc                                                               0.0586
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                 0.0687
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   0.0584
## Test 8: Age: Below median - Age: Above median perc                                           0.0583
## Test 8: Gender: Woman - Gender: Man perc                                                     0.0619
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                           0.1267
## Test 7: Non-Married  - Married  perc                                                         0.0619
## Test 8: Fail AC - Pass AC perc                                                               0.0585
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                           0.1387
## Test 12: Non-Married  - Married  perc                                                        0.0699
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   0.0615
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         0.0597
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                 0.1341
## Test 7: Age: Below median - Age: Above median perc                                           0.0582
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               0.0599
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                         0.0615
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                  0.0614
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               0.0594
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        0.0718
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              0.0667
## Test 7: Education: More than High School - Education: High School or Less perc               0.0658
## Test 8: Non-Married  - Married  perc                                                         0.0629
##                                                                                              CI_low
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.0305
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.0287
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.0217
## Test 12: Gender: Woman - Gender: Man perc                                                   -0.3012
## Test 12: Gender: Woman - Gender: Man lev                                                    -0.1279
## Test 7: Gender: Woman - Gender: Man perc                                                    -0.2463
## Test 12: Education: More than High School - Education: High School or Less lev              -0.0076
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev        -0.0071
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                        -0.0072
## Test 8: Education: More than High School - Education: High School or Less perc              -0.2410
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                 -0.0197
## Test 12: Education: More than High School - Education: High School or Less perc             -0.0251
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                  -0.0117
## Test 7: Gender: Woman - Gender: Man lev                                                     -0.1037
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev  -0.0982
## Test 8: Education: More than High School - Education: High School or Less lev               -0.1148
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                -0.0542
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc -0.2263
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                   -0.0156
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                       -0.0355
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc       -0.0352
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                  -0.0199
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                        -0.0375
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                         -0.0200
## Test 12: Fail AC - Pass AC lev                                                              -0.0225
## Test 12: Fail AC - Pass AC perc                                                             -0.0472
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                          -0.0552
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               -0.0236
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        -0.2017
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                 -0.0534
## Test 12: Age: Below median - Age: Above median lev                                          -0.0857
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                -0.0587
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev         -0.0278
## Test 7: Age: Below median - Age: Above median lev                                           -0.0810
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   -0.0314
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               -0.0328
## Test 8: Fail AC - Pass AC lev                                                               -0.0812
## Test 8: Gender: Woman - Gender: Man lev                                                     -0.0370
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                 -0.0817
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                  -0.0393
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                 -0.0901
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                           -0.0872
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                           -0.1728
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   -0.0716
## Test 12: Non-Married  - Married  lev                                                        -0.0455
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev        -0.0463
## Test 7: Fail AC - Pass AC lev                                                               -0.0456
## Test 8: Non-Married  - Married  lev                                                         -0.0702
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         -0.0679
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev              -0.0486
## Test 7: Education: More than High School - Education: High School or Less lev               -0.0569
## Test 7: Non-Married  - Married  lev                                                         -0.0535
## Test 8: Age: Below median - Age: Above median lev                                           -0.0531
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         -0.0539
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        -0.0491
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                         -0.1264
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                 -0.0546
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        -0.1871
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                               -0.1448
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  -0.1707
## Test 12: Age: Below median - Age: Above median perc                                         -0.1860
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  -0.0710
## Test 7: Fail AC - Pass AC perc                                                              -0.0708
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                -0.1849
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  -0.0721
## Test 8: Age: Below median - Age: Above median perc                                          -0.0721
## Test 8: Gender: Woman - Gender: Man perc                                                    -0.0803
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                          -0.1646
## Test 7: Non-Married  - Married  perc                                                        -0.0823
## Test 8: Fail AC - Pass AC perc                                                              -0.1514
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                          -0.3576
## Test 12: Non-Married  - Married  perc                                                       -0.0987
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  -0.1532
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        -0.1445
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                -0.2066
## Test 7: Age: Below median - Age: Above median perc                                          -0.1307
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              -0.1341
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                        -0.1376
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                 -0.1039
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              -0.1305
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc       -0.1271
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc             -0.1281
## Test 7: Education: More than High School - Education: High School or Less perc              -0.1266
## Test 8: Non-Married  - Married  perc                                                        -0.1226
##                                                                                              CI_upp
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.1415
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.1366
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.1309
## Test 12: Gender: Woman - Gender: Man perc                                                   -0.0301
## Test 12: Gender: Woman - Gender: Man lev                                                    -0.0101
## Test 7: Gender: Woman - Gender: Man perc                                                    -0.0030
## Test 12: Education: More than High School - Education: High School or Less lev               0.1192
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev         0.1032
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                         0.1055
## Test 8: Education: More than High School - Education: High School or Less perc               0.0146
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                  0.2211
## Test 12: Education: More than High School - Education: High School or Less perc              0.2563
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                   0.0975
## Test 7: Gender: Woman - Gender: Man lev                                                      0.0134
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   0.0142
## Test 8: Education: More than High School - Education: High School or Less lev                0.0170
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                 0.4524
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  0.0284
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.0951
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                        0.2332
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        0.2245
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                   0.1029
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                         0.2010
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.0937
## Test 12: Fail AC - Pass AC lev                                                               0.0903
## Test 12: Fail AC - Pass AC perc                                                              0.2088
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                           0.2059
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                0.0868
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         0.0487
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  0.2156
## Test 12: Age: Below median - Age: Above median lev                                           0.0265
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                 0.1835
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.0842
## Test 7: Age: Below median - Age: Above median lev                                            0.0301
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    0.0835
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                0.0813
## Test 8: Fail AC - Pass AC lev                                                                0.0340
## Test 8: Gender: Woman - Gender: Man lev                                                      0.0847
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                  0.0390
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                   0.0797
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                  0.1666
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                            0.1597
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                            0.0946
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    0.0397
## Test 12: Non-Married  - Married  lev                                                         0.0735
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         0.0699
## Test 7: Fail AC - Pass AC lev                                                                0.0662
## Test 8: Non-Married  - Married  lev                                                          0.0519
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          0.0516
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               0.0634
## Test 7: Education: More than High School - Education: High School or Less lev                0.0707
## Test 7: Non-Married  - Married  lev                                                          0.0632
## Test 8: Age: Below median - Age: Above median lev                                            0.0614
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          0.0612
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         0.1833
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                          0.4655
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                  0.1878
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         0.0613
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                0.4304
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   0.0575
## Test 12: Age: Below median - Age: Above median perc                                          0.0684
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   0.1680
## Test 7: Fail AC - Pass AC perc                                                               0.1588
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                 0.0845
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   0.1568
## Test 8: Age: Below median - Age: Above median perc                                           0.1564
## Test 8: Gender: Woman - Gender: Man perc                                                     0.1622
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                           0.3322
## Test 7: Non-Married  - Married  perc                                                         0.1605
## Test 8: Fail AC - Pass AC perc                                                               0.0778
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                           0.1860
## Test 12: Non-Married  - Married  perc                                                        0.1754
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   0.0880
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         0.0894
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                 0.3192
## Test 7: Age: Below median - Age: Above median perc                                           0.0973
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               0.1005
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                         0.1033
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                  0.1367
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               0.1023
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        0.1543
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              0.1335
## Test 7: Education: More than High School - Education: High School or Less perc               0.1314
## Test 8: Non-Married  - Married  perc                                                         0.1241
##                                                                                              p_val
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                         0.0024
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                   0.0027
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev         0.0062
## Test 12: Gender: Woman - Gender: Man perc                                                   0.0166
## Test 12: Gender: Woman - Gender: Man lev                                                    0.0216
## Test 7: Gender: Woman - Gender: Man perc                                                    0.0446
## Test 12: Education: More than High School - Education: High School or Less lev              0.0844
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev        0.0874
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                        0.0874
## Test 8: Education: More than High School - Education: High School or Less perc              0.0827
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                 0.1013
## Test 12: Education: More than High School - Education: High School or Less perc             0.1073
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                  0.1237
## Test 7: Gender: Woman - Gender: Man lev                                                     0.1307
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev  0.1431
## Test 8: Education: More than High School - Education: High School or Less lev               0.1457
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                0.1234
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc 0.1277
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                   0.1593
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                       0.1491
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc       0.1530
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                  0.1855
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                        0.1792
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                         0.2043
## Test 12: Fail AC - Pass AC lev                                                              0.2391
## Test 12: Fail AC - Pass AC perc                                                             0.2157
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                          0.2579
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               0.2613
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        0.2311
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                 0.2374
## Test 12: Age: Below median - Age: Above median lev                                          0.3013
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                0.3123
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev         0.3240
## Test 7: Age: Below median - Age: Above median lev                                           0.3692
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   0.3740
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev               0.4055
## Test 8: Fail AC - Pass AC lev                                                               0.4219
## Test 8: Gender: Woman - Gender: Man lev                                                     0.4421
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                 0.4888
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                  0.5063
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                 0.5592
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                           0.5647
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                           0.5663
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev   0.5747
## Test 12: Non-Married  - Married  lev                                                        0.6446
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev        0.6907
## Test 7: Fail AC - Pass AC lev                                                               0.7182
## Test 8: Non-Married  - Married  lev                                                         0.7686
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         0.7891
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev              0.7950
## Test 7: Education: More than High School - Education: High School or Less lev               0.8327
## Test 7: Non-Married  - Married  lev                                                         0.8709
## Test 8: Age: Below median - Age: Above median lev                                           0.8869
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev         0.9013
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        0.2575
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                         0.2614
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                 0.2812
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc        0.3207
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                               0.3304
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  0.3306
## Test 12: Age: Below median - Age: Above median perc                                         0.3650
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  0.4265
## Test 7: Fail AC - Pass AC perc                                                              0.4524
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                0.4649
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc  0.4682
## Test 8: Age: Below median - Age: Above median perc                                          0.4699
## Test 8: Gender: Woman - Gender: Man perc                                                    0.5077
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                          0.5086
## Test 7: Non-Married  - Married  perc                                                        0.5277
## Test 8: Fail AC - Pass AC perc                                                              0.5287
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                          0.5361
## Test 12: Non-Married  - Married  perc                                                       0.5835
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                  0.5961
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc        0.6441
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                0.6748
## Test 7: Age: Below median - Age: Above median perc                                          0.7744
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              0.7793
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                        0.7803
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                 0.7892
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc              0.8129
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc       0.8500
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc             0.9676
## Test 7: Education: More than High School - Education: High School or Less perc              0.9708
## Test 8: Non-Married  - Married  perc                                                        0.9903
##                                                                                             p_val_holm
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                             0.0998
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                       0.1104
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev             0.2471
## Test 12: Gender: Woman - Gender: Man perc                                                       0.6989
## Test 12: Gender: Woman - Gender: Man lev                                                        0.8425
## Test 7: Gender: Woman - Gender: Man perc                                                        1.0000
## Test 12: Education: More than High School - Education: High School or Less lev                  1.0000
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev            1.0000
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                            1.0000
## Test 8: Education: More than High School - Education: High School or Less perc                  1.0000
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                     1.0000
## Test 12: Education: More than High School - Education: High School or Less perc                 1.0000
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                      1.0000
## Test 7: Gender: Woman - Gender: Man lev                                                         1.0000
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev      1.0000
## Test 8: Education: More than High School - Education: High School or Less lev                   1.0000
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                    1.0000
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc     1.0000
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                       1.0000
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                           1.0000
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc           1.0000
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                      1.0000
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                            1.0000
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                             1.0000
## Test 12: Fail AC - Pass AC lev                                                                  1.0000
## Test 12: Fail AC - Pass AC perc                                                                 1.0000
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                              1.0000
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                   1.0000
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc            1.0000
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                     1.0000
## Test 12: Age: Below median - Age: Above median lev                                              1.0000
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                    1.0000
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev             1.0000
## Test 7: Age: Below median - Age: Above median lev                                               1.0000
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev       1.0000
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                   1.0000
## Test 8: Fail AC - Pass AC lev                                                                   1.0000
## Test 8: Gender: Woman - Gender: Man lev                                                         1.0000
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                     1.0000
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                      1.0000
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                     1.0000
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                               1.0000
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                               1.0000
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev       1.0000
## Test 12: Non-Married  - Married  lev                                                            1.0000
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev            1.0000
## Test 7: Fail AC - Pass AC lev                                                                   1.0000
## Test 8: Non-Married  - Married  lev                                                             1.0000
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev             1.0000
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                  1.0000
## Test 7: Education: More than High School - Education: High School or Less lev                   1.0000
## Test 7: Non-Married  - Married  lev                                                             1.0000
## Test 8: Age: Below median - Age: Above median lev                                               1.0000
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev             1.0000
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc            1.0000
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                             1.0000
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                     1.0000
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc            1.0000
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                   1.0000
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc      1.0000
## Test 12: Age: Below median - Age: Above median perc                                             1.0000
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                      1.0000
## Test 7: Fail AC - Pass AC perc                                                                  1.0000
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                    1.0000
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc      1.0000
## Test 8: Age: Below median - Age: Above median perc                                              1.0000
## Test 8: Gender: Woman - Gender: Man perc                                                        1.0000
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                              1.0000
## Test 7: Non-Married  - Married  perc                                                            1.0000
## Test 8: Fail AC - Pass AC perc                                                                  1.0000
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                              1.0000
## Test 12: Non-Married  - Married  perc                                                           1.0000
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                      1.0000
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc            1.0000
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                    1.0000
## Test 7: Age: Below median - Age: Above median perc                                              1.0000
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                  1.0000
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                            1.0000
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                     1.0000
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                  1.0000
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc           1.0000
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                 1.0000
## Test 7: Education: More than High School - Education: High School or Less perc                  1.0000
## Test 8: Non-Married  - Married  perc                                                            1.0000
##                                                                                             p_val_RW
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median lev                           0.1049
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                     0.1119
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev           0.2058
## Test 12: Gender: Woman - Gender: Man perc                                                     0.4995
## Test 12: Gender: Woman - Gender: Man lev                                                      0.5245
## Test 7: Gender: Woman - Gender: Man perc                                                      0.8122
## Test 12: Education: More than High School - Education: High School or Less lev                0.9321
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev          0.9401
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median lev                          0.9401
## Test 8: Education: More than High School - Education: High School or Less perc                0.9491
## Test 7: Religion: Non-Christian  - Religion: Christian  lev                                   0.9620
## Test 12: Education: More than High School - Education: High School or Less perc               0.9700
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                    0.9780
## Test 7: Gender: Woman - Gender: Man lev                                                       0.9790
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev    0.9830
## Test 8: Education: More than High School - Education: High School or Less lev                 0.9830
## Test 7: Religion: Non-Christian  - Religion: Christian  perc                                  0.9850
## Test 12: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc   0.9850
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median lev                     0.9860
## Test 12: Base Rate Pre Below median - Base Rate Pre Above median perc                         0.9930
## Test 12: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc         0.9930
## Test 8: Location: Non Rural  - Location: Mostly Rural  lev                                    0.9960
## Test 7: Base Rate Pre Below median - Base Rate Pre Above median perc                          0.9970
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median lev                           0.9980
## Test 12: Fail AC - Pass AC lev                                                                0.9980
## Test 12: Fail AC - Pass AC perc                                                               0.9980
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  lev                            0.9990
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                 0.9990
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc          0.9990
## Test 12: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                   0.9990
## Test 12: Age: Below median - Age: Above median lev                                            1.0000
## Test 12: Religion: Non-Christian  - Religion: Christian  lev                                  1.0000
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median lev           1.0000
## Test 7: Age: Below median - Age: Above median lev                                             1.0000
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev     1.0000
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                 1.0000
## Test 8: Fail AC - Pass AC lev                                                                 1.0000
## Test 8: Gender: Woman - Gender: Man lev                                                       1.0000
## Test 12: Location: Non Rural  - Location: Mostly Rural  lev                                   1.0000
## Test 7: Location: Non Rural  - Location: Mostly Rural  lev                                    1.0000
## Test 8: Religion: Non-Christian  - Religion: Christian  lev                                   1.0000
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  lev                             1.0000
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  lev                             1.0000
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median lev     1.0000
## Test 12: Non-Married  - Married  lev                                                          1.0000
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev          1.0000
## Test 7: Fail AC - Pass AC lev                                                                 1.0000
## Test 8: Non-Married  - Married  lev                                                           1.0000
## Test 8: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev           1.0000
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median lev                1.0000
## Test 7: Education: More than High School - Education: High School or Less lev                 1.0000
## Test 7: Non-Married  - Married  lev                                                           1.0000
## Test 8: Age: Below median - Age: Above median lev                                             1.0000
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  lev           1.0000
## Test 7: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc          1.0000
## Test 12: Religiosity: Does not attend  - Religiosity: Attends  perc                           1.0000
## Test 8: Location: Non Rural  - Location: Mostly Rural  perc                                   1.0000
## Test 7: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc          1.0000
## Test 12: Religion: Non-Christian  - Religion: Christian  perc                                 1.0000
## Test 7: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc    1.0000
## Test 12: Age: Below median - Age: Above median perc                                           1.0000
## Test 7: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                    1.0000
## Test 7: Fail AC - Pass AC perc                                                                1.0000
## Test 12: Location: Non Rural  - Location: Mostly Rural  perc                                  1.0000
## Test 8: Hrs/day on social media: Below median - Hrs/day on social media: Above median perc    1.0000
## Test 8: Age: Below median - Age: Above median perc                                            1.0000
## Test 8: Gender: Woman - Gender: Man perc                                                      1.0000
## Test 7: Religiosity: Does not attend  - Religiosity: Attends  perc                            1.0000
## Test 7: Non-Married  - Married  perc                                                          1.0000
## Test 8: Fail AC - Pass AC perc                                                                1.0000
## Test 8: Religiosity: Does not attend  - Religiosity: Attends  perc                            1.0000
## Test 12: Non-Married  - Married  perc                                                         1.0000
## Test 8: Misinfo Rate Pre Below median - Misinfo Rate Pre Above median perc                    1.0000
## Test 8: Misinfo Acc Score Pre Below median - Misinfo Acc Score Pre Above median perc          1.0000
## Test 8: Religion: Non-Christian  - Religion: Christian  perc                                  1.0000
## Test 7: Age: Below median - Age: Above median perc                                            1.0000
## Test 8: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                1.0000
## Test 8: Base Rate Pre Below median - Base Rate Pre Above median perc                          1.0000
## Test 7: Location: Non Rural  - Location: Mostly Rural  perc                                   1.0000
## Test 7: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc                1.0000
## Test 12: Prop. of content shared below 40%  - Prop. of content shared above 40%  perc         1.0000
## Test 12: Base Acc Score Pre Below median - Base Acc Score Pre Above median perc               1.0000
## Test 7: Education: More than High School - Education: High School or Less perc                1.0000
## Test 8: Non-Married  - Married  perc                                                          1.0000
final_subgroup_results[grepl("Gender",rownames(final_subgroup_results)),]
##                                            obs  baseline     estimate
## Test 12: Gender: Woman - Gender: Man lev    NA        NA -0.069034547
## Test 7: Gender: Woman - Gender: Man lev     NA        NA -0.045161714
## Test 8: Gender: Woman - Gender: Man lev     NA        NA  0.023872833
## Test 12: Gender: Woman - Gender: Man perc   NA        NA -0.165650180
## Test 7: Gender: Woman - Gender: Man perc    NA        NA -0.124667767
## Test 8: Gender: Woman - Gender: Man perc    NA        NA  0.040982413
## Test 7: Gender: Woman                     3005 0.5449541 -0.161822292
## Test 7: Gender: Man                       5679 0.5729868 -0.116660578
## Test 8: Gender: Man                       5679 0.5729868 -0.117694276
## Test 8: Gender: Woman                     3005 0.5449541 -0.093821442
## Test 12: Gender: Woman                    3005 0.4511327 -0.068000850
## Test 12: Gender: Man                      5679 0.4552926  0.001033698
##                                              std.err      CI_low       CI_upp
## Test 12: Gender: Woman - Gender: Man lev  0.03005077 -0.12793406 -0.010135030
## Test 7: Gender: Woman - Gender: Man lev   0.02988075 -0.10372798  0.013404550
## Test 8: Gender: Woman - Gender: Man lev   0.03105517 -0.03699529  0.084740959
## Test 12: Gender: Woman - Gender: Man perc 0.06917791 -0.30123888 -0.030061482
## Test 7: Gender: Woman - Gender: Man perc  0.06206287 -0.24631099 -0.003024538
## Test 8: Gender: Woman - Gender: Man perc  0.06186988 -0.08028255  0.162247381
## Test 7: Gender: Woman                     0.02420438        -Inf -0.122127111
## Test 7: Gender: Man                       0.01752162        -Inf -0.087925125
## Test 8: Gender: Man                       0.01798437        -Inf -0.088199904
## Test 8: Gender: Woman                     0.02531769        -Inf -0.052300424
## Test 12: Gender: Woman                    0.02423285 -0.11549723 -0.028258978
## Test 12: Gender: Man                      0.01777127 -0.03379799  0.030178582
##                                                         p_val        p_val_holm
## Test 12: Gender: Woman - Gender: Man lev  0.02160374086311756 0.842545893661585
## Test 7: Gender: Woman - Gender: Man lev   0.13068696739461672 1.000000000000000
## Test 8: Gender: Woman - Gender: Man lev   0.44205751996216436 1.000000000000000
## Test 12: Gender: Woman - Gender: Man perc 0.01664062828075541 0.698906387791727
## Test 7: Gender: Woman - Gender: Man perc  0.04456540843966028 1.000000000000000
## Test 8: Gender: Woman - Gender: Man perc  0.50771693742201762 1.000000000000000
## Test 7: Gender: Woman                     0.00000000002702211 0.000000001783459
## Test 7: Gender: Man                       0.00000000003252359 0.000000002114034
## Test 8: Gender: Man                       0.00000000006967370 0.000000004319770
## Test 8: Gender: Woman                     0.00021442523296349 0.007290457920759
## Test 12: Gender: Woman                    0.00504471461174952 0.166475582187734
## Test 12: Gender: Man                      0.95361947256752544 1.000000000000000
##                                              p_val_RW
## Test 12: Gender: Woman - Gender: Man lev  0.524475524
## Test 7: Gender: Woman - Gender: Man lev   0.979020979
## Test 8: Gender: Woman - Gender: Man lev   1.000000000
## Test 12: Gender: Woman - Gender: Man perc 0.499500500
## Test 7: Gender: Woman - Gender: Man perc  0.812187812
## Test 8: Gender: Woman - Gender: Man perc  1.000000000
## Test 7: Gender: Woman                     0.000999001
## Test 7: Gender: Man                       0.000999001
## Test 8: Gender: Man                       0.000999001
## Test 8: Gender: Woman                     0.005994006
## Test 12: Gender: Woman                    0.092907093
## Test 12: Gender: Man                      1.000000000