|
|
|
|
|
title: "Replication Code for Lucid Survey Data Analysis" |
|
|
author: "Brian Guay & Christopher Johnston" |
|
|
date: "6/18/2020" |
|
|
output: |
|
|
html_document: |
|
|
number_sections: yes |
|
|
toc: yes |
|
|
pdf_document: |
|
|
toc: yes |
|
|
subtitle: Ideological Asymmetries and the Determinants of Politically-Motivated Reasoning |
|
|
(American Journal of Political Science, 2020) |
|
|
|
|
|
|
|
|
```{r knitr setup, include=FALSE} |
|
|
knitr::opts_chunk$set(echo = TRUE) |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
This markdown file contains the code necessary to run the analysis using data collected from the 2018 Lucid survey (Studies 1 and 2). |
|
|
|
|
|
When compiling in markdown, verify that this markdown file is saved in the same folder as the other replication. R Markdown will set the working directory to this folder by default. When running the code line-by-line, set the working directory to the same location as these materials are located. |
|
|
|
|
|
|
|
|
|
|
|
```{r setup, warning = F, echo = T, message = F, include = T} |
|
|
|
|
|
|
|
|
rm(list = ls()) |
|
|
|
|
|
|
|
|
sink(file = "lucid_code_log.txt") |
|
|
|
|
|
|
|
|
dir.create("lucid_figures") |
|
|
|
|
|
|
|
|
install.packages(c("grDevices", "ggplot2", "dplyr", "estimatr", "psych", "knitr")) |
|
|
|
|
|
|
|
|
library(grDevices) |
|
|
library(ggplot2) |
|
|
library(dplyr) |
|
|
library(estimatr) |
|
|
library(psych) |
|
|
library(knitr) |
|
|
|
|
|
|
|
|
source("post.R") |
|
|
source("postSim.R") |
|
|
|
|
|
|
|
|
quick_lm <- function(outcome = my_outcome, keepers = my_keepers, |
|
|
new = NULL, data = my_data){ |
|
|
keepers <- paste(keepers, collapse = " + ") |
|
|
new <- paste(new, collapse = " + ") |
|
|
rhs <- paste(keepers, new, sep = " + ") |
|
|
model <- paste0(outcome, " ~ ", rhs) |
|
|
fit <- lm(as.formula(model), data = data) |
|
|
} |
|
|
|
|
|
|
|
|
quick_glm <- function(outcome = my_outcome, keepers = my_keepers, |
|
|
new = NULL, data = my_data){ |
|
|
keepers <- paste(keepers, collapse = " + ") |
|
|
new <- paste(new, collapse = " + ") |
|
|
rhs <- paste(keepers, new, sep = " + ") |
|
|
model <- paste0(outcome, " ~ ", rhs) |
|
|
fit <- glm(as.formula(model), data = data, family = binomial(link = "logit")) |
|
|
} |
|
|
|
|
|
|
|
|
makeTransparent<-function(someColor, alpha=100) |
|
|
{ |
|
|
newColor<-col2rgb(someColor) |
|
|
apply(newColor, 2, function(curcoldata){rgb(red=curcoldata[1], green=curcoldata[2], |
|
|
blue=curcoldata[3],alpha=alpha, |
|
|
maxColorValue=255)}) |
|
|
} |
|
|
|
|
|
|
|
|
std_error <- function(var){ |
|
|
sd(var, na.rm = T) / sqrt(length(var[!is.na(var)])) |
|
|
} |
|
|
|
|
|
|
|
|
rescale_01 <- function(x, max){ |
|
|
(x-1)/(max-1) |
|
|
} |
|
|
|
|
|
|
|
|
set.seed(4453) |
|
|
|
|
|
|
|
|
nsims <- 10000 |
|
|
|
|
|
|
|
|
data_original <- read.csv("lucid_data.csv", na.strings=c("","NA")) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As discussed in the manuscript, respondents who failed at least one of the two attention checks were prevented from completing the remainder of the survey. Additionally, respondents who proceeded to use a mobile device for the survey (despite being instructed that they would be unable to complete the survey) were prevented from completing the survey. 1.4% of respondents were removed for using a mobile device, 5.9\% were removed for failing the Trump attention check (correctly identifying Trump as the president of the United States), and 6.9\% were removed for failing the numeracy attention check (correctly adding 2 + 2). |
|
|
|
|
|
```{r, warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
table(data_original$kickoff) |
|
|
prop.table(table(data_original$kickoff, useNA = "always"))*100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data <- data_original[is.na(data_original$kickoff),] |
|
|
|
|
|
nrow(data) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
data$pid7 <- ifelse(data$pid_gen == 1, data$demstr, |
|
|
ifelse(data$pid_gen == 2, data$repstr, |
|
|
ifelse(data$pid_gen > 2, data$pidlean, NA))) |
|
|
|
|
|
|
|
|
|
|
|
data$rep_dem <- ifelse(data$pid7 < 4, 0, |
|
|
ifelse(data$pid7 > 4, 1, NA)) |
|
|
|
|
|
table(data$pid7, data$rep_dem, useNA = "always") |
|
|
|
|
|
|
|
|
data$ideo7 <- data$ideo |
|
|
|
|
|
data$ideo7[data$ideo7 == -99] <- NA |
|
|
|
|
|
table(data$ideo, data$ideo7, useNA = "always") |
|
|
|
|
|
|
|
|
data$con_lib <- ifelse(data$ideo7 < 4, 0, |
|
|
ifelse(data$ideo7 > 4, 1, NA)) |
|
|
|
|
|
table(data$ideo7, data$con_lib, useNA = "always") |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Respondents were randomly assigned to received evidence about one of five salient political issues (\textit{issue}: a concealed handgun ban, a minimum wage increase, affirmative action, sanctuary cities, or abortion. Respondents were also randomized to receive evidence that supported the liberal or conservative position on the assigned issue, which was achieved by changing the words “increase” and “decrease” in the column names in the evidence table (\textit{evidence direction}, see Appendix for full question wording). |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
data$exp1_condition <- |
|
|
ifelse(data$DO.BR.FL_133 == "Direction Experiments--Condition A", "A", |
|
|
ifelse(data$DO.BR.FL_133 == "Direction Experiments-- Condition B", "B", "foo")) |
|
|
|
|
|
table(data$exp1_condition, data$DO.BR.FL_133, useNA = "always") |
|
|
|
|
|
|
|
|
table(data$pol_issue, useNA = "always") |
|
|
|
|
|
|
|
|
data$pol_issue.ch <- as.character(data$pol_issue) |
|
|
|
|
|
table(data$pol_issue, data$pol_issue.ch, useNA = "always") |
|
|
|
|
|
|
|
|
data <- select(data, -c(pol_issue)) |
|
|
|
|
|
|
|
|
data$exp1_issue <- |
|
|
ifelse(data$pol_issue.ch == "abortion", "abort", |
|
|
ifelse(data$pol_issue.ch == "affirmative action", "aa", |
|
|
ifelse(data$pol_issue.ch == "sanctuary cities", "imm", |
|
|
ifelse(data$pol_issue.ch == "raising the minimum wage", "wage", |
|
|
ifelse(data$pol_issue.ch == "carrying concealed handguns", "gun", |
|
|
"foo"))))) |
|
|
|
|
|
table(data$exp1_issue, data$pol_issue.ch, useNA = "always") |
|
|
|
|
|
|
|
|
data <- select(data,-c(pol_issue.ch)) |
|
|
|
|
|
|
|
|
data$exp1_liberal_evidence <- |
|
|
ifelse(data$exp1_condition == "A" & data$exp1_issue %in% c("gun", "wage", "imm"), 1, |
|
|
ifelse(data$exp1_condition == "B" & data$exp1_issue %in% c("aa", "abort"), 1, 0)) |
|
|
|
|
|
table(data$exp1_liberal_evidence, data$exp1_condition, data$exp1_issue) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Which survey questions respondents answer is dependent on the experimental condition each is assigned to. For instance, a respondent assigned to the gun control condition received questions about gun control and not, for instance, immigration. Therefore, responses to experimental outcomes are recorded in different columns in the data set. To combine to different outcome measures responses into a single column, we sum across all outcome measures (regardless of whether the respondent was assigned to answer each measure). Because the rowSums() function ignores missing values (i.e., NAs), and outcome measures which respondents were not assigned to answer contain NAs, the column containing the sum contains the appropriate outcome response for each respondent. |
|
|
|
|
|
There are 10 columns in which the experimental outcome can be recorded, as there are 10 experimental conditions: 5 (issue condition = abortion, affirmative action, gun control, minimum wage, or immigration) X 2 (evidence direction condition = A or B). In the code below we use the following shorthand to refer to each issue: abort = abortion, aa = affirmative action, gun = gun control, wage = minimum wage, imm = immigration. |
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exp1_A <- c("exp1_abort_A", "exp1_aa_A", "exp1_gun_A", "exp1_wage_A", "exp1_imm_A") |
|
|
exp1_B <- c("exp1_abort_B", "exp1_aa_B", "exp1_gun_B", "exp1_wage_B", "exp1_imm_B") |
|
|
|
|
|
|
|
|
apply(data[,c(exp1_A, exp1_B)], 2, class) |
|
|
|
|
|
|
|
|
apply(data[,c(exp1_A, exp1_B)], 2, unique) |
|
|
|
|
|
|
|
|
data$response_1A <- rowSums(data[,exp1_A], na.rm=T) |
|
|
data$response_1A[data$response_1A == -99] <- NA |
|
|
data$response_1A[data$response_1A == 0] <- NA |
|
|
head(data[1:200,c(exp1_A, "response_1A")]) |
|
|
|
|
|
|
|
|
data$response_1B <- rowSums(data[,exp1_B], na.rm=T) |
|
|
data$response_1B[data$response_1B == -99] <- NA |
|
|
data$response_1B[data$response_1B == 0] <- NA |
|
|
head(data[1:200,c(exp1_B, "response_1B")]) |
|
|
|
|
|
|
|
|
data$exp1_response <- |
|
|
ifelse(data$exp1_condition == "A", data$response_1A, |
|
|
ifelse(data$exp1_condition == "B", data$response_1B, 9999)) |
|
|
|
|
|
|
|
|
table(data$exp1_response, data$response_1A, useNA = "always") |
|
|
table(data$exp1_response, data$response_1B, useNA = "always") |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
1 indicates correct interpretation of the evidence and 0 indicates incorrect interpretation. In direction condition A, the 2nd response option is correct. In direction condition B, the 1st response option is correct. |
|
|
|
|
|
```{r} |
|
|
|
|
|
data$exp1_correct <- |
|
|
ifelse(data$exp1_condition == "A" & data$exp1_response == 2, 1, |
|
|
ifelse(data$exp1_condition == "A" & data$exp1_response == 1, 0, |
|
|
ifelse(data$exp1_condition == "B" & data$exp1_response == 2, 0, |
|
|
ifelse(data$exp1_condition == "B" & data$exp1_response == 1, 1, |
|
|
9999)))) |
|
|
table(data$exp1_correct, useNA = "always") |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
For Experiment 2, respondents were randomly assigned to receive evidence about one of the four remaining issues that they were not assigned to in the Experiment 1 (i.e., if a respondent in Experiment 1 received information about gun control, they were randomly assigned to receive information about either a minimum wage increase, affirmative action, sanctuary cities, or abortion in Experiment 2). Respondents were again randomized to receive evidence that supported either the liberal or conservative position on the assigned issue. Below we follow the same approach as followed in Experiment 1, above. |
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
data$exp2_condition <- |
|
|
ifelse(data$DO.BR.FL_137 == "Quality Experiments-- Condition A", "A", |
|
|
ifelse(data$DO.BR.FL_137 == "Quality Experiments-- Condition B", "B", NA)) |
|
|
|
|
|
table(data$DO.BR.FL_137, data$exp2_condition) |
|
|
|
|
|
|
|
|
data$pol_issue_2.ch <- as.character(data$pol_issue_2) |
|
|
|
|
|
table(data$pol_issue_2, data$pol_issue_2.ch) |
|
|
|
|
|
|
|
|
data <- select(data, -c(pol_issue_2)) |
|
|
|
|
|
data$exp2_issue <- |
|
|
ifelse(data$pol_issue_2.ch == "abortion", "abort", |
|
|
ifelse(data$pol_issue_2.ch == "affirmative action", "aa", |
|
|
ifelse(data$pol_issue_2.ch == "sanctuary cities", "imm", |
|
|
ifelse(data$pol_issue_2.ch == "raising the minimum wage", "wage", |
|
|
ifelse(data$pol_issue_2.ch == "carrying concealed handguns", |
|
|
"gun", NA))))) |
|
|
|
|
|
table(data$pol_issue_2.ch, data$exp2_issue) |
|
|
|
|
|
|
|
|
data <- select(data, -c(pol_issue_2.ch)) |
|
|
|
|
|
|
|
|
data$exp2_liberal_evidence <- ifelse(data$exp2_condition == "A" & |
|
|
data$exp2_issue %in% c("aa", "abort"), 1, |
|
|
ifelse(data$exp2_condition == "B" & |
|
|
data$exp2_issue %in% c("gun", "wage", "imm"), 1, 0)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Following the same procedure used in Experiment 1, we create a common response variable for Experiment 2 below. Because there are two outcomes in Experiment 2, the 'sample size' and 'causal claim' outcomes, we create two common response variables. |
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
exp2_A_sample <- c("exp2_abort_A_1", "exp2_aa_A_1", "exp2_gun_A_1", |
|
|
"exp2_wage_A_1", "exp2_imm_A_1") |
|
|
|
|
|
|
|
|
exp2_B_sample <- c("exp2_abort_B_1", "exp2_aa_B_1", "exp2_gun_B_1", |
|
|
"exp2_wage_B_1", "exp2_imm_B_1") |
|
|
|
|
|
|
|
|
exp2_A_causal <- c("exp2_abort_A_2", "exp2_aa_A_2", "exp2_gun_A_2", |
|
|
"exp2_wage_A_2", "exp2_imm_A_2") |
|
|
|
|
|
|
|
|
exp2_B_causal <- c("exp2_abort_B_2", "exp2_aa_B_2", "exp2_gun_B_2", |
|
|
"exp2_wage_B_2", "exp2_imm_B_2") |
|
|
|
|
|
|
|
|
data$exp2_sample <- rowSums(data[,c(exp2_A_sample, exp2_B_sample)], na.rm=T) |
|
|
data$exp2_sample[data$exp2_sample == 0] <- NA |
|
|
data$exp2_sample[data$exp2_sample == -99] <- NA |
|
|
|
|
|
head(data[1:200,c(exp2_A_sample, exp2_B_sample, "exp2_sample")]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
table(data$exp2_sample) |
|
|
data$exp2_goodSample <- 8 - data$exp2_sample |
|
|
table(data$exp2_sample, data$exp2_goodSample) |
|
|
|
|
|
|
|
|
data$exp2_goodCausal <- rowSums(data[,c(exp2_A_causal, exp2_B_causal)], na.rm=T) |
|
|
data$exp2_goodCausal[data$exp2_goodCausal == 0] <- NA |
|
|
data$exp2_goodCausal[data$exp2_goodCausal == -99] <- NA |
|
|
|
|
|
head(data[1:200,c(exp2_A_causal, exp2_B_causal, "exp2_goodCausal")]) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Now that we have collapsed outcome variables into a single outcome variable for Experiment 1 and two outcome variables for Experiment 2 (sample size and causal claim outcomes), we next determine whether each respondent received congenial or uncongenial information, based upon both the direction of the information they were randomly assigned to receive and their prior beliefs. As explained in the manuscript and appendix, we operationalize prior beliefs separately in three ways: the respondent's party identification, self-reported ideology, and position on the issue they received information about. For each operationalization, we create two congeniality variables: a continuous version (e.g., 1 = very uncongenial, 7 = very congenial) and a binary version (e.g., 0 = uncongenial, 1 = congenial). For the binary measure, moderates and non-leaning Independents (for the party ID and ideology operationalizations of congeniality, respectively), are coded as NA. For the continuous measures, they are coded as 4, at the center of the continuous measures, which range from 1-7. Issue positions are measured on a 6-point scale, so the issue position operationalization of congeniality does not face a similar issue. |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp1_congenial_pid_binary <- |
|
|
ifelse(data$pid7 < 4 & data$exp1_liberal_evidence == 1, 1, |
|
|
ifelse(data$pid7 > 4 & data$exp1_liberal_evidence == 0, 1, |
|
|
ifelse(data$pid7 == 4, NA, 0))) |
|
|
head(data[,c("exp1_congenial_pid_binary", "exp1_liberal_evidence", "pid7")]) |
|
|
|
|
|
|
|
|
data$exp1_congenial_pid_cont <- |
|
|
ifelse(data$exp1_liberal_evidence == 1, 8 - data$pid7, |
|
|
ifelse(data$exp1_liberal_evidence == 0, data$pid7, NA)) |
|
|
|
|
|
data$exp1_congenial_pid_cont.s <- as.numeric(scale(data$exp1_congenial_pid_cont)) |
|
|
|
|
|
head(data[,c("exp1_congenial_pid_cont", "exp1_liberal_evidence", "pid7")]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp1_congenial_ideo_binary <- |
|
|
ifelse(data$ideo7 < 4 & data$exp1_liberal_evidence == 1, 1, |
|
|
ifelse(data$ideo7 > 4 & data$exp1_liberal_evidence == 0, 1, |
|
|
ifelse(data$ideo7 == 4, NA, 0))) |
|
|
data[1:10,c("exp1_congenial_ideo_binary", "exp1_liberal_evidence", "ideo7")] |
|
|
|
|
|
|
|
|
data$exp1_congenial_ideo_cont <- |
|
|
ifelse(data$exp1_liberal_evidence == 1, 8 - data$ideo7, |
|
|
ifelse(data$exp1_liberal_evidence == 0, data$ideo7, NA)) |
|
|
|
|
|
data$exp1_congenial_ideo_cont.s <- as.numeric(scale(data$exp1_congenial_ideo_cont)) |
|
|
|
|
|
data[1:10,c("exp1_congenial_ideo_cont", "exp1_liberal_evidence", "ideo7")] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apply(data[,c("issue_gun", "issue_aa", "issue_abort", "issue_imm", "issue_wage")], |
|
|
2, function(x) table(x, useNA = "always")) |
|
|
|
|
|
|
|
|
data$issue_gun[data$issue_gun == -99] <- NA |
|
|
data$issue_aa[data$issue_aa == -99] <- NA |
|
|
data$issue_abort[data$issue_abort == -99] <- NA |
|
|
data$issue_imm[data$issue_imm == -99] <- NA |
|
|
data$issue_wage[data$issue_wage == -99] <- NA |
|
|
|
|
|
|
|
|
apply(data[,c("issue_gun", "issue_aa", "issue_abort", "issue_imm", "issue_wage")], |
|
|
2, function(x) table(x, useNA = "always")) |
|
|
|
|
|
|
|
|
data$gun_lib <- 7 -data$issue_gun |
|
|
data$wage_lib <- data$issue_wage |
|
|
data$aa_lib <- data$issue_aa |
|
|
data$imm_lib <- 7 - data$issue_imm |
|
|
data$abort_lib <- 7 - data$issue_abort |
|
|
|
|
|
issue_vars <- c("gun_lib", "wage_lib", "aa_lib", "imm_lib", "wage_lib") |
|
|
|
|
|
psych::alpha(data[,issue_vars]) |
|
|
|
|
|
|
|
|
data$exp1_congenial_issue_cont <- NA |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp1_congenial_issue_cont <- |
|
|
ifelse(data$exp1_issue == "gun" & data$exp1_liberal_evidence == 1, data$gun_lib, |
|
|
ifelse(data$exp1_issue == "gun" & data$exp1_liberal_evidence == 0, 7 - data$gun_lib, |
|
|
|
|
|
ifelse(data$exp1_issue == "wage" & data$exp1_liberal_evidence == 1, data$wage_lib, |
|
|
ifelse(data$exp1_issue == "wage" & data$exp1_liberal_evidence == 0, 7 - data$wage_lib, |
|
|
|
|
|
ifelse(data$exp1_issue == "aa" & data$exp1_liberal_evidence == 1, data$aa_lib, |
|
|
ifelse(data$exp1_issue == "aa" & data$exp1_liberal_evidence == 0, 7 - data$aa_lib, |
|
|
|
|
|
ifelse(data$exp1_issue == "imm" & data$exp1_liberal_evidence == 1, data$imm_lib, |
|
|
ifelse(data$exp1_issue == "imm" & data$exp1_liberal_evidence == 0, 7 - data$imm_lib, |
|
|
|
|
|
ifelse(data$exp1_issue == "abort" & data$exp1_liberal_evidence == 1, data$abort_lib, |
|
|
ifelse(data$exp1_issue == "abort" & data$exp1_liberal_evidence == 0, 7 - data$abort_lib, |
|
|
NA)))))))))) |
|
|
|
|
|
data$exp1_congenial_issue_cont.s <- as.numeric(scale(data$exp1_congenial_issue_cont)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp1_congenial_issue_binary <- ifelse(data$exp1_congenial_issue_cont >= 4, 1, |
|
|
ifelse(data$exp1_congenial_issue_cont < 4, 0, NA)) |
|
|
|
|
|
table(data$exp1_congenial_issue_binary, data$exp1_congenial_issue_cont) |
|
|
|
|
|
|
|
|
|
|
|
cor(data$exp1_congenial_pid_cont.s, |
|
|
data$exp1_congenial_ideo_cont.s, |
|
|
use = "complete.obs") |
|
|
|
|
|
cor(data$exp1_congenial_pid_cont.s, |
|
|
data$exp1_congenial_issue_cont.s, |
|
|
use = "complete.obs") |
|
|
|
|
|
cor(data$exp1_congenial_ideo_cont.s, |
|
|
data$exp1_congenial_issue_cont.s, |
|
|
use = "complete.obs") |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp2_congenial_pid_binary <- |
|
|
ifelse(data$pid7 < 4 & data$exp2_liberal_evidence == 1, 1, |
|
|
ifelse(data$pid7 > 4 & data$exp2_liberal_evidence == 0, 1, |
|
|
ifelse(data$pid7 == 4, NA, 0))) |
|
|
|
|
|
|
|
|
|
|
|
data$exp2_congenial_pid_cont <- |
|
|
ifelse(data$exp2_liberal_evidence == 1, 8 - data$pid7, |
|
|
ifelse(data$exp2_liberal_evidence == 0, data$pid7, NA)) |
|
|
|
|
|
data$exp2_congenial_pid_cont.s <- as.numeric(scale(data$exp2_congenial_pid_cont)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp2_congenial_ideo_binary <- |
|
|
ifelse(data$ideo7 < 4 & data$exp2_liberal_evidence == 1, 1, |
|
|
ifelse(data$ideo7 > 4 & data$exp2_liberal_evidence == 0, 1, |
|
|
ifelse(data$ideo7 == 4, NA, 0))) |
|
|
|
|
|
|
|
|
|
|
|
data$exp2_congenial_ideo_cont <- |
|
|
ifelse(data$exp2_liberal_evidence == 1, 8 - data$ideo7, |
|
|
ifelse(data$exp2_liberal_evidence == 0, data$ideo7, NA)) |
|
|
|
|
|
data$exp2_congenial_ideo_cont.s <- as.numeric(scale(data$exp2_congenial_ideo_cont)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp2_congenial_issue_cont <- NA |
|
|
|
|
|
data$exp2_congenial_issue_cont <- |
|
|
ifelse(data$exp2_issue == "gun" & data$exp2_liberal_evidence == 1, data$gun_lib, |
|
|
ifelse(data$exp2_issue == "gun" & data$exp2_liberal_evidence == 0, 7 - data$gun_lib, |
|
|
|
|
|
ifelse(data$exp2_issue == "wage" & data$exp2_liberal_evidence == 1, data$wage_lib, |
|
|
ifelse(data$exp2_issue == "wage" & data$exp2_liberal_evidence == 0, 7 - data$wage_lib, |
|
|
|
|
|
ifelse(data$exp2_issue == "aa" & data$exp2_liberal_evidence == 1, data$aa_lib, |
|
|
ifelse(data$exp2_issue == "aa" & data$exp2_liberal_evidence == 0, 7 - data$aa_lib, |
|
|
|
|
|
ifelse(data$exp2_issue == "imm" & data$exp2_liberal_evidence == 1, data$imm_lib, |
|
|
ifelse(data$exp2_issue == "imm" & data$exp2_liberal_evidence == 0, 7 - data$imm_lib, |
|
|
|
|
|
ifelse(data$exp2_issue == "abort" & data$exp2_liberal_evidence == 1, data$abort_lib, |
|
|
ifelse(data$exp2_issue == "abort" & data$exp2_liberal_evidence == 0, 7 - data$abort_lib, |
|
|
NA)))))))))) |
|
|
|
|
|
data$exp2_congenial_issue_cont.s <- as.numeric(scale(data$exp2_congenial_issue_cont)) |
|
|
|
|
|
|
|
|
|
|
|
data$exp2_congenial_issue_binary <- |
|
|
ifelse(data$exp2_congenial_issue_cont >= 4, 1, |
|
|
ifelse(data$exp2_congenial_issue_cont < 4, 0, NA)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
data$exp2_goodSample_uns <- data$exp2_goodSample |
|
|
data$exp2_goodCausal_uns <- data$exp2_goodCausal |
|
|
|
|
|
|
|
|
data <- data %>% dplyr::select(-exp2_goodSample, -exp2_goodCausal) |
|
|
|
|
|
colnames(data)[grep(colnames(data), pattern = "good")] |
|
|
|
|
|
|
|
|
data$exp2_goodSample <- as.numeric(scale(data$exp2_goodSample_uns)) |
|
|
data$exp2_goodCausal <- as.numeric(scale(data$exp2_goodCausal_uns)) |
|
|
|
|
|
table(data$exp2_goodSample, data$exp2_goodSample_uns) |
|
|
table(data$exp2_goodCausal, data$exp2_goodCausal_uns) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
data$exp1_congenial_issue_cont.01 <- (data$exp1_congenial_issue_cont -1)/5 |
|
|
data$exp1_congenial_ideo_cont.01 <- (data$exp1_congenial_ideo_cont -1)/6 |
|
|
data$exp1_congenial_pid_cont.01 <- (data$exp1_congenial_pid_cont -1)/6 |
|
|
|
|
|
data$exp2_congenial_issue_cont.01 <- (data$exp2_congenial_issue_cont -1)/5 |
|
|
data$exp2_congenial_ideo_cont.01 <- (data$exp2_congenial_ideo_cont -1)/6 |
|
|
data$exp2_congenial_pid_cont.01 <- (data$exp2_congenial_pid_cont -1)/6 |
|
|
|
|
|
with(data,table(exp1_congenial_pid_cont.01, exp1_congenial_pid_cont)) |
|
|
with(data,table(exp1_congenial_ideo_cont.01, exp1_congenial_ideo_cont)) |
|
|
with(data,table(exp1_congenial_issue_cont.01, exp1_congenial_issue_cont)) |
|
|
|
|
|
with(data,table(exp2_congenial_pid_cont.01, exp2_congenial_pid_cont)) |
|
|
with(data,table(exp2_congenial_ideo_cont.01, exp2_congenial_ideo_cont)) |
|
|
with(data,table(exp2_congenial_issue_cont.01, exp2_congenial_issue_cont)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
nfc_vars <- paste("nfc", 1:10, sep = "_") |
|
|
apply(data[,nfc_vars], 2, function(x) table(x, useNA = "always")) |
|
|
data[,nfc_vars][data[,nfc_vars] == -99] <- NA |
|
|
|
|
|
data$nfc_mean <- rowMeans(data[,nfc_vars], na.rm=T) |
|
|
|
|
|
data$nfc_mean.s <- as.numeric(scale(data$nfc_mean)) |
|
|
|
|
|
psych::alpha(data[,nfc_vars]) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
pip_vars_original <- paste("pip", 1:5, sep = "_") |
|
|
|
|
|
apply(data[,pip_vars_original], 2, function(x) table(x, useNA = "always")) |
|
|
|
|
|
|
|
|
data[,pip_vars_original][data[,pip_vars_original] == -99] <- NA |
|
|
|
|
|
|
|
|
apply(data[,pip_vars_original], 2, function(x) table(x, useNA = "always")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$pip_1.r <- 6 - data$pip_1 |
|
|
table(data$pip_1, data$pip_1.r) |
|
|
|
|
|
|
|
|
data$pip_5.r <- 6 - data$pip_5 |
|
|
table(data$pip_5, data$pip_5.r) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pip_vars <- c("pip_1.r", "pip_2", "pip_3", "pip_4", "pip_5.r") |
|
|
|
|
|
psych::alpha(data[,pip_vars]) |
|
|
|
|
|
|
|
|
data$pip_mean <- rowMeans(data[,pip_vars], na.rm=T) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sv_vars_original <- c("sv_1", "sv_2", "sv_3", "sv_4", "sv_5") |
|
|
|
|
|
apply(data[,sv_vars_original], 2, table) |
|
|
|
|
|
data[,sv_vars_original][data[,sv_vars_original] == -99] <- NA |
|
|
|
|
|
apply(data[,sv_vars_original], 2, table) |
|
|
|
|
|
|
|
|
data$sv_1.r <- 6 - data$sv_1 |
|
|
table(data$sv_1, data$sv_1.r) |
|
|
|
|
|
data$sv_4.r <- 6 - data$sv_4 |
|
|
table(data$sv_4, data$sv_4.r) |
|
|
|
|
|
sv_vars <- c("sv_1.r", "sv_2", "sv_3", "sv_4.r", "sv_5") |
|
|
|
|
|
psych::alpha(data[,sv_vars]) |
|
|
|
|
|
|
|
|
data$sv_mean <- rowMeans(data[,sv_vars], na.rm=T) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
We create a mean openness trait index by averaging all items from each scale. |
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
psych::alpha(data[,c("nfc_mean", "pip_mean", "sv_mean")]) |
|
|
|
|
|
|
|
|
data$nfc_mean.01 <- rescale_01(data$nfc_mean, max = 6) |
|
|
data$pip_mean.01 <- rescale_01(data$pip_mean, max = 5) |
|
|
data$sv_mean.01 <- rescale_01(data$sv_mean, max = 5) |
|
|
|
|
|
|
|
|
data$trait_index <- rowMeans(data[,c("nfc_mean.01", "pip_mean.01", "sv_mean.01")], na.rm=T) |
|
|
|
|
|
data$trait_index.s <- as.numeric(scale(data$trait_index)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
data[,paste("pol_id_", 1:4, sep = "")][data[,paste("pol_id_", 1:4, sep = "")] == -99] <- NA |
|
|
|
|
|
|
|
|
|
|
|
data$pol_id_1.r <- 6 - data$pol_id_1 |
|
|
data$pol_id_2.r <- data$pol_id_2 |
|
|
data$pol_id_3.r <- 6 - data$pol_id_3 |
|
|
data$pol_id_4.r <- data$pol_id_4 |
|
|
|
|
|
pol_id_vars <- c("pol_id_1.r", "pol_id_2.r", "pol_id_3.r", "pol_id_4.r") |
|
|
psych::alpha(data[,pol_id_vars]) |
|
|
|
|
|
|
|
|
data$pol_id <- rowMeans(data[,pol_id_vars], na.rm=T) |
|
|
|
|
|
data$pol_id.s <- as.numeric(scale(data$pol_id)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r new} |
|
|
|
|
|
|
|
|
data$huddy_import <- ifelse(data$pid7 < 4, data$dem_import, |
|
|
ifelse(data$pid7 > 4, data$rep_import, NA)) |
|
|
|
|
|
|
|
|
data$huddy_describe <- ifelse(data$pid7 < 4, data$dem_describe, |
|
|
ifelse(data$pid7 > 4, data$rep_describe, NA)) |
|
|
|
|
|
|
|
|
data$huddy_we <- ifelse(data$pid7 < 4, data$dem_we, |
|
|
ifelse(data$pid7 > 4, data$rep_we, NA)) |
|
|
|
|
|
|
|
|
data$huddy_think <- ifelse(data$pid7 < 4, data$dem_think, |
|
|
ifelse(data$pid7 > 4, data$rep_think, NA)) |
|
|
|
|
|
huddy_vars <- c("huddy_import", "huddy_describe", "huddy_we", "huddy_think") |
|
|
|
|
|
|
|
|
apply(data[,huddy_vars], 2, function(x) table(x, useNA = "always")) |
|
|
|
|
|
|
|
|
data[,huddy_vars][data[,huddy_vars] < 0] <- NA |
|
|
|
|
|
|
|
|
data$huddy_import.01 <- rescale_01(data$huddy_import, max = 4) |
|
|
data$huddy_describe.01 <- rescale_01(data$huddy_describe, max = 4) |
|
|
data$huddy_we.01 <- rescale_01(data$huddy_we, max = 5) |
|
|
data$huddy_think.01 <- rescale_01(data$huddy_think, max = 4) |
|
|
|
|
|
|
|
|
apply(data[,paste(huddy_vars, ".01", sep = "")], 2, range, na.rm=T) |
|
|
|
|
|
psych::alpha(data[,c("huddy_import.01", "huddy_describe.01", |
|
|
"huddy_we.01", "huddy_think.01")]) |
|
|
|
|
|
data$huddy_id <- rowMeans(data[,c("huddy_import.01", "huddy_describe.01", |
|
|
"huddy_we.01", "huddy_think.01")], na.rm=T) |
|
|
|
|
|
data$huddy_id.s <- as.numeric(scale(data$huddy_id)) |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
rasch_vars <- c("rasch_1", "rasch_2", "rasch_3", "rasch_4", |
|
|
"rasch_5", "rasch_6", "rasch_7") |
|
|
|
|
|
|
|
|
apply(data[,rasch_vars], 2, class) |
|
|
|
|
|
|
|
|
data$rasch_1.r <- as.numeric(as.character(data$rasch_1)) |
|
|
data$rasch_2.r <- as.numeric(as.character(data$rasch_2)) |
|
|
data$rasch_3.r <- as.numeric(as.character(data$rasch_3)) |
|
|
data$rasch_4.r <- as.numeric(as.character(data$rasch_4)) |
|
|
data$rasch_5.r <- as.numeric(as.character(data$rasch_5)) |
|
|
data$rasch_6.r <- as.numeric(as.character(data$rasch_6)) |
|
|
data$rasch_7.r <- as.numeric(as.character(data$rasch_7)) |
|
|
|
|
|
rasch_vars.r <- paste(rasch_vars, ".r", sep = "") |
|
|
|
|
|
|
|
|
data[,rasch_vars.r][data[,rasch_vars.r] == -99] <- NA |
|
|
|
|
|
|
|
|
data$rasch_1_corr <- ifelse(data$rasch_1.r == 10, 1, 0) |
|
|
data$rasch_2_corr <- ifelse(data$rasch_2.r == .1, 1, 0) |
|
|
data$rasch_6_corr <- ifelse(data$rasch_6.r == 20, 1, 0) |
|
|
data$rasch_5_corr <- ifelse(data$rasch_5.r == 100, 1, 0) |
|
|
data$rasch_3_corr <- ifelse(data$rasch_3.r == 4, 1, 0) |
|
|
data$rasch_4_corr <- ifelse(data$rasch_4.r == 29, 1, 0) |
|
|
data$rasch_7_corr <- ifelse(data$rasch_7.r == 500, 1, 0) |
|
|
|
|
|
rasch_corr_vars <- c("rasch_1_corr", "rasch_2_corr", "rasch_3_corr", "rasch_4_corr", |
|
|
"rasch_5_corr", "rasch_6_corr", "rasch_7_corr") |
|
|
|
|
|
apply(data[,rasch_corr_vars], 2, function(x) |
|
|
round(prop.table(table(x)),2)) |
|
|
|
|
|
psych::alpha(data[,rasch_corr_vars]) |
|
|
|
|
|
|
|
|
data$numeracy <- rowMeans(data[,rasch_corr_vars], na.rm=T) |
|
|
|
|
|
data$numeracy.s <- as.numeric(scale(data$numeracy)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
apply(data[,c("pk_speaker", "pk_senterm", "pk_cj", "pk_merkel", "pk_putin")], 2, |
|
|
function(x) table(x, useNA = "always")) |
|
|
|
|
|
data$pk_speaker_corr <- ifelse(data$pk_speaker == 4, 1, |
|
|
ifelse(data$pk_speaker == -99, NA, 0)) |
|
|
|
|
|
data$pk_senterm_corr <- ifelse(data$pk_senterm == 3, 1, |
|
|
ifelse(data$pk_senterm == -99, NA, 0)) |
|
|
|
|
|
data$pk_cj_corr <- ifelse(data$pk_cj == 3, 1, |
|
|
ifelse(data$pk_cj == -99, NA, 0)) |
|
|
|
|
|
data$pk_merkel_corr <- ifelse(data$pk_merkel == 2, 1, |
|
|
ifelse(data$pk_merkel == -99, NA, 0)) |
|
|
|
|
|
data$pk_putin_corr <- ifelse(data$pk_putin == 2, 1, |
|
|
ifelse(data$pk_putin == -99, NA, 0)) |
|
|
|
|
|
pk_vars <- c("pk_speaker_corr", "pk_senterm_corr", "pk_cj_corr", |
|
|
"pk_merkel_corr", "pk_putin_corr") |
|
|
|
|
|
apply(data[,pk_vars], 2, function(x) prop.table(table(x))) |
|
|
|
|
|
data$pk_mean <- rowMeans(data[,pk_vars]) |
|
|
|
|
|
data$pk_mean.s <- as.numeric(scale(data$pk_mean)) |
|
|
|
|
|
cor(data$pk_mean, data$pk_mean.s, use = "complete.obs") |
|
|
|
|
|
psych::alpha(data[,pk_vars]) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
table(data$gender, useNA = "always") |
|
|
data$female <- ifelse(data$gender == 2, 1, 0) |
|
|
data$female[data$female == -99] <- NA |
|
|
table(data$female, useNA = "always") |
|
|
table(data$gender, data$female) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$race_1[data$race_1 == -99] <- NA |
|
|
data$race_2[data$race_2 == -99] <- NA |
|
|
data$race_3[data$race_3 == -99] <- NA |
|
|
data$race_4[data$race_4 == -99] <- NA |
|
|
data$race_5[data$race_5 == -99] <- NA |
|
|
data$race_6[data$race_6 == -99] <- NA |
|
|
data$race_7[data$race_7 == -99] <- NA |
|
|
|
|
|
data$race_white <- ifelse(data$race_1 == 1, 1, 0) |
|
|
data$race_black <- ifelse(data$race_2 == 1, 1, 0) |
|
|
data$race_other <- ifelse(data$race_4 == 1 | data$race_5 == 1 | data$race_6 == 1 | |
|
|
data$race_7 == 1 | data$race_8 == 1, 1, 0) |
|
|
|
|
|
data$hispanic <- ifelse(data$race_3 == 1, 1, 0) |
|
|
|
|
|
data$nonhisp_black <- ifelse(data$race_2 == 1 & data$race_3 != 1, 1, 0) |
|
|
|
|
|
|
|
|
|
|
|
data$education <- data$educatt |
|
|
data$education[data$education == -99] <- NA |
|
|
|
|
|
data$edu_lesshs <- ifelse(data$education == 1, 1, 0) |
|
|
data$edu_hs <- ifelse(data$education == 2, 1, 0) |
|
|
data$edu_somecollege <- ifelse(data$education == 3 | data$education == 4, 1, 0) |
|
|
data$edu_college <- ifelse(data$education == 5, 1, 0) |
|
|
data$edu_grad <- ifelse(data$education == 6, 1, 0) |
|
|
|
|
|
|
|
|
data$age <- 2018-data$birthyr |
|
|
|
|
|
data$age.s <- as.numeric(scale(data$age)) |
|
|
|
|
|
|
|
|
|
|
|
data$income <- data$faminc |
|
|
|
|
|
data$income[data$income == -99] <- NA |
|
|
|
|
|
data$income.s <- as.numeric(scale(data$income)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following naming syntax is used when running models and calculating quantities of interest below. |
|
|
|
|
|
- mx = model x (where m1 = asymmetry model and m2 = moderation model) |
|
|
- ex = experiment x |
|
|
- where: |
|
|
- e1 = experiment 1 |
|
|
- e2ss = experiment 2, sample size outcome |
|
|
- e2cc = experiment 2, causal claim outcome |
|
|
|
|
|
- iss/ideo/pid/ = operationalization of R's L/R dimension |
|
|
- where, iss = issue; ideo = ideology; pid = party id. |
|
|
|
|
|
- lib/con = data is subsetted to those individuals who received either |
|
|
- liberal (lib) or conservative (con) -leaning evidence |
|
|
|
|
|
- Example: m1_e1_iss_lib |
|
|
- m1 = model 1 (asymmetry model) |
|
|
- e1 = experiment 1 |
|
|
- iss = L/R dimension defined by R's issue position |
|
|
- lib = R received liberal-leaning evidence in experiment 1 |
|
|
|
|
|
The first set of models ("Asymmetry Models") explore the extent to which there exists an asymmetry in how liberals and conservatives engage in politically motivated reasoning. In total, there are 18 models (3 (interpretation DV, sample size DV, causal claim DV) X 3 (L/R dimension = issue stance, ideology, party ID) X 2 (liberal, conservative evidence)): we run separate models for each of the 3 experimental outcomes: Experiment 1 (interpretation outcome), Experiment 2 (sample size outcome), and Experiment 2 (causal claim outcome), each operationalization of the respondent's L/R dimension (issue stance, self-reported ideology, and self-reported party ID), and respondents' who were randomly assigned to receive liberal- or conservative-leaning evidence. \\ |
|
|
|
|
|
Order of Asymmetry Models: |
|
|
|
|
|
- Models for Experiment 1 |
|
|
- L/R = issue position, liberal evidence |
|
|
- L/R = issue position, conservative evidence |
|
|
- L/R = ideology, liberal evidence |
|
|
- L/R = ideology, conservative evidence |
|
|
- L/R = party ID, liberal evidence |
|
|
- L/R = party ID, conservative evidence |
|
|
|
|
|
- Models for Experiment 2 (Sample Size outcome) |
|
|
- L/R = issue position, liberal evidence |
|
|
- L/R = issue position, conservative evidence |
|
|
- L/R = ideology, liberal evidence |
|
|
- L/R = ideology, conservative evidence |
|
|
- L/R = party ID, liberal evidence |
|
|
- L/R = party ID, conservative evidence |
|
|
|
|
|
- Models for Experiment 2 (Causal Claim outcome) |
|
|
- L/R = issue position, liberal evidence |
|
|
- L/R = issue position, conservative evidence |
|
|
- L/R = ideology, liberal evidence |
|
|
- L/R = ideology, conservative evidence |
|
|
- L/R = party ID, liberal evidence |
|
|
- L/R = party ID, conservative evidence |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
m1_e1_controls <- "exp1_issue" |
|
|
|
|
|
|
|
|
m1_e2_controls <- "exp2_issue" |
|
|
|
|
|
|
|
|
m2_e1_controls <- "age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + exp1_issue" |
|
|
|
|
|
|
|
|
m2_e2_controls <- "age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + exp2_issue" |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
Higher values indicate more conservative-leaning evidence. |
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp1_issue_lr <- ifelse(data$exp1_issue == "gun", 7 - data$gun_lib, |
|
|
ifelse(data$exp1_issue == "aa", 7 - data$aa_lib, |
|
|
ifelse(data$exp1_issue == "wage", 7 - data$wage_lib, |
|
|
ifelse(data$exp1_issue == "abort", 7 - data$abort_lib, |
|
|
ifelse(data$exp1_issue == "imm", 7 - data$imm_lib, NA))))) |
|
|
|
|
|
table(data$exp1_issue_lr, useNA = "always") |
|
|
|
|
|
|
|
|
data$exp1_issue_lr_binary <- ifelse(data$exp1_issue_lr <= 3, 0, |
|
|
ifelse(data$exp1_issue_lr >= 4, 1, NA)) |
|
|
|
|
|
table(data$exp1_issue_lr, data$exp1_issue_lr_binary, useNA = "always") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp2_issue_lr <- ifelse(data$exp2_issue == "gun", 7 - data$gun_lib, |
|
|
ifelse(data$exp2_issue == "aa", 7 - data$aa_lib, |
|
|
ifelse(data$exp2_issue == "wage", 7 - data$wage_lib, |
|
|
ifelse(data$exp2_issue == "abort", 7 - data$abort_lib, |
|
|
ifelse(data$exp2_issue == "imm", 7 - data$imm_lib, NA))))) |
|
|
|
|
|
|
|
|
data$exp2_issue_lr_binary <- ifelse(data$exp2_issue_lr <= 3, 0, |
|
|
ifelse(data$exp2_issue_lr >= 4, 1, NA)) |
|
|
|
|
|
table(data$exp2_issue_lr, data$exp2_issue_lr_binary, useNA = "always") |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m1_e1_iss_lib <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_issue_lr_binary", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e1_iss_con <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_issue_lr_binary", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e1_ideo_lib <- quick_glm(outcome = "exp1_correct", |
|
|
new = "con_lib", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e1_ideo_con <- quick_glm(outcome = "exp1_correct", |
|
|
new = "con_lib", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e1_pid_lib <- quick_glm(outcome = "exp1_correct", |
|
|
new = "rep_dem", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e1_pid_con <- quick_glm(outcome = "exp1_correct", |
|
|
new = "rep_dem", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m1_e2ss_iss_lib <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_issue_lr_binary", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2ss_iss_con <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_issue_lr_binary", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2ss_ideo_lib <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "con_lib", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2ss_ideo_con <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "con_lib", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2ss_pid_lib <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "rep_dem", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2ss_pid_con <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "rep_dem", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m1_e2cc_iss_lib <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_issue_lr_binary", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2cc_iss_con <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_issue_lr_binary", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2cc_ideo_lib <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "con_lib", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2cc_ideo_con <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "con_lib", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2cc_pid_lib <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "rep_dem", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2cc_pid_con <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "rep_dem", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
|
|
|
p_m1_e1_iss_lib <- post(model = m1_e1_iss_lib, |
|
|
x1name = "exp1_issue_lr_binary", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e1_iss_con <- post(model = m1_e1_iss_con, |
|
|
x1name = "exp1_issue_lr_binary",x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e1_ideo_lib <- post(model = m1_e1_ideo_lib, |
|
|
x1name = "con_lib", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e1_ideo_con <- post(model = m1_e1_ideo_con, |
|
|
x1name = "con_lib", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e1_pid_lib <- post(model = m1_e1_pid_lib, |
|
|
x1name = "rep_dem", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e1_pid_con <- post(model = m1_e1_pid_con, |
|
|
x1name = "rep_dem", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
|
|
|
|
|
|
p_m1_e2ss_iss_lib <- post(model = m1_e2ss_iss_lib, |
|
|
x1name = "exp2_issue_lr_binary", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2ss_iss_con <- post(model = m1_e2ss_iss_con, |
|
|
x1name = "exp2_issue_lr_binary", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2ss_ideo_lib <- post(model = m1_e2ss_ideo_lib, |
|
|
x1name = "con_lib", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2ss_ideo_con <- post(model = m1_e2ss_ideo_con, |
|
|
x1name = "con_lib", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2ss_pid_lib <- post(model = m1_e2ss_pid_lib, |
|
|
x1name = "rep_dem", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2ss_pid_con <- post(model = m1_e2ss_pid_con, |
|
|
x1name = "rep_dem", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
|
|
|
|
|
|
p_m1_e2cc_iss_lib <- post(model = m1_e2cc_iss_lib, |
|
|
x1name = "exp2_issue_lr_binary", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2cc_iss_con <- post(model = m1_e2cc_iss_con, |
|
|
x1name = "exp2_issue_lr_binary", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2cc_ideo_lib <- post(model = m1_e2cc_ideo_lib, |
|
|
x1name = "con_lib", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2cc_ideo_con <- post(model = m1_e2cc_ideo_con, |
|
|
x1name = "con_lib", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2cc_pid_lib <- post(model = m1_e2cc_pid_lib, |
|
|
x1name = "rep_dem", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2cc_pid_con <- post(model = m1_e2cc_pid_con, |
|
|
x1name = "rep_dem", x1vals = c(0, 1), |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d_m1_e1_iss <- (p_m1_e1_iss_con@sims[,ncol(p_m1_e1_iss_con@sims)] - |
|
|
p_m1_e1_iss_lib@sims[,ncol(p_m1_e1_iss_lib@sims)]) - |
|
|
|
|
|
(p_m1_e1_iss_lib@sims[,1] - |
|
|
p_m1_e1_iss_con@sims[,1]) |
|
|
|
|
|
d_m1_e1_ideo <- (p_m1_e1_ideo_con@sims[,ncol(p_m1_e1_ideo_con@sims)] - |
|
|
p_m1_e1_ideo_lib@sims[,ncol(p_m1_e1_ideo_lib@sims)]) - |
|
|
|
|
|
(p_m1_e1_ideo_lib@sims[,1] - |
|
|
p_m1_e1_ideo_con@sims[,1]) |
|
|
|
|
|
d_m1_e1_pid <- (p_m1_e1_pid_con@sims[,ncol(p_m1_e1_pid_con@sims)] - |
|
|
p_m1_e1_pid_lib@sims[,ncol(p_m1_e1_pid_lib@sims)]) - |
|
|
|
|
|
(p_m1_e1_pid_lib@sims[,1] - |
|
|
p_m1_e1_pid_con@sims[,1]) |
|
|
|
|
|
|
|
|
d_m1_e2ss_iss <- (p_m1_e2ss_iss_con@sims[,ncol(p_m1_e2ss_iss_con@sims)] - |
|
|
p_m1_e2ss_iss_lib@sims[,ncol(p_m1_e2ss_iss_lib@sims)]) - |
|
|
|
|
|
(p_m1_e2ss_iss_lib@sims[,1] - |
|
|
p_m1_e2ss_iss_con@sims[,1]) |
|
|
|
|
|
d_m1_e2ss_ideo <- (p_m1_e2ss_ideo_con@sims[,ncol(p_m1_e2ss_ideo_con@sims)] - |
|
|
p_m1_e2ss_ideo_lib@sims[,ncol(p_m1_e2ss_ideo_lib@sims)]) - |
|
|
|
|
|
(p_m1_e2ss_ideo_lib@sims[,1] - |
|
|
p_m1_e2ss_ideo_con@sims[,1]) |
|
|
|
|
|
d_m1_e2ss_pid <- (p_m1_e2ss_pid_con@sims[,ncol(p_m1_e2ss_pid_con@sims)] - |
|
|
p_m1_e2ss_pid_lib@sims[,ncol(p_m1_e2ss_pid_lib@sims)]) - |
|
|
|
|
|
(p_m1_e2ss_pid_lib@sims[,1] - |
|
|
p_m1_e2ss_pid_con@sims[,1]) |
|
|
|
|
|
|
|
|
d_m1_e2cc_iss <- (p_m1_e2cc_iss_con@sims[,ncol(p_m1_e2cc_iss_con@sims)] - |
|
|
p_m1_e2cc_iss_lib@sims[,ncol(p_m1_e2cc_iss_lib@sims)]) - |
|
|
|
|
|
(p_m1_e2cc_iss_lib@sims[,1] - |
|
|
p_m1_e2cc_iss_con@sims[,1]) |
|
|
|
|
|
d_m1_e2cc_ideo <- (p_m1_e2cc_ideo_con@sims[,ncol(p_m1_e2cc_ideo_con@sims)] - |
|
|
p_m1_e2cc_ideo_lib@sims[,ncol(p_m1_e2cc_ideo_lib@sims)]) - |
|
|
|
|
|
(p_m1_e2cc_ideo_lib@sims[,1] - |
|
|
p_m1_e2cc_ideo_con@sims[,1]) |
|
|
|
|
|
d_m1_e2cc_pid <- (p_m1_e2cc_pid_con@sims[,ncol(p_m1_e2cc_pid_con@sims)] - |
|
|
p_m1_e2cc_pid_lib@sims[,ncol(p_m1_e2cc_pid_lib@sims)]) - |
|
|
|
|
|
(p_m1_e2cc_pid_lib@sims[,1] - |
|
|
p_m1_e2cc_pid_con@sims[,1]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d_names <- as.data.frame(cbind(d_m1_e1_iss, d_m1_e1_ideo, d_m1_e1_pid, |
|
|
d_m1_e2ss_iss, d_m1_e2ss_ideo, d_m1_e2ss_pid, |
|
|
d_m1_e2cc_iss, d_m1_e2cc_ideo, d_m1_e2cc_pid)) |
|
|
|
|
|
|
|
|
d_names_r <- c(d_m1_e1_iss, d_m1_e1_ideo, d_m1_e1_pid, |
|
|
d_m1_e2ss_iss, d_m1_e2ss_ideo, d_m1_e2ss_pid, |
|
|
d_m1_e2cc_iss, d_m1_e2cc_ideo, d_m1_e2cc_pid) |
|
|
|
|
|
|
|
|
dtbl <- data.frame(name = colnames(d_names), |
|
|
mean = apply(d_names, 2, mean), |
|
|
ci.lo = apply(d_names, 2, quantile, probs = .025), |
|
|
ci.hi = apply(d_names, 2, quantile, probs = .975)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
We create separate figures for each experimental outcome (Experiment 1; Experiment 2 Sample Size outcome; and Experiment 2 Causal Claim outcome). For each of these experimental outcomes, we create separate figures for each operationalization of a respondent's L/R dimension (issue position, ideology, and party ID). This results in 9 figures. For the sake of simplicity, the 3 figures for each experimental outcome are horizontally arranged in a single pdf file. |
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_b_asym_1.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,5,1,0), mar = c(4.1,2,1.1,1)) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(.20, .70), |
|
|
xlab = "Issue Position", |
|
|
ylab = "Pr(Correct)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e1_iss_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e1_iss_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e1_iss_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e1_iss_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e1_iss_lib@est[1:2,2], |
|
|
y1 = p_m1_e1_iss_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e1_iss_con@est[1:2,2], |
|
|
y1 = p_m1_e1_iss_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
legend("topleft", legend = c("Left", "Right"), |
|
|
|
|
|
col = c("deepskyblue3", "firebrick2"), |
|
|
pch = c(16,15), |
|
|
bty = "n", cex = 2, title = "Evidence:") |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(.20, .70), |
|
|
xlab = "Ideology", |
|
|
ylab = "Pr(Correct)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e1_ideo_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e1_ideo_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e1_ideo_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e1_ideo_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e1_ideo_lib@est[1:2,2], |
|
|
y1 = p_m1_e1_ideo_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e1_ideo_con@est[1:2,2], |
|
|
y1 = p_m1_e1_ideo_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
legend(.5, 1, legend = c("Left", "Right"), |
|
|
lty = 1, lwd = 4, col = c("deepskyblue3", "firebrick2"), |
|
|
pch = 16, |
|
|
bty = "n", cex = 2, title = "Evidence:") |
|
|
|
|
|
mtext("Pr(Correct Interpretation of Evidence)", side = 2, outer = T, padj = -2, cex = 1.7) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(.20, .70), |
|
|
xlab = "Party ID", |
|
|
ylab = "Pr(Correct)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e1_pid_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e1_pid_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e1_pid_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e1_pid_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e1_pid_lib@est[1:2,2], |
|
|
y1 = p_m1_e1_pid_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e1_pid_con@est[1:2,2], |
|
|
y1 = p_m1_e1_pid_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_b_asym_2.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,5,1,0), mar = c(4.1,1,1.1,1)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(-.5, .5), |
|
|
xlab = "Issue Position", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e2ss_iss_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e2ss_iss_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e2ss_iss_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e2ss_iss_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2ss_iss_lib@est[1:2,2], |
|
|
y1 = p_m1_e2ss_iss_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2ss_iss_con@est[1:2,2], |
|
|
y1 = p_m1_e2ss_iss_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(-.5, .5), |
|
|
xlab = "Ideology", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e2ss_ideo_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e2ss_ideo_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e2ss_ideo_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e2ss_ideo_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2ss_ideo_lib@est[1:2,2], |
|
|
y1 = p_m1_e2ss_ideo_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2ss_ideo_con@est[1:2,2], |
|
|
y1 = p_m1_e2ss_ideo_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
mtext("Sample Size is Sufficient (in SDs)", side = 2, outer = T, padj = -2, cex = 1.7) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(-.5, .5), |
|
|
xlab = "Party ID", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e2ss_pid_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e2ss_pid_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e2ss_pid_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e2ss_pid_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2ss_pid_lib@est[1:2,2], |
|
|
y1 = p_m1_e2ss_pid_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2ss_pid_con@est[1:2,2], |
|
|
y1 = p_m1_e2ss_pid_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_b_asym_3.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,5,1,0), mar = c(4.1,1,1.1,1)) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(-.5, .5), |
|
|
xlab = "Issue Position", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e2cc_iss_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e2cc_iss_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e2cc_iss_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e2cc_iss_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2cc_iss_lib@est[1:2,2], |
|
|
y1 = p_m1_e2cc_iss_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2cc_iss_con@est[1:2,2], |
|
|
y1 = p_m1_e2cc_iss_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(-.5, .5), |
|
|
xlab = "Ideology", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e2cc_ideo_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e2cc_ideo_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e2cc_ideo_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e2cc_ideo_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2cc_ideo_lib@est[1:2,2], |
|
|
y1 = p_m1_e2cc_ideo_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2cc_ideo_con@est[1:2,2], |
|
|
y1 = p_m1_e2cc_ideo_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
mtext("Can Make Causal Claim (in SDs)", side = 2, outer = T, padj = -2, cex = 1.7) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(-.2, 1.2), ylim = c(-.5, .5), |
|
|
xlab = "Party ID", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
axis(1, at = c(0, 1), labels = c("", ""), cex.axis = 1.5) |
|
|
|
|
|
points(0:1, p_m1_e2cc_pid_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
cex = 4) |
|
|
points(0:1, p_m1_e2cc_pid_con@est[1:2,1], pch = 15, col = "firebrick2", cex = 4) |
|
|
|
|
|
points(0:1, p_m1_e2cc_pid_lib@est[1:2,1], pch = 16, col = "deepskyblue3", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
points(0:1, p_m1_e2cc_pid_con@est[1:2,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4, lty = 2) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2cc_pid_lib@est[1:2,2], |
|
|
y1 = p_m1_e2cc_pid_lib@est[1:2,3], |
|
|
col = makeTransparent( "deepskyblue3"), lwd = 7) |
|
|
segments(x0 = c(0, 1), x1 = c(0, 1), |
|
|
y0 = p_m1_e2cc_pid_con@est[1:2,2], |
|
|
y1 = p_m1_e2cc_pid_con@est[1:2,3], |
|
|
col = makeTransparent("firebrick2"), lwd = 7) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_b_asym_4.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,6,1,0), mar = c(4.1,1,1.1,1), xpd = NA) |
|
|
|
|
|
x_vals <- c(1,3,5) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(0,7), ylim = c(-1,1), |
|
|
xlab = "Evidence Interpretation", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
points(x_vals, dtbl$mean[1:3], pch = c(15, 16, 17), |
|
|
cex = 4) |
|
|
segments(x0 = x_vals, x1 = x_vals, |
|
|
y0 = dtbl$ci.lo[1:3], y1 = dtbl$ci.hi[1:3], |
|
|
lwd = 7, col = makeTransparent("black", 150)) |
|
|
|
|
|
mtext("(Conservative - Liberal)", side = 2, outer = T, padj = -1.8, cex = 1.7) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(0,7), ylim = c(-1,1), |
|
|
xlab = "Sample Size", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7, yaxt = "n", xaxt = "n") |
|
|
|
|
|
points(x_vals, dtbl$mean[4:6], pch = c(15, 16, 17), |
|
|
cex = 4) |
|
|
segments(x0 = x_vals, x1 = x_vals, |
|
|
y0 = dtbl$ci.lo[4:6], y1 = dtbl$ci.hi[4:6], |
|
|
lwd = 7, col = makeTransparent("black", 150)) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(0,7), ylim = c(-1,1), |
|
|
xlab = "Causality", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7, yaxt = "n", xaxt = "n") |
|
|
|
|
|
points(x_vals, dtbl$mean[7:9], pch = c(15, 16, 17), |
|
|
cex = 4) |
|
|
segments(x0 = x_vals, x1 = x_vals, |
|
|
y0 = dtbl$ci.lo[7:9], y1 = dtbl$ci.hi[7:9], |
|
|
lwd = 7, col = makeTransparent("black", 150) ) |
|
|
|
|
|
|
|
|
axis(1, at = -17:6, lwd.tick=0, labels=FALSE) |
|
|
|
|
|
segments(x0 = -17, x1 = -17, |
|
|
y0 = -1.08, y1 = -1.12) |
|
|
segments(x0 = 6, x1 = 6, |
|
|
y0 = -1.08, y1 = -1.12) |
|
|
|
|
|
|
|
|
segments(x0 = -17.5, x1 = 6, |
|
|
y0 = 0, y1 = 0, lty = 2) |
|
|
|
|
|
legend("topright", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
bty = "n", cex = 3) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m1_e1_iss_lib_cnt <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_issue_lr", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e1_iss_con_cnt <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_issue_lr", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e1_ideo_lib_cnt <- quick_glm(outcome = "exp1_correct", |
|
|
new = "ideo7", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e1_ideo_con_cnt <- quick_glm(outcome = "exp1_correct", |
|
|
new = "ideo7", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e1_pid_lib_cnt <- quick_glm(outcome = "exp1_correct", |
|
|
new = "pid7", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e1_pid_con_cnt <- quick_glm(outcome = "exp1_correct", |
|
|
new = "pid7", |
|
|
keepers = m1_e1_controls, |
|
|
data = data[data$exp1_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m1_e2ss_iss_lib_cnt <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_issue_lr", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2ss_iss_con_cnt <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_issue_lr", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2ss_ideo_lib_cnt <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "ideo7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2ss_ideo_con_cnt <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "ideo7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2ss_pid_lib_cnt <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "pid7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2ss_pid_con_cnt <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "pid7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m1_e2cc_iss_lib_cnt <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_issue_lr", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2cc_iss_con_cnt <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_issue_lr", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2cc_ideo_lib_cnt <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "ideo7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2cc_ideo_con_cnt <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "ideo7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
|
|
|
|
|
|
m1_e2cc_pid_lib_cnt <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "pid7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 1,]) |
|
|
|
|
|
m1_e2cc_pid_con_cnt <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "pid7", |
|
|
keepers = m1_e2_controls, |
|
|
data = data[data$exp2_liberal_evidence == 0,]) |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
p_m1_e1_iss_lib_cnt <- post(model = m1_e1_iss_lib_cnt, |
|
|
x1name = "exp1_issue_lr", x1vals = 1:6, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e1_iss_con_cnt <- post(model = m1_e1_iss_con_cnt, |
|
|
x1name = "exp1_issue_lr", x1vals = 1:6, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e1_ideo_lib_cnt <- post(model = m1_e1_ideo_lib_cnt, |
|
|
x1name = "ideo7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e1_ideo_con_cnt <- post(model = m1_e1_ideo_con_cnt, |
|
|
x1name = "ideo7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e1_pid_lib_cnt <- post(model = m1_e1_pid_lib_cnt, |
|
|
x1name = "pid7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e1_pid_con_cnt <- post(model = m1_e1_pid_con_cnt, |
|
|
x1name = "pid7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
|
|
|
p_m1_e2ss_iss_lib_cnt <- post(model = m1_e2ss_iss_lib_cnt, |
|
|
x1name = "exp2_issue_lr", x1vals = 1:6, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2ss_iss_con_cnt <- post(model = m1_e2ss_iss_con_cnt, |
|
|
x1name = "exp2_issue_lr", x1vals = 1:6, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2ss_ideo_lib_cnt <- post(model = m1_e2ss_ideo_lib_cnt, |
|
|
x1name = "ideo7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2ss_ideo_con_cnt <- post(model = m1_e2ss_ideo_con_cnt, |
|
|
x1name = "ideo7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2ss_pid_lib_cnt <- post(model = m1_e2ss_pid_lib_cnt, |
|
|
x1name = "pid7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2ss_pid_con_cnt <- post(model = m1_e2ss_pid_con_cnt, |
|
|
x1name = "pid7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
|
|
|
p_m1_e2cc_iss_lib_cnt <- post(model = m1_e2cc_iss_lib_cnt, |
|
|
x1name = "exp2_issue_lr", x1vals = 1:6, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2cc_iss_con_cnt <- post(model = m1_e2cc_iss_con_cnt, |
|
|
x1name = "exp2_issue_lr", x1vals = 1:6, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2cc_ideo_lib_cnt <- post(model = m1_e2cc_ideo_lib_cnt, |
|
|
x1name = "ideo7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2cc_ideo_con_cnt <- post(model = m1_e2cc_ideo_con_cnt, |
|
|
x1name = "ideo7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
p_m1_e2cc_pid_lib_cnt <- post(model = m1_e2cc_pid_lib_cnt, |
|
|
x1name = "pid7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
p_m1_e2cc_pid_con_cnt <- post(model = m1_e2cc_pid_con_cnt, |
|
|
x1name = "pid7", x1vals = 1:7, |
|
|
n.sims = nsims, digits = 5) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d_m1_e1_iss_cnt <- (p_m1_e1_iss_con_cnt@sims[,ncol(p_m1_e1_iss_con_cnt@sims)] - |
|
|
p_m1_e1_iss_lib_cnt@sims[,ncol(p_m1_e1_iss_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e1_iss_lib_cnt@sims[,1] - |
|
|
p_m1_e1_iss_con_cnt@sims[,1]) |
|
|
|
|
|
d_m1_e1_ideo_cnt <- (p_m1_e1_ideo_con_cnt@sims[,ncol(p_m1_e1_ideo_con_cnt@sims)] - |
|
|
p_m1_e1_ideo_lib_cnt@sims[,ncol(p_m1_e1_ideo_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e1_ideo_lib_cnt@sims[,1] - |
|
|
p_m1_e1_ideo_con_cnt@sims[,1]) |
|
|
|
|
|
d_m1_e1_pid_cnt <- (p_m1_e1_pid_con_cnt@sims[,ncol(p_m1_e1_pid_con_cnt@sims)] - |
|
|
p_m1_e1_pid_lib_cnt@sims[,ncol(p_m1_e1_pid_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e1_pid_lib_cnt@sims[,1] - |
|
|
p_m1_e1_pid_con_cnt@sims[,1]) |
|
|
|
|
|
|
|
|
d_m1_e2ss_iss_cnt <- (p_m1_e2ss_iss_con_cnt@sims[,ncol(p_m1_e2ss_iss_con_cnt@sims)] - |
|
|
p_m1_e2ss_iss_lib_cnt@sims[,ncol(p_m1_e2ss_iss_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e2ss_iss_lib_cnt@sims[,1] - |
|
|
p_m1_e2ss_iss_con_cnt@sims[,1]) |
|
|
|
|
|
d_m1_e2ss_ideo_cnt <- (p_m1_e2ss_ideo_con_cnt@sims[,ncol(p_m1_e2ss_ideo_con_cnt@sims)] - |
|
|
p_m1_e2ss_ideo_lib_cnt@sims[,ncol(p_m1_e2ss_ideo_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e2ss_ideo_lib_cnt@sims[,1] - |
|
|
p_m1_e2ss_ideo_con_cnt@sims[,1]) |
|
|
|
|
|
d_m1_e2ss_pid_cnt <- (p_m1_e2ss_pid_con_cnt@sims[,ncol(p_m1_e2ss_pid_con_cnt@sims)] - |
|
|
p_m1_e2ss_pid_lib_cnt@sims[,ncol(p_m1_e2ss_pid_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e2ss_pid_lib_cnt@sims[,1] - |
|
|
p_m1_e2ss_pid_con_cnt@sims[,1]) |
|
|
|
|
|
|
|
|
d_m1_e2cc_iss_cnt <- (p_m1_e2cc_iss_con_cnt@sims[,ncol(p_m1_e2cc_iss_con_cnt@sims)] - |
|
|
p_m1_e2cc_iss_lib_cnt@sims[,ncol(p_m1_e2cc_iss_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e2cc_iss_lib_cnt@sims[,1] - |
|
|
p_m1_e2cc_iss_con_cnt@sims[,1]) |
|
|
|
|
|
d_m1_e2cc_ideo_cnt <- (p_m1_e2cc_ideo_con_cnt@sims[,ncol(p_m1_e2cc_ideo_con_cnt@sims)] - |
|
|
p_m1_e2cc_ideo_lib_cnt@sims[,ncol(p_m1_e2cc_ideo_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e2cc_ideo_lib_cnt@sims[,1] - |
|
|
p_m1_e2cc_ideo_con_cnt@sims[,1]) |
|
|
|
|
|
d_m1_e2cc_pid_cnt <- (p_m1_e2cc_pid_con_cnt@sims[,ncol(p_m1_e2cc_pid_con_cnt@sims)] - |
|
|
p_m1_e2cc_pid_lib_cnt@sims[,ncol(p_m1_e2cc_pid_lib_cnt@sims)]) - |
|
|
|
|
|
(p_m1_e2cc_pid_lib_cnt@sims[,1] - |
|
|
p_m1_e2cc_pid_con_cnt@sims[,1]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d_names_cnt <- as.data.frame(cbind(d_m1_e1_iss_cnt, d_m1_e1_ideo_cnt, d_m1_e1_pid_cnt, |
|
|
d_m1_e2ss_iss_cnt, d_m1_e2ss_ideo_cnt, d_m1_e2ss_pid_cnt, |
|
|
d_m1_e2cc_iss_cnt, d_m1_e2cc_ideo_cnt, d_m1_e2cc_pid_cnt)) |
|
|
|
|
|
|
|
|
d_names_r_cnt <- c(d_m1_e1_iss_cnt, d_m1_e1_ideo_cnt, d_m1_e1_pid_cnt, |
|
|
d_m1_e2ss_iss_cnt, d_m1_e2ss_ideo_cnt, d_m1_e2ss_pid_cnt, |
|
|
d_m1_e2cc_iss_cnt, d_m1_e2cc_ideo_cnt, d_m1_e2cc_pid_cnt) |
|
|
|
|
|
dtbl_cnt <- data.frame(name = colnames(d_names_cnt), |
|
|
mean = apply(d_names_cnt, 2, mean), |
|
|
ci.lo = apply(d_names_cnt, 2, quantile, probs = .025), |
|
|
ci.hi = apply(d_names_cnt, 2, quantile, probs = .975)) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
We create separate figures for each experimental outcome (Experiment 1; Experiment 2, Sample Size outcome; and Experiment 2, Causal Claim outcome). For each of these experimental outcomes, we create separate figures for each operationalization of a respondent's L/R dimension (issue position, ideology, and party ID). This results in 9 figures. For simplicity, the 3 figures for each experimental outcome are horizontally arranged in a single pdf file. Each of the 3 figures in each PDF uses a different operationalization of a respondent's L/R orientation. |
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_c_asym_1.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,5,1,0), mar = c(4.1,2,1.1,1)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,6), ylim = c(0, 1), |
|
|
xlab = "Issue Position", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:6, p_m1_e1_iss_lib_cnt@est[1:6,1], pch = 16, col = "deepskyblue3", |
|
|
lty = 2, type = "l", lwd = 4) |
|
|
points(1:6, p_m1_e1_iss_con_cnt@est[1:6,1], pch = 15, col = "firebrick2", type = "l", |
|
|
lwd = 4) |
|
|
polygon(c(seq(1,6,1), rev(seq(1,6,1))), |
|
|
c(p_m1_e1_iss_lib_cnt@est[1:6,2], rev(p_m1_e1_iss_lib_cnt@est[1:6,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,6,1), rev(seq(1,6,1))), |
|
|
c(p_m1_e1_iss_con_cnt@est[1:6,2], rev(p_m1_e1_iss_con_cnt@est[1:6,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
legend(1.5, 1, legend = c("Left", "Right"), |
|
|
lty = c(2,1), lwd = 4, col = c("deepskyblue3", "firebrick2"), |
|
|
bty = "n", cex = 2, title = "Evidence:") |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,7), ylim = c(0, 1), |
|
|
xlab = "Ideology", |
|
|
ylab = "Pr(Correct)", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:7, p_m1_e1_ideo_lib_cnt@est[1:7,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:7, p_m1_e1_ideo_con_cnt@est[1:7,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e1_ideo_lib_cnt@est[1:7,2], rev(p_m1_e1_ideo_lib_cnt@est[1:7,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e1_ideo_con_cnt@est[1:7,2], rev(p_m1_e1_ideo_con_cnt@est[1:7,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
mtext("Pr(Correct Interpretation of Evidence)", side = 2, outer = T, padj = -2, cex = 1.7) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,7), ylim = c(0, 1), |
|
|
xlab = "Party ID", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:7, p_m1_e1_pid_lib_cnt@est[1:7,1], pch = 16, col = "deepskyblue3", |
|
|
lty = 2, type = "l", lwd = 4) |
|
|
points(1:7, p_m1_e1_pid_con_cnt@est[1:7,1], pch = 15, col = "firebrick2", |
|
|
type = "l", lwd = 4) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e1_pid_lib_cnt@est[1:7,2], rev(p_m1_e1_pid_lib_cnt@est[1:7,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e1_pid_con_cnt@est[1:7,2], rev(p_m1_e1_pid_con_cnt@est[1:7,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_c_asym_2.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,5,1,0), mar = c(4.1,1,1.1,1)) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,6), ylim = c(-1, 1), |
|
|
xlab = "Issue Position", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:6, p_m1_e2ss_iss_lib_cnt@est[1:6,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:6, p_m1_e2ss_iss_con_cnt@est[1:6,1], pch = 15, |
|
|
col = "firebrick2", type = "l", lwd = 4) |
|
|
polygon(c(seq(1,6,1), rev(seq(1,6,1))), |
|
|
c(p_m1_e2ss_iss_lib_cnt@est[1:6,2], rev(p_m1_e2ss_iss_lib_cnt@est[1:6,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,6,1), rev(seq(1,6,1))), |
|
|
c(p_m1_e2ss_iss_con_cnt@est[1:6,2], rev(p_m1_e2ss_iss_con_cnt@est[1:6,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,7), ylim = c(-1, 1), |
|
|
xlab = "Ideology", |
|
|
ylab = "Sample Size is Sufficient (in SDs)", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:7, p_m1_e2ss_ideo_lib_cnt@est[1:7,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:7, p_m1_e2ss_ideo_con_cnt@est[1:7,1], pch = 15, |
|
|
col = "firebrick2", type = "l", lwd = 4) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2ss_ideo_lib_cnt@est[1:7,2], rev(p_m1_e2ss_ideo_lib_cnt@est[1:7,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2ss_ideo_con_cnt@est[1:7,2], rev(p_m1_e2ss_ideo_con_cnt@est[1:7,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
mtext("Sample Size is Sufficient (in SDs)", side = 2, outer = T, padj = -2, cex = 1.7) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,7), ylim = c(-1, 1), |
|
|
xlab = "Party ID", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:7, p_m1_e2ss_pid_lib_cnt@est[1:7,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:7, p_m1_e2ss_pid_con_cnt@est[1:7,1], pch = 15, |
|
|
col = "firebrick2", type = "l", lwd = 4) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2ss_pid_lib_cnt@est[1:7,2], rev(p_m1_e2ss_pid_lib_cnt@est[1:7,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2ss_pid_con_cnt@est[1:7,2], rev(p_m1_e2ss_pid_con_cnt@est[1:7,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_c_asym_3.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,5,1,0), mar = c(4.1,1,1.1,1)) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,6), ylim = c(-1, 1), |
|
|
xlab = "Issue Position", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:6, p_m1_e2cc_iss_lib_cnt@est[1:6,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:6, p_m1_e2cc_iss_con_cnt@est[1:6,1], pch = 15, |
|
|
col = "firebrick2", type = "l", lwd = 4) |
|
|
polygon(c(seq(1,6,1), rev(seq(1,6,1))), |
|
|
c(p_m1_e2cc_iss_lib_cnt@est[1:6,2], rev(p_m1_e2cc_iss_lib_cnt@est[1:6,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,6,1), rev(seq(1,6,1))), |
|
|
c(p_m1_e2cc_iss_con_cnt@est[1:6,2], rev(p_m1_e2cc_iss_con_cnt@est[1:6,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,7), ylim = c(-1, 1), |
|
|
xlab = "Ideology", |
|
|
ylab = "Can Make Causal Claim (in SDs)", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:7, p_m1_e2cc_ideo_lib_cnt@est[1:7,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:7, p_m1_e2cc_ideo_con_cnt@est[1:7,1], pch = 15, |
|
|
col = "firebrick2", type = "l", lwd = 4) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2cc_ideo_lib_cnt@est[1:7,2], rev(p_m1_e2cc_ideo_lib_cnt@est[1:7,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2cc_ideo_con_cnt@est[1:7,2], rev(p_m1_e2cc_ideo_con_cnt@est[1:7,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
mtext("Can Make Causal Claim (in SDs)", side = 2, outer = T, padj = -2, cex = 1.7) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(1,7), ylim = c(-1, 1), |
|
|
xlab = "Party ID", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7) |
|
|
points(1:7, p_m1_e2cc_pid_lib_cnt@est[1:7,1], pch = 16, |
|
|
col = "deepskyblue3", lty = 2, type = "l", lwd = 4) |
|
|
points(1:7, p_m1_e2cc_pid_con_cnt@est[1:7,1], pch = 15, |
|
|
col = "firebrick2", type = "l", lwd = 4) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2cc_pid_lib_cnt@est[1:7,2], rev(p_m1_e2cc_pid_lib_cnt@est[1:7,3])), |
|
|
col= adjustcolor("deepskyblue3", .1), border=NA) |
|
|
polygon(c(seq(1,7,1), rev(seq(1,7,1))), |
|
|
c(p_m1_e2cc_pid_con_cnt@est[1:7,2], rev(p_m1_e2cc_pid_con_cnt@est[1:7,3])), |
|
|
col= adjustcolor("firebrick2", .1), border=NA) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/lucid_u_c_asym_4.pdf", height = 6, width = 8) |
|
|
par(mfrow = c(1,3), oma = c(.1,6,1,0), mar = c(4.1,1,1.1,1), xpd = NA) |
|
|
|
|
|
x_vals <- c(1,3,5) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(0,7), ylim = c(-1,1), |
|
|
xlab = "Evidence Interpretation", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7, xaxt = "n") |
|
|
|
|
|
points(x_vals, dtbl_cnt$mean[1:3], pch = c(15, 16, 17), |
|
|
cex = 4) |
|
|
segments(x0 = x_vals, x1 = x_vals, |
|
|
y0 = dtbl_cnt$ci.lo[1:3], y1 = dtbl_cnt$ci.hi[1:3], |
|
|
lwd = 5, col = makeTransparent("black", 150)) |
|
|
|
|
|
mtext("(Conservative - Liberal)", side = 2, outer = T, padj = -1.8, cex = 1.7) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(0,7), ylim = c(-1,1), |
|
|
xlab = "Sample Size", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7, yaxt = "n", xaxt = "n") |
|
|
|
|
|
points(x_vals, dtbl_cnt$mean[4:6], pch = c(15, 16, 17), |
|
|
cex = 4) |
|
|
segments(x0 = x_vals, x1 = x_vals, |
|
|
y0 = dtbl_cnt$ci.lo[4:6], y1 = dtbl_cnt$ci.hi[4:6], |
|
|
lwd = 5, col = makeTransparent("black", 150)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", |
|
|
xlim = c(0,7), ylim = c(-1,1), |
|
|
xlab = "Causality", |
|
|
ylab = "", cex.lab = 2, cex.axis = 1.7, yaxt = "n", xaxt = "n") |
|
|
|
|
|
points(x_vals, dtbl_cnt$mean[7:9], pch = c(15, 16, 17), |
|
|
cex = 4) |
|
|
segments(x0 = x_vals, x1 = x_vals, |
|
|
y0 = dtbl_cnt$ci.lo[7:9], y1 = dtbl_cnt$ci.hi[7:9], |
|
|
lwd = 5, col = makeTransparent("black", 150) ) |
|
|
|
|
|
|
|
|
axis(1, at = -17:6, lwd.tick=0, labels=FALSE) |
|
|
|
|
|
segments(x0 = -17, x1 = -17, |
|
|
y0 = -1.08, y1 = -1.12) |
|
|
segments(x0 = 6, x1 = 6, |
|
|
y0 = -1.08, y1 = -1.12) |
|
|
|
|
|
|
|
|
segments(x0 = -17.5, x1 = 6, |
|
|
y0 = 0, y1 = 0, lty = 2) |
|
|
|
|
|
legend("topright", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
bty = "n", cex = 3) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These models use NFC as a measure of openness. In the next section we run identical models using the Trait Index instead. |
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m2a_e1_iss <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_congenial_issue_binary*pol_id.s + |
|
|
exp1_congenial_issue_binary*nfc_mean.s + |
|
|
exp1_congenial_issue_binary*numeracy.s + |
|
|
exp1_congenial_issue_binary*pk_mean.s", |
|
|
keepers = m2_e1_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2a_e1_ideo <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_congenial_ideo_binary*pol_id.s + |
|
|
exp1_congenial_ideo_binary*nfc_mean.s + |
|
|
exp1_congenial_ideo_binary*numeracy.s + |
|
|
exp1_congenial_ideo_binary*pk_mean.s", |
|
|
keepers = m2_e1_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2a_e1_pid <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_congenial_pid_binary*huddy_id.s + |
|
|
exp1_congenial_pid_binary*nfc_mean.s + |
|
|
exp1_congenial_pid_binary*numeracy.s + |
|
|
exp1_congenial_pid_binary*pk_mean.s", |
|
|
keepers = m2_e1_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m2a_e2ss_iss <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_congenial_issue_binary*pol_id.s + |
|
|
exp2_congenial_issue_binary*nfc_mean.s + |
|
|
exp2_congenial_issue_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2a_e2ss_ideo <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_congenial_ideo_binary*pol_id.s + |
|
|
exp2_congenial_ideo_binary*nfc_mean.s + |
|
|
exp2_congenial_ideo_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2a_e2ss_pid <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_congenial_pid_binary*huddy_id.s + |
|
|
exp2_congenial_pid_binary*nfc_mean.s + |
|
|
exp2_congenial_pid_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m2a_e2cc_iss <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_congenial_issue_binary*pol_id.s + |
|
|
exp2_congenial_issue_binary*nfc_mean.s + |
|
|
exp2_congenial_issue_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2a_e2cc_ideo <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_congenial_ideo_binary*pol_id.s + |
|
|
exp2_congenial_ideo_binary*nfc_mean.s + |
|
|
exp2_congenial_ideo_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2a_e2cc_pid <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_congenial_pid_binary*huddy_id.s + |
|
|
exp2_congenial_pid_binary*nfc_mean.s + |
|
|
exp2_congenial_pid_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
In these models we subsitute the Openness Trait Index for NFC. |
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m2b_e1_iss <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_congenial_issue_binary*pol_id.s + |
|
|
exp1_congenial_issue_binary*trait_index.s + |
|
|
exp1_congenial_issue_binary*numeracy.s + |
|
|
exp1_congenial_issue_binary*pk_mean.s", |
|
|
keepers = m2_e1_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2b_e1_ideo <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_congenial_ideo_binary*pol_id.s + |
|
|
exp1_congenial_ideo_binary*trait_index.s + |
|
|
exp1_congenial_ideo_binary*numeracy.s + |
|
|
exp1_congenial_ideo_binary*pk_mean.s", |
|
|
keepers = m2_e1_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2b_e1_pid <- quick_glm(outcome = "exp1_correct", |
|
|
new = "exp1_congenial_pid_binary*huddy_id.s + |
|
|
exp1_congenial_pid_binary*trait_index.s + |
|
|
exp1_congenial_pid_binary*numeracy.s + |
|
|
exp1_congenial_pid_binary*pk_mean.s", |
|
|
keepers = m2_e1_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m2b_e2ss_iss <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_congenial_issue_binary*pol_id.s + |
|
|
exp2_congenial_issue_binary*trait_index.s + |
|
|
exp2_congenial_issue_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2b_e2ss_ideo <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_congenial_ideo_binary*pol_id.s + |
|
|
exp2_congenial_ideo_binary*trait_index.s + |
|
|
exp2_congenial_ideo_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2b_e2ss_pid <- quick_lm(outcome = "exp2_goodSample", |
|
|
new = "exp2_congenial_pid_binary*huddy_id.s + |
|
|
exp2_congenial_pid_binary*trait_index.s + |
|
|
exp2_congenial_pid_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m2b_e2cc_iss <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_congenial_issue_binary*pol_id.s + |
|
|
exp2_congenial_issue_binary*trait_index.s + |
|
|
exp2_congenial_issue_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2b_e2cc_ideo <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_congenial_ideo_binary*pol_id.s + |
|
|
exp2_congenial_ideo_binary*trait_index.s + |
|
|
exp2_congenial_ideo_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
|
|
|
m2b_e2cc_pid <- quick_lm(outcome = "exp2_goodCausal", |
|
|
new = "exp2_congenial_pid_binary*huddy_id.s + |
|
|
exp2_congenial_pid_binary*trait_index.s + |
|
|
exp2_congenial_pid_binary*pk_mean.s", |
|
|
keepers = m2_e2_controls, |
|
|
data = data) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
rownames <- c("m2a_e1_iss", "m2a_e1_ideo", "m2a_e1_pid", |
|
|
"m2a_e2ss_iss", "m2a_e2ss_ideo", "m2a_e2ss_pid", |
|
|
"m2a_e2cc_iss", "m2a_e2cc_ideo", "m2a_e2cc_pid") |
|
|
|
|
|
nfc_bin <- rbind( |
|
|
as.data.frame(summary(m2a_e1_iss)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2a_e1_ideo)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2a_e1_pid)$coef)[21,1:2], |
|
|
|
|
|
as.data.frame(summary(m2a_e2ss_iss)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2a_e2ss_ideo)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2a_e2ss_pid)$coef)[20,1:2], |
|
|
|
|
|
as.data.frame(summary(m2a_e2cc_iss)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2a_e2cc_ideo)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2a_e2cc_pid)$coef)[20,1:2] |
|
|
) |
|
|
|
|
|
ti_bin <- rbind( |
|
|
as.data.frame(summary(m2b_e1_iss)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2b_e1_ideo)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2b_e1_pid)$coef)[21,1:2], |
|
|
|
|
|
as.data.frame(summary(m2b_e2ss_iss)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2b_e2ss_ideo)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2b_e2ss_pid)$coef)[20,1:2], |
|
|
|
|
|
as.data.frame(summary(m2b_e2cc_iss)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2b_e2cc_ideo)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2b_e2cc_pid)$coef)[20,1:2] |
|
|
) |
|
|
|
|
|
id_bin <- rbind( |
|
|
as.data.frame(summary(m2a_e1_iss)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2a_e1_ideo)$coef)[20,1:2], |
|
|
as.data.frame(summary(m2a_e1_pid)$coef)[20,1:2], |
|
|
|
|
|
as.data.frame(summary(m2a_e2ss_iss)$coef)[19,1:2], |
|
|
as.data.frame(summary(m2a_e2ss_ideo)$coef)[19,1:2], |
|
|
as.data.frame(summary(m2a_e2ss_pid)$coef)[19,1:2], |
|
|
|
|
|
as.data.frame(summary(m2a_e2cc_iss)$coef)[19,1:2], |
|
|
as.data.frame(summary(m2a_e2cc_ideo)$coef)[19,1:2], |
|
|
as.data.frame(summary(m2a_e2cc_pid)$coef)[19,1:2] |
|
|
) |
|
|
|
|
|
pk_bin <- rbind( |
|
|
as.data.frame(summary(m2a_e1_iss)$coef)[23,1:2], |
|
|
as.data.frame(summary(m2a_e1_ideo)$coef)[23,1:2], |
|
|
as.data.frame(summary(m2a_e1_pid)$coef)[23,1:2], |
|
|
|
|
|
as.data.frame(summary(m2a_e2ss_iss)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2a_e2ss_ideo)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2a_e2ss_pid)$coef)[21,1:2], |
|
|
|
|
|
as.data.frame(summary(m2a_e2cc_iss)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2a_e2cc_ideo)$coef)[21,1:2], |
|
|
as.data.frame(summary(m2a_e2cc_pid)$coef)[21,1:2] |
|
|
) |
|
|
|
|
|
num_bin <- rbind( |
|
|
as.data.frame(summary(m2a_e1_iss)$coef)[22,1:2], |
|
|
as.data.frame(summary(m2a_e1_ideo)$coef)[22,1:2], |
|
|
as.data.frame(summary(m2a_e1_pid)$coef)[22,1:2] |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/nfc_openness_b_2way.pdf", height = 4, width = 8) |
|
|
|
|
|
par(mfrow = c(2,3), pch = 16, mar = c(0,2,1,0), oma = c(.5,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Evidence Interpretation") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = nfc_bin[1:3, 1] + 1.96*nfc_bin[1:3,2], |
|
|
y1 = nfc_bin[1:3, 1] - 1.96*nfc_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, nfc_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Need for Closure", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Sample Size") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = nfc_bin[4:6, 1] + 1.96*nfc_bin[4:6,2], |
|
|
y1 = nfc_bin[4:6, 1] - 1.96*nfc_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, nfc_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Causality") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = nfc_bin[7:9, 1] + 1.96*nfc_bin[7:9,2], |
|
|
y1 = nfc_bin[7:9, 1] - 1.96*nfc_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, nfc_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = ti_bin[1:3, 1] + 1.96*ti_bin[1:3,2], |
|
|
y1 = ti_bin[1:3, 1] - 1.96*ti_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, ti_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Openness Index", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = ti_bin[4:6, 1] + 1.96*ti_bin[4:6,2], |
|
|
y1 = ti_bin[4:6, 1] - 1.96*ti_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, ti_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
legend("bottom", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =1.5, ncol = 3, xpd = NA) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = ti_bin[7:9, 1] + 1.96*ti_bin[7:9,2], |
|
|
y1 = ti_bin[7:9, 1] - 1.96*ti_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, ti_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/identity_b_2way.pdf", height = 4, width = 8) |
|
|
|
|
|
par(mfrow = c(1,3), pch = 16, mar = c(0,2,1,0), oma = c(.5,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Evidence Interpretation") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = id_bin[1:3, 1] + 1.96*id_bin[1:3,2], |
|
|
y1 = id_bin[1:3, 1] - 1.96*id_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, id_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Identity", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Sample Size") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = id_bin[4:6, 1] + 1.96*id_bin[4:6,2], |
|
|
y1 = id_bin[4:6, 1] - 1.96*id_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, id_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
legend("bottom", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =1.5, ncol = 3, xpd = NA) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Causality") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = id_bin[7:9, 1] + 1.96*id_bin[7:9,2], |
|
|
y1 = id_bin[7:9, 1] - 1.96*id_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, id_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/pk_b_2way.pdf", height = 4, width = 8) |
|
|
|
|
|
par(mfrow = c(1,3), pch = 16, mar = c(0,2,1,0), oma = c(.5,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Evidence Interpretation") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = pk_bin[1:3, 1] + 1.96*pk_bin[1:3,2], |
|
|
y1 = pk_bin[1:3, 1] - 1.96*pk_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, pk_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Political Knowledge", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Sample Size") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = pk_bin[4:6, 1] + 1.96*pk_bin[4:6,2], |
|
|
y1 = pk_bin[4:6, 1] - 1.96*pk_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, pk_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
legend("bottom", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =1.5, ncol = 3, xpd = NA) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Causality") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = pk_bin[7:9, 1] + 1.96*pk_bin[7:9,2], |
|
|
y1 = pk_bin[7:9, 1] - 1.96*pk_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, pk_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/numeracy_b_2way.pdf", height = 4, width = 8) |
|
|
|
|
|
par(mfrow = c(1,1), pch = 16, mar = c(0,2,1,0), oma = c(.5,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Evidence Interpretation") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = num_bin[1:3, 1] + 1.96*num_bin[1:3,2], |
|
|
y1 = num_bin[1:3, 1] - 1.96*num_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, num_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Numeracy", side = 2, padj = -5) |
|
|
|
|
|
legend("bottom", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =1.5, ncol = 3, xpd = NA) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/pk_numeracy_b_2way.pdf", height = 4, width = 8) |
|
|
|
|
|
|
|
|
par(mfrow = c(1,3), pch = 16, mar = c(0,2,1,0), oma = c(2,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.4,.7), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Evidence Interpretation") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = pk_bin[1:3, 1] + 1.96*pk_bin[1:3,2], |
|
|
y1 = pk_bin[1:3, 1] - 1.96*pk_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, pk_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
num_adj <- .25 |
|
|
alpha_level <- 150 |
|
|
segments(x0 = 1:3 + num_adj, x1 = 1:3 + num_adj, |
|
|
y0 = num_bin[1:3, 1] + 1.96*num_bin[1:3,2], |
|
|
y1 = num_bin[1:3, 1] - 1.96*num_bin[1:3,2], |
|
|
lwd = 3, col = makeTransparent("gray40", alpha_level)) |
|
|
points(1:3 + num_adj, num_bin[1:3 + num_adj,1], cex = 2, pch = c(15, 16, 17), |
|
|
col = makeTransparent("black", alpha_level)) |
|
|
|
|
|
axis(2, at = seq(-.4, .7, .20), labels = seq(-.4, .7, .20)) |
|
|
mtext(text = "Expertise", side = 2, padj = -5) |
|
|
|
|
|
legend(.8, -.25, legend = c("Political Knowledge", "Numeracy"), |
|
|
pch = c(15), col = c("black", makeTransparent("black", |
|
|
alpha_level)), |
|
|
cex = 1.5, ncol = 1, xpd = NA, pt.cex = 2, bty = "n") |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.4,.7), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Sample Size") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = pk_bin[4:6, 1] + 1.96*pk_bin[4:6,2], |
|
|
y1 = pk_bin[4:6, 1] - 1.96*pk_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, pk_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
legend(.5, -.3, legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =1.5, ncol = 3, xpd = NA) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.4,.7), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Causality") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = pk_bin[7:9, 1] + 1.96*pk_bin[7:9,2], |
|
|
y1 = pk_bin[7:9, 1] - 1.96*pk_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, pk_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
dev.off() |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r warning = F, echo = F, message = F, include = T} |
|
|
|
|
|
data$ideo3 <- ifelse(data$ideo7 < 4, "Liberal", |
|
|
ifelse(data$ideo7 == 4, "Moderate", |
|
|
ifelse(data$ideo7 > 3, "Conservative", NA))) |
|
|
|
|
|
par(mfrow = c(2, 1)) |
|
|
|
|
|
|
|
|
plot(density(data$nfc_mean.s, na.rm=T), main = "Ideological Differences in NFC", |
|
|
xlim = c(-4, 4)) |
|
|
points(density(data$nfc_mean.s[data$ideo3 == "Liberal"], na.rm=T), col = "blue") |
|
|
points(density(data$nfc_mean.s[data$ideo3 == "Conservative"], na.rm=T), col = "red") |
|
|
abline(v = mean(data$nfc_mean.s[data$ideo3 == "Liberal"], na.rm=T), col = "blue") |
|
|
abline(v = mean(data$nfc_mean.s[data$ideo3 == "Conservative"], na.rm=T), col = "red") |
|
|
|
|
|
|
|
|
|
|
|
plot(density(data$trait_index.s, na.rm=T), main = "Ideological Differences in Trait Index", |
|
|
xlim = c(-4, 4)) |
|
|
points(density(data$trait_index.s[data$ideo3 == "Liberal"], na.rm=T), col = "blue") |
|
|
points(density(data$trait_index.s[data$ideo3 == "Conservative"], na.rm=T), col = "red") |
|
|
abline(v = mean(data$trait_index.s[data$ideo3 == "Liberal"], na.rm=T), col = "blue") |
|
|
abline(v = mean(data$trait_index.s[data$ideo3 == "Conservative"], na.rm=T), col = "red") |
|
|
|
|
|
nfc_diff <- |
|
|
data %>% |
|
|
dplyr::group_by(ideo7) %>% |
|
|
dplyr::summarize(mean = mean(nfc_mean.s, na.rm=T), |
|
|
se = std_error(nfc_mean.s)) %>% |
|
|
na.omit() %>% |
|
|
ggplot(aes(x = ideo7, y = mean)) + |
|
|
coord_cartesian(ylim = c(-1, 1)) + |
|
|
geom_point() + |
|
|
geom_segment(aes(x = ideo7, xend = ideo7, |
|
|
y = mean - 1.96*se, yend = mean + 1.96*se)) + |
|
|
labs(x = "Ideology (Liberal to Conservative)", |
|
|
y= "Mean Need for Closure (in SDs)") + |
|
|
theme_bw() |
|
|
|
|
|
ggsave("lucid_figures/nfc_diff.pdf", nfc_diff, width = 6, height = 4) |
|
|
|
|
|
ti_diff <- |
|
|
data %>% |
|
|
dplyr::group_by(ideo7) %>% |
|
|
dplyr::summarize(mean = mean(trait_index.s, na.rm=T), |
|
|
se = std_error(trait_index.s)) %>% |
|
|
na.omit() %>% |
|
|
ggplot(aes(x = ideo7, y = mean)) + |
|
|
coord_cartesian(ylim = c(-1, 1)) + |
|
|
geom_point() + |
|
|
geom_segment(aes(x = ideo7, xend = ideo7, |
|
|
y = mean - 1.96*se, yend = mean + 1.96*se)) + |
|
|
labs(x = "Ideology (Liberal to Conservative)", |
|
|
y = "Openness Trait Index (in SDs)") + |
|
|
theme_bw() |
|
|
|
|
|
ggsave("lucid_figures/ti_diff.pdf", ti_diff, width = 6, height = 4) |
|
|
|
|
|
cor(data$nfc_mean, data$ideo7, use = "complete.obs") |
|
|
cor(data$trait_index, data$ideo7, use = "complete.obs") |
|
|
|
|
|
cor(data$nfc_mean, data$pid7, use = "complete.obs") |
|
|
cor(data$trait_index, data$pid7, use = "complete.obs") |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$exp2_goodSample_01 <- rescale_01(data$exp2_goodSample_uns, max = 7) |
|
|
|
|
|
|
|
|
data$exp2_goodCausal_01 <- rescale_01(data$exp2_goodCausal_uns, max = 7) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data$id <- 1:nrow(data) |
|
|
|
|
|
keep_vars <- c("id", "exp1_correct", "exp2_goodSample_01", "exp2_goodCausal_01", |
|
|
"exp1_congenial_issue_binary", "exp1_congenial_ideo_binary", |
|
|
"exp1_congenial_pid_binary", "exp1_congenial_issue_cont.s", |
|
|
"exp1_congenial_ideo_cont.s", "exp1_congenial_pid_cont.s", |
|
|
"pol_id.s", "huddy_id.s", "nfc_mean.s", "numeracy.s", |
|
|
"pk_mean.s", "age.s", "female", "edu_hs", "edu_somecollege", |
|
|
"edu_college", "edu_grad", "hispanic", "nonhisp_black", |
|
|
"income.s", "exp1_issue", "exp2_issue") |
|
|
|
|
|
|
|
|
new <- rbind(data, data, data) |
|
|
new$out_num <- c(rep( "e1", nrow(data)), |
|
|
rep ("e2ss", nrow(data)), |
|
|
rep ("e2cc", nrow(data))) |
|
|
|
|
|
|
|
|
new$outcome <- NA |
|
|
new$outcome[new$out_num == "e1"] <- new$exp1_correct[new$out_num == "e1"] |
|
|
new$outcome[new$out_num == "e2ss"] <- new$exp2_goodSample_01[new$out_num == "e2ss"] |
|
|
new$outcome[new$out_num == "e2cc"] <- new$exp2_goodCausal_01[new$out_num == "e2cc"] |
|
|
|
|
|
|
|
|
new$issue <- NA |
|
|
new$issue[new$out_num == "e1"] <- new$exp1_issue[new$out_num == "e1"] |
|
|
new$issue[new$out_num == "e2ss"] <- new$exp2_issue[new$out_num == "e2ss"] |
|
|
new$issue[new$out_num == "e2cc"] <- new$exp2_issue[new$out_num == "e2cc"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new$congenial_issue_binary <- ifelse(new$out_num == "e1", new$exp1_congenial_issue_binary, |
|
|
new$exp2_congenial_issue_binary) |
|
|
new$congenial_ideo_binary <- ifelse(new$out_num == "e1", new$exp1_congenial_ideo_binary, |
|
|
new$exp2_congenial_ideo_binary) |
|
|
new$congenial_pid_binary <- ifelse(new$out_num == "e1", new$exp1_congenial_pid_binary, |
|
|
new$exp2_congenial_pid_binary) |
|
|
|
|
|
new$congenial_issue_cont.s <- ifelse(new$out_num == "e1", new$exp1_congenial_issue_cont.s, |
|
|
new$exp2_congenial_issue_cont.s) |
|
|
new$congenial_ideo_cont.s <- ifelse(new$out_num == "e1", new$exp1_congenial_ideo_cont.s, |
|
|
new$exp2_congenial_ideo_cont.s) |
|
|
new$congenial_pid_cont.s <- ifelse(new$out_num == "e1", new$exp1_congenial_pid_cont.s, |
|
|
new$exp2_congenial_pid_cont.s) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pooled_a_iss_robust <- |
|
|
lm_robust(outcome ~ congenial_issue_binary*nfc_mean.s + |
|
|
congenial_issue_binary*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new, clusters = id) |
|
|
|
|
|
|
|
|
pooled_a_ideo_robust <- |
|
|
lm_robust(outcome ~ congenial_ideo_binary*nfc_mean.s + |
|
|
congenial_ideo_binary*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new, clusters = id) |
|
|
|
|
|
|
|
|
pooled_a_pid_robust <- |
|
|
lm_robust(outcome ~ congenial_pid_binary*nfc_mean.s + |
|
|
congenial_pid_binary*huddy_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new, clusters = id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pooled_b_iss_robust <- |
|
|
lm_robust(outcome ~ congenial_issue_cont.s*nfc_mean.s + |
|
|
congenial_issue_cont.s*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new, clusters = id) |
|
|
|
|
|
|
|
|
pooled_b_ideo_robust <- |
|
|
lm_robust(outcome ~ congenial_ideo_cont.s*nfc_mean.s + |
|
|
congenial_ideo_cont.s*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new, clusters = id) |
|
|
|
|
|
|
|
|
pooled_b_pid_robust <- |
|
|
lm_robust(outcome ~ congenial_pid_cont.s*nfc_mean.s + |
|
|
congenial_pid_cont.s*huddy_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new, clusters = id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pooled_c_iss_robust <- |
|
|
lm_robust(outcome ~ congenial_issue_binary*nfc_mean.s + |
|
|
congenial_issue_binary*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new[new$out_num != "e1",], clusters = id) |
|
|
|
|
|
|
|
|
pooled_c_ideo_robust <- |
|
|
lm_robust(outcome ~ congenial_ideo_binary*nfc_mean.s + |
|
|
congenial_ideo_binary*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new[new$out_num != "e1",], clusters = id) |
|
|
|
|
|
|
|
|
pooled_c_pid_robust <- |
|
|
lm_robust(outcome ~ congenial_pid_binary*nfc_mean.s + |
|
|
congenial_pid_binary*huddy_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new[new$out_num != "e1",], clusters = id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pooled_d_iss_robust <- |
|
|
lm_robust(outcome ~ congenial_issue_cont.s*nfc_mean.s + |
|
|
congenial_issue_cont.s*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new[new$out_num != "e1",], clusters = id) |
|
|
|
|
|
|
|
|
pooled_d_ideo_robust <- |
|
|
lm_robust(outcome ~ congenial_ideo_cont.s*nfc_mean.s + |
|
|
congenial_ideo_cont.s*pol_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new[new$out_num != "e1",], clusters = id) |
|
|
|
|
|
|
|
|
pooled_d_pid_robust <- |
|
|
lm_robust(outcome ~ congenial_pid_cont.s*nfc_mean.s + |
|
|
congenial_pid_cont.s*huddy_id.s*pk_mean.s + |
|
|
age.s + female + edu_hs + edu_somecollege + edu_college + |
|
|
edu_grad + hispanic + nonhisp_black + income.s + issue, |
|
|
data = new[new$out_num != "e1",], clusters = id) |
|
|
|
|
|
summary(pooled_d_iss_robust) |
|
|
summary(pooled_d_ideo_robust) |
|
|
summary(pooled_d_pid_robust) |
|
|
|
|
|
|
|
|
tidy(pooled_a_iss_robust)[23, c("term", "estimate", "std.error")] |
|
|
tidy(pooled_a_ideo_robust)[23, c("term", "estimate", "std.error")] |
|
|
tidy(pooled_a_pid_robust)[23, c("term", "estimate", "std.error")] |
|
|
|
|
|
tidy(pooled_b_iss_robust)[23,c("term", "estimate", "std.error")] |
|
|
tidy(pooled_b_ideo_robust)[23,c("term", "estimate", "std.error")] |
|
|
tidy(pooled_b_pid_robust)[23,c("term", "estimate", "std.error")] |
|
|
|
|
|
tidy(pooled_c_iss_robust)[23,c("term", "estimate", "std.error")] |
|
|
tidy(pooled_c_ideo_robust)[23,c("term", "estimate", "std.error")] |
|
|
tidy(pooled_c_pid_robust)[23,c("term", "estimate", "std.error")] |
|
|
|
|
|
tidy(pooled_d_iss_robust)[23,c("term", "estimate", "std.error")] |
|
|
tidy(pooled_d_ideo_robust)[23,c("term", "estimate", "std.error")] |
|
|
tidy(pooled_d_pid_robust)[23,c("term", "estimate", "std.error")] |
|
|
|
|
|
r1_pooled_bin <- rbind( |
|
|
tidy(pooled_a_iss_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_a_ideo_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_a_pid_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_b_iss_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_b_ideo_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_b_pid_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_c_iss_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_c_ideo_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_c_pid_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_d_iss_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_d_ideo_robust)[23,c("term", "estimate", "std.error")], |
|
|
tidy(pooled_d_pid_robust)[23,c("term", "estimate", "std.error")]) |
|
|
|
|
|
r1_pooled_bin$model <- c(rep("a",3), rep("b",3), rep("c",3), rep("d",3)) |
|
|
r1_pooled_bin$measure <- rep(c("iss", "ideo", "pid"), 4) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/rr_3way_pooled.pdf", height = 4, width = 8) |
|
|
|
|
|
|
|
|
par(mfrow = c(2,1), pch = 16, mar = c(1,2,1,0), oma = c(.5,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.1,.1), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "3 Pooled Outcomes (Experiments 1 & 2)") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
|
|
|
|
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_pooled_bin[r1_pooled_bin$model == "a", 2] + |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
y1 = r1_pooled_bin[r1_pooled_bin$model == "a", 2] - |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_pooled_bin[r1_pooled_bin$model == "a", 2], cex = 1, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
segments(x0 = 1.2:3.2, x1 = 1.2:3.2, |
|
|
y0 = r1_pooled_bin[r1_pooled_bin$model == "b", 2] + |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
y1 = r1_pooled_bin[r1_pooled_bin$model == "b", 2] - |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1.2:3.2, r1_pooled_bin[r1_pooled_bin$model == "b", 2], |
|
|
cex = 1, pch = c(0, 1, 2)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Cong. X PK X ID", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.1,.1), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "2 Pooled Outcomes (Experiment 2 Only)") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
|
|
|
|
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_pooled_bin[r1_pooled_bin$model == "c", 2] + |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
y1 = r1_pooled_bin[r1_pooled_bin$model == "c", 2] - |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_pooled_bin[r1_pooled_bin$model == "c", 2], cex = 1, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
segments(x0 = 1.2:3.2, x1 = 1.2:3.2, |
|
|
y0 = r1_pooled_bin[r1_pooled_bin$model == "d", 2] + |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
y1 = r1_pooled_bin[r1_pooled_bin$model == "d", 2] - |
|
|
1.96*r1_pooled_bin[1:3,3], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1.2:3.2, r1_pooled_bin[r1_pooled_bin$model == "d", 2], |
|
|
cex = 1, pch = c(0, 1, 2)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Cong. X PK X ID", side = 2, padj = -5) |
|
|
|
|
|
legend(x = .6, y = -.09, legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =.7, ncol = 3, xpd = NA) |
|
|
|
|
|
legend(x = 2.5, y = -.08, legend = c("Binary Congeniality Measure", |
|
|
"Continuous Congeniality Measure"), |
|
|
pch = c(16, 1), |
|
|
cex =.7, ncol = 1, xpd = NA) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1_nfc_e1_iss <- glm(exp1_correct ~ exp1_congenial_issue_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e1_iss) |
|
|
|
|
|
|
|
|
r1_nfc_e1_ideo <- glm(exp1_correct ~ exp1_congenial_ideo_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e1_ideo) |
|
|
|
|
|
|
|
|
r1_nfc_e1_pid <- glm(exp1_correct ~ exp1_congenial_pid_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e1_pid) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1_nfc_e2ss_iss <- glm(exp2_goodSample ~ exp2_congenial_issue_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e2ss_iss) |
|
|
|
|
|
|
|
|
r1_nfc_e2ss_ideo <- glm(exp2_goodSample ~ exp2_congenial_ideo_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e2ss_ideo) |
|
|
|
|
|
|
|
|
r1_nfc_e2ss_pid <- glm(exp2_goodSample ~ exp2_congenial_pid_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e2ss_pid) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1_nfc_e2cc_iss <- glm(exp2_goodCausal ~ exp2_congenial_issue_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e2cc_iss) |
|
|
|
|
|
|
|
|
r1_nfc_e2cc_ideo <- glm(exp2_goodCausal ~ exp2_congenial_ideo_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e2cc_ideo) |
|
|
|
|
|
|
|
|
r1_nfc_e2cc_pid <- glm(exp2_goodCausal ~ exp2_congenial_pid_binary*nfc_mean.s, |
|
|
data = data) |
|
|
summary(r1_nfc_e2cc_pid) |
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1_ti_e1_iss <- glm(exp1_correct ~ exp1_congenial_issue_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e1_iss) |
|
|
|
|
|
|
|
|
r1_ti_e1_ideo <- glm(exp1_correct ~ exp1_congenial_ideo_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e1_ideo) |
|
|
|
|
|
|
|
|
r1_ti_e1_pid <- glm(exp1_correct ~ exp1_congenial_pid_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e1_pid) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1_ti_e2ss_iss <- glm(exp2_goodSample ~ exp2_congenial_issue_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e2ss_iss) |
|
|
|
|
|
|
|
|
r1_ti_e2ss_ideo <- glm(exp2_goodSample ~ exp2_congenial_ideo_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e2ss_ideo) |
|
|
|
|
|
|
|
|
r1_ti_e2ss_pid <- glm(exp2_goodSample ~ exp2_congenial_pid_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e2ss_pid) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r1_ti_e2cc_iss <- glm(exp2_goodCausal ~ exp2_congenial_issue_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e2cc_iss) |
|
|
|
|
|
|
|
|
r1_ti_e2cc_ideo <- glm(exp2_goodCausal ~ exp2_congenial_ideo_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e2cc_ideo) |
|
|
|
|
|
|
|
|
r1_ti_e2cc_pid <- glm(exp2_goodCausal ~ exp2_congenial_pid_binary*trait_index.s, |
|
|
data = data) |
|
|
summary(r1_ti_e2cc_pid) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
```{r} |
|
|
|
|
|
rownames <- c("r1_nfc_e1_iss", "r1_nfc_e1_ideo", "r1_nfc_e1_pid", |
|
|
"r1_nfc_e2ss_iss", "r1_nfc_e2ss_ideo", "r1_nfc_e2ss_pid", |
|
|
"r1_nfc_e2cc_iss", "r1_nfc_e2cc_ideo", "r1_nfc_e2cc_pid") |
|
|
|
|
|
r1_nfc_bin <- rbind( |
|
|
as.data.frame(summary(r1_nfc_e1_iss)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_nfc_e1_ideo)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_nfc_e1_pid)$coef)[4,1:2], |
|
|
|
|
|
as.data.frame(summary(r1_nfc_e2ss_iss)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_nfc_e2ss_ideo)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_nfc_e2ss_pid)$coef)[4,1:2], |
|
|
|
|
|
as.data.frame(summary(r1_nfc_e2cc_iss)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_nfc_e2cc_ideo)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_nfc_e2cc_pid)$coef)[4,1:2] |
|
|
) |
|
|
|
|
|
r1_ti_bin <- rbind( |
|
|
as.data.frame(summary(r1_ti_e1_iss)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_ti_e1_ideo)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_ti_e1_pid)$coef)[4,1:2], |
|
|
|
|
|
as.data.frame(summary(r1_ti_e2ss_iss)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_ti_e2ss_ideo)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_ti_e2ss_pid)$coef)[4,1:2], |
|
|
|
|
|
as.data.frame(summary(r1_ti_e2cc_iss)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_ti_e2cc_ideo)$coef)[4,1:2], |
|
|
as.data.frame(summary(r1_ti_e2cc_pid)$coef)[4,1:2] |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pdf("lucid_figures/r1_nfc_b.pdf", height = 4, width = 8) |
|
|
|
|
|
par(mfrow = c(2,3), pch = 16, mar = c(0,2,1,0), oma = c(.5,5,1,0)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Evidence Interpretation") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_nfc_bin[1:3, 1] + 1.96*r1_nfc_bin[1:3,2], |
|
|
y1 = r1_nfc_bin[1:3, 1] - 1.96*r1_nfc_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_nfc_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Need for Closure", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Sample Size") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_nfc_bin[4:6, 1] + 1.96*r1_nfc_bin[4:6,2], |
|
|
y1 = r1_nfc_bin[4:6, 1] - 1.96*r1_nfc_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_nfc_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "Causality") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_nfc_bin[7:9, 1] + 1.96*r1_nfc_bin[7:9,2], |
|
|
y1 = r1_nfc_bin[7:9, 1] - 1.96*r1_nfc_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_nfc_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_ti_bin[1:3, 1] + 1.96*r1_ti_bin[1:3,2], |
|
|
y1 = r1_ti_bin[1:3, 1] - 1.96*r1_ti_bin[1:3,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_ti_bin[1:3,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
axis(2, at = seq(-.4, .4, .10)) |
|
|
mtext(text = "Openness Index", side = 2, padj = -5) |
|
|
|
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_ti_bin[4:6, 1] + 1.96*r1_ti_bin[4:6,2], |
|
|
y1 = r1_ti_bin[4:6, 1] - 1.96*r1_ti_bin[4:6,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_ti_bin[4:6,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
|
|
|
legend("bottom", legend = c("Issue Position", "Ideology" , "Party ID"), |
|
|
pch = c(15, 16, 17), |
|
|
cex =1.5, ncol = 3, xpd = NA) |
|
|
|
|
|
|
|
|
plot(1,1, col = "white", bty = "n", xlim = c(.5,3.5), ylim = c(-.5,.5), |
|
|
xaxt = "n", yaxt = "n", |
|
|
xlab = "", ylab = "", |
|
|
main = "") |
|
|
segments(x0 = .5, x1 = 3.5, |
|
|
y0 = 0, y1 = 0, |
|
|
col = "gray", lty = 2, lwd = 1) |
|
|
segments(x0 = 1:3, x1 = 1:3, |
|
|
y0 = r1_ti_bin[7:9, 1] + 1.96*r1_ti_bin[7:9,2], |
|
|
y1 = r1_ti_bin[7:9, 1] - 1.96*r1_ti_bin[7:9,2], |
|
|
lwd = 3, col = "gray40") |
|
|
points(1:3, r1_ti_bin[7:9,1], cex = 2, pch = c(15, 16, 17)) |
|
|
|
|
|
dev.off() |
|
|
|
|
|
sink() |
|
|
|
|
|
``` |
|
|
|