Commit
·
48d6f9b
1
Parent(s):
3e1c601
11
Browse files- 11/paper.pdf +3 -0
- 11/replication_package/ChangingHearts_GublerEtAl_Appendix_Update.pdf +3 -0
- 11/replication_package/README_Update.txt +3 -0
- 11/replication_package/Replication/Data/.Rapp.history +1 -0
- 11/replication_package/Replication/Data/pretest-1.RData +3 -0
- 11/replication_package/Replication/Data/pretest-1.csv +3 -0
- 11/replication_package/Replication/Data/pretest.RData +3 -0
- 11/replication_package/Replication/Data/pretest.csv +3 -0
- 11/replication_package/Replication/Data/stud01_deID-1.RData +3 -0
- 11/replication_package/Replication/Data/stud01_deID-1.csv +3 -0
- 11/replication_package/Replication/Data/stud01_deID.RData +3 -0
- 11/replication_package/Replication/Data/stud01_deID.csv +3 -0
- 11/replication_package/Replication/Data/stud02_deID-1.csv +3 -0
- 11/replication_package/Replication/Data/stud02_deID.RData +3 -0
- 11/replication_package/Replication/Data/stud02_deID.csv +3 -0
- 11/replication_package/Replication/README.txt +3 -0
- 11/replication_package/Replication/ReplicationScript/.Rhistory +6 -0
- 11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021-1.R +0 -0
- 11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021.R +0 -0
- 11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021_log-1.pdf +3 -0
- 11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021_log.pdf +3 -0
- 11/replication_package/Replication/code_flowchart/appendix_flowchart_study2.R +104 -0
- 11/replication_package/Replication/code_flowchart/stud02_post.csv +3 -0
- 11/replication_package/Replication/code_flowchart/stud02_pre.csv +3 -0
- 11/replication_package/stud02_deID.RData +3 -0
- 11/should_reproduce.txt +3 -0
11/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b878d0b84571eb43255cbd172783f78fc644923f94405060ecefa507fd9f447
|
| 3 |
+
size 597865
|
11/replication_package/ChangingHearts_GublerEtAl_Appendix_Update.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a717b6224a3ea1ce71713aaf4361707e7df253e099ae7ccb59f52fb6483b130e
|
| 3 |
+
size 17251029
|
11/replication_package/README_Update.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7972aff2492ded340851d9b8a42bce97961f50e67c7cdabc8d10dfeccdd1276
|
| 3 |
+
size 2596
|
11/replication_package/Replication/Data/.Rapp.history
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
load("/Users/jrg27/Library/CloudStorage/Dropbox/Karpowitz_Monson_Project/CognitiveDissonance/PapersPresentations/2020Submission/Replication/Data/stud01_deID.RData")
|
11/replication_package/Replication/Data/pretest-1.RData
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7163c336ec26497d23a944fbf466431f4d76bfdc821c094b4e6e23504611f9a
|
| 3 |
+
size 110271
|
11/replication_package/Replication/Data/pretest-1.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5aad2c90740aa9dd2042482cfe8bb4929fe551c5cb82ea1bde774f435367efba
|
| 3 |
+
size 259904
|
11/replication_package/Replication/Data/pretest.RData
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d7163c336ec26497d23a944fbf466431f4d76bfdc821c094b4e6e23504611f9a
|
| 3 |
+
size 110271
|
11/replication_package/Replication/Data/pretest.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5aad2c90740aa9dd2042482cfe8bb4929fe551c5cb82ea1bde774f435367efba
|
| 3 |
+
size 259904
|
11/replication_package/Replication/Data/stud01_deID-1.RData
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:718115e3770c6095ff8c968b7d3386803b7ac90620cc47b45914c809637ba694
|
| 3 |
+
size 629299
|
11/replication_package/Replication/Data/stud01_deID-1.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7914c8d093f53cf3f11baeb18ed3c76f8e5ab5ddebc860fe5831b1408900396
|
| 3 |
+
size 4792995
|
11/replication_package/Replication/Data/stud01_deID.RData
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:718115e3770c6095ff8c968b7d3386803b7ac90620cc47b45914c809637ba694
|
| 3 |
+
size 629299
|
11/replication_package/Replication/Data/stud01_deID.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f7914c8d093f53cf3f11baeb18ed3c76f8e5ab5ddebc860fe5831b1408900396
|
| 3 |
+
size 4792995
|
11/replication_package/Replication/Data/stud02_deID-1.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9cbb28f1be98584a49290968b16110a0ff24c42379c3cf72e8b13d7aac7963d2
|
| 3 |
+
size 471081
|
11/replication_package/Replication/Data/stud02_deID.RData
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce18f49adcecf9a6a098178156fd1043b2bc1593213e0cd62e2cf77ed8e0e2c1
|
| 3 |
+
size 96374
|
11/replication_package/Replication/Data/stud02_deID.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9cbb28f1be98584a49290968b16110a0ff24c42379c3cf72e8b13d7aac7963d2
|
| 3 |
+
size 471081
|
11/replication_package/Replication/README.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7972aff2492ded340851d9b8a42bce97961f50e67c7cdabc8d10dfeccdd1276
|
| 3 |
+
size 2596
|
11/replication_package/Replication/ReplicationScript/.Rhistory
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
getwd()
|
| 2 |
+
setwd("..")
|
| 3 |
+
0
|
| 4 |
+
install.packages("hexbin")
|
| 5 |
+
q()
|
| 6 |
+
n
|
11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021-1.R
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021.R
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021_log-1.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17d0ccbd96d7c72d7caf6cd5ca0f96c7a698c3b7e551c8a1471c16280445eff1
|
| 3 |
+
size 433775
|
11/replication_package/Replication/ReplicationScript/ChangingHearts_GublerEtAl_Jul2021_log.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17d0ccbd96d7c72d7caf6cd5ca0f96c7a698c3b7e551c8a1471c16280445eff1
|
| 3 |
+
size 433775
|
11/replication_package/Replication/code_flowchart/appendix_flowchart_study2.R
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
## This is code to take the full dataset and produce the numbers in the
|
| 3 |
+
## flowchart for study 2 in the appendix
|
| 4 |
+
|
| 5 |
+
library(tidyverse)
|
| 6 |
+
library(haven)
|
| 7 |
+
library(data.table)
|
| 8 |
+
|
| 9 |
+
## Can set your working directory here to the folder
|
| 10 |
+
setwd("~/Dropbox/GKMR/PapersPresentations/2020Submission/Additions_PostReplication/code")
|
| 11 |
+
|
| 12 |
+
## Read in the pre and post data and the one used in the replication
|
| 13 |
+
s02post <- read_csv("stud02_post.csv") %>% as.data.table()
|
| 14 |
+
s02pre <- read_csv("stud02_pre.csv") %>% as.data.table()
|
| 15 |
+
|
| 16 |
+
## Change names to allow distinguishing pre- from post- variables
|
| 17 |
+
setnames(s02pre, paste0("pre_", names(s02pre)))
|
| 18 |
+
setnames(s02pre, "pre_Voter ID", "Voter_ID") #but keep the merging var the same
|
| 19 |
+
|
| 20 |
+
## Remove the one duplicated respondent
|
| 21 |
+
s02pre <- s02pre[!(duplicated(Voter_ID))]
|
| 22 |
+
|
| 23 |
+
## Number invited to the wave 2 survey
|
| 24 |
+
nrow(s02pre)
|
| 25 |
+
## [1] 3623
|
| 26 |
+
|
| 27 |
+
## Combine
|
| 28 |
+
setkey(s02pre, "Voter_ID")
|
| 29 |
+
setkey(s02post, "Voter_ID")
|
| 30 |
+
s02comb <- s02pre[s02post]
|
| 31 |
+
|
| 32 |
+
## Create the treatment condition variable
|
| 33 |
+
## First for those in control
|
| 34 |
+
myvars <- str_subset(names(s02comb), "PositiveLegal")
|
| 35 |
+
myvars
|
| 36 |
+
## [1] "FL_238_DO_PositiveLegal" "FL_268_DO_PositiveLegal"
|
| 37 |
+
## [3] "FL_265_DO_PositiveLegal" "FL_262_DO_PositiveLegal"
|
| 38 |
+
s02comb[, condition := NA_integer_]
|
| 39 |
+
s02comb[rowSums(s02comb[, ..myvars], na.rm = TRUE) == 1, condition := 0]
|
| 40 |
+
## Now for those in treatment
|
| 41 |
+
myvars <- str_subset(names(s02comb), "PositiveIllegal")
|
| 42 |
+
## [1] "FL_238_DO_PositiveIllegal" "FL_268_DO_PositiveIllegal"
|
| 43 |
+
## [3] "FL_265_DO_PositiveIllegal" "FL_262_DO_PositiveIllegal"
|
| 44 |
+
s02comb[rowSums(s02comb[, ..myvars], na.rm = TRUE) == 1, condition := 1]
|
| 45 |
+
|
| 46 |
+
## Number that didn't respond is difference between the pre and combined surveys
|
| 47 |
+
nrow(s02pre)
|
| 48 |
+
## [1] 3623
|
| 49 |
+
nrow(s02comb)
|
| 50 |
+
## [1] 2632
|
| 51 |
+
nrow(s02pre) - nrow(s02comb)
|
| 52 |
+
## [1] 991
|
| 53 |
+
|
| 54 |
+
## There are also people in this dataset who finished/started taking the survey
|
| 55 |
+
## after it closed; eliminate those here
|
| 56 |
+
nrow(s02comb)
|
| 57 |
+
## [1] 2632
|
| 58 |
+
s02comb <- s02comb[as.POSIXct(EndDate) < as.POSIXct("2015-09-16 16:05:00 MDT")]
|
| 59 |
+
nrow(s02comb)
|
| 60 |
+
## [1] 2399
|
| 61 |
+
2632 - 2399 #233 removed for this reason
|
| 62 |
+
|
| 63 |
+
## How many in each condition now?
|
| 64 |
+
table(s02comb$condition, useNA = "ifany")
|
| 65 |
+
## 0 1 <NA>
|
| 66 |
+
## 1065 1062 272
|
| 67 |
+
|
| 68 |
+
## Remove the 272 respondents who were never assigned to a treatment condition
|
| 69 |
+
s02comb <- s02comb[!is.na(condition)]
|
| 70 |
+
nrow(s02comb) #new n-size is 2127
|
| 71 |
+
|
| 72 |
+
## Who did not finish the survey?
|
| 73 |
+
table(s02comb$condition, s02comb$Finished, useNA = "ifany")
|
| 74 |
+
## 0 1
|
| 75 |
+
## 0 8 1057
|
| 76 |
+
## 1 9 1053
|
| 77 |
+
## 8 in control and 9 in treatment that didn't finish
|
| 78 |
+
|
| 79 |
+
## Remove those who did not finish the survey
|
| 80 |
+
s02comb <- s02comb[Finished == 1]
|
| 81 |
+
nrow(s02comb) #new n-size is 2110
|
| 82 |
+
|
| 83 |
+
## What about non-whites/Latinos?
|
| 84 |
+
## In this raw dataset, this is asked in the question pre_Q58
|
| 85 |
+
table(s02comb$pre_Q58, useNA = "ifany")
|
| 86 |
+
## 1 2 3 4 5 6 7 8 <NA>
|
| 87 |
+
## 3 10 3 44 1977 14 14 40 5
|
| 88 |
+
|
| 89 |
+
## Everyone labeled as a 5 is white, so look at 5 vs other
|
| 90 |
+
table(s02comb$condition, as.integer(s02comb$pre_Q58 == 5), useNA = "ifany")
|
| 91 |
+
## 0 1 <NA>
|
| 92 |
+
## 0 74 978 5
|
| 93 |
+
## 1 54 999 0
|
| 94 |
+
## 74 in control and 54 in treatment that are non-white or Latino - for the NAs,
|
| 95 |
+
## keep those in (which in effect assumes that they are white)
|
| 96 |
+
|
| 97 |
+
## Remove those who are non-white or Latino
|
| 98 |
+
s02comb <- s02comb[!(pre_Q58 %in% c(1:4, 6:8))]
|
| 99 |
+
nrow(s02comb) #new n-size is 1982
|
| 100 |
+
table(s02comb$condition, useNA = "ifany")
|
| 101 |
+
## 0 1
|
| 102 |
+
## 983 999
|
| 103 |
+
## This gives us numbers that correspond to the final row of the flowchart
|
| 104 |
+
## in the appendix
|
11/replication_package/Replication/code_flowchart/stud02_post.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b707ffe136d3d7926817c3823730fe19f18d995bcc6cfcdbb449a8f6158dc96
|
| 3 |
+
size 94264
|
11/replication_package/Replication/code_flowchart/stud02_pre.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcb0c24b9831917697ba07c64a395666080d810ae5e0d4b6935a0e93aca745ac
|
| 3 |
+
size 35835
|
11/replication_package/stud02_deID.RData
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce18f49adcecf9a6a098178156fd1043b2bc1593213e0cd62e2cf77ed8e0e2c1
|
| 3 |
+
size 96374
|
11/should_reproduce.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4398f9ed99c05fbdc1866e3f8ece9f68c69e6329b64702527503241e706a28e
|
| 3 |
+
size 42
|