Commit ·
3e1c601
1
Parent(s): 8487dfe
10
Browse files- 10/paper.pdf +3 -0
- 10/replication_package/Codebook for Dyadic Party Dataset.docx +0 -0
- 10/replication_package/Codebook for Gender Disaggregated Dyadic Party Dataset.docx +0 -0
- 10/replication_package/Codebook for Multilevel Dataset.docx +0 -0
- 10/replication_package/dyadic_data_1-4-22.Rdata +3 -0
- 10/replication_package/gender_disagregated_8-8-21.rds +3 -0
- 10/replication_package/multilevel_1-5-22.Rdata +3 -0
- 10/replication_package/readme.rtf +28 -0
- 10/replication_package/replication_code.R +716 -0
- 10/should_reproduce.txt +3 -0
10/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0acc812e16e593efb2b9fbaf9ca35773a87a55f1753f85360f84c17e003da5d5
|
| 3 |
+
size 220140
|
10/replication_package/Codebook for Dyadic Party Dataset.docx
ADDED
|
Binary file (17.5 kB). View file
|
|
|
10/replication_package/Codebook for Gender Disaggregated Dyadic Party Dataset.docx
ADDED
|
Binary file (18 kB). View file
|
|
|
10/replication_package/Codebook for Multilevel Dataset.docx
ADDED
|
Binary file (18.3 kB). View file
|
|
|
10/replication_package/dyadic_data_1-4-22.Rdata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce16b80cec72dc2c069ac245c09faa56aa40a80aba7bc21038539f6b16076b05
|
| 3 |
+
size 253615
|
10/replication_package/gender_disagregated_8-8-21.rds
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:050817c347915cd18baf4412e7cda9445a15ced3a4d7362c28ee3405a4fcc12f
|
| 3 |
+
size 272286
|
10/replication_package/multilevel_1-5-22.Rdata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd9a14418d24853992cdc860953b56a09afad73d32a8e8a0f78f02522a0d853a
|
| 3 |
+
size 10236336
|
10/replication_package/readme.rtf
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
| 2 |
+
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 ArialMT;\f1\fswiss\fcharset0 Helvetica;}
|
| 3 |
+
{\colortbl;\red255\green255\blue255;\red26\green26\blue26;\red255\green255\blue255;\red26\green26\blue26;
|
| 4 |
+
}
|
| 5 |
+
{\*\expandedcolortbl;;\cssrgb\c13348\c13348\c13331;\cssrgb\c100000\c100000\c100000\c0;\cssrgb\c13348\c13348\c13331;
|
| 6 |
+
}
|
| 7 |
+
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
| 8 |
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
| 9 |
+
|
| 10 |
+
\f0\fs24 \cf0 Replication Data ReadMe for \cf2 \cb3 \expnd0\expndtw0\kerning0
|
| 11 |
+
Can\'92t We All Just Get Along? How Women MPs Can Ameliorate Affective Polarization in Western Publics\
|
| 12 |
+
\
|
| 13 |
+
Code files: \
|
| 14 |
+
\
|
| 15 |
+
1. replication_code.r - Contains code to replicate all figures and tables in both article and supplementary information memo\
|
| 16 |
+
\
|
| 17 |
+
Datasets:\
|
| 18 |
+
1. dyadic_data_1-4-22.Rdata - Dataset of directed party dyads, associated with codebook \'93Codebook for Dyadic Party Dataset\'94. Dataset required to replicate table 1 and Figure 1 in article, as well as tables S2, S3A, S3B, S4, S5, S6, S7, S8, S9, S10, and Figure S1 and S2 in supplementary information memo.\
|
| 19 |
+
\
|
| 20 |
+
2. gender_disagregated_8-8-21.rds - Dataset of directed party dyads, disaggregated by gender of partisans, associated with codebook \'93Codebook for Gender Disaggregated Dyadic Party Dataset\'94. Dataset required to replicate Table 1 in main article, as well as Table S2 in the supplementary \cf4 information memo\cf2 .\
|
| 21 |
+
\
|
| 22 |
+
3. multilevel_1-5-22.Rdata - Dataset of individual evaluations of out-parties, with contextual variables, associated with Codebook \'93Codebook for Multilevel Dataset\'94. Required to replicate Tables S11 and S12 in the supplementary information memo.\
|
| 23 |
+
\
|
| 24 |
+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
| 25 |
+
|
| 26 |
+
\f1 \cf0 \cb1 \kerning1\expnd0\expndtw0 *** NOTE: TO RUN THESE FILES AS THEY ARE SET UP, CREATE A DIRECTORY INCLUDING ALL THREE DATASETS***\
|
| 27 |
+
\
|
| 28 |
+
}
|
10/replication_package/replication_code.R
ADDED
|
@@ -0,0 +1,716 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+
library(estimatr)
|
| 7 |
+
library(dplyr)
|
| 8 |
+
library(fixest)
|
| 9 |
+
library(modelsummary)
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
############################################
|
| 13 |
+
############## CREATING FIGURE 1 ###########
|
| 14 |
+
############################################
|
| 15 |
+
|
| 16 |
+
#Load in data
|
| 17 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 18 |
+
dta <- updated_data
|
| 19 |
+
|
| 20 |
+
#### Remove unneeded variables
|
| 21 |
+
vars <- c("to_mp_number", "to_rile", "to_economy", "to_society", "year", "country",
|
| 22 |
+
"to_pfeml", "to_femaleleader")
|
| 23 |
+
dta <- dta[vars]
|
| 24 |
+
dta <- na.omit(dta)
|
| 25 |
+
|
| 26 |
+
### Identiy unique parties being evaluated
|
| 27 |
+
dta_unique <- unique(dta)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
fig1 <- ggplot(dta_unique, aes(x = to_pfeml)) +
|
| 31 |
+
geom_histogram(color="black", fill="grey40", binwidth =0.1, center=0.25) +
|
| 32 |
+
scale_x_continuous(breaks = seq(0,1,0.1)) +
|
| 33 |
+
theme_minimal() +
|
| 34 |
+
theme(plot.title = element_text(size=12)) +
|
| 35 |
+
ylab("Frequency")+
|
| 36 |
+
xlab("Proportion of Women MPs");fig1
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
############################################
|
| 40 |
+
###### CREATING TABLE 1 COLUMNS 1 & 2 ######
|
| 41 |
+
############################################
|
| 42 |
+
|
| 43 |
+
#Out party % women, non-clustered SEs
|
| 44 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 45 |
+
|
| 46 |
+
dta <-updated_data
|
| 47 |
+
|
| 48 |
+
#creating the country-year fixed effects
|
| 49 |
+
dta$cntryyr <-paste(dta$country, dta$year, sep = "")
|
| 50 |
+
|
| 51 |
+
## Removing smaller parties
|
| 52 |
+
dta <- subset(dta, dta$to_prior_seats >=4)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 56 |
+
"year", "country", "party_dislike", "party_like", "cntryyr", "to_pfeml", "to_prior_seats", "to_mp_number")
|
| 57 |
+
dta <- dta[vars]
|
| 58 |
+
dta <- na.omit(dta)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
table1.1 <-lm(party_like ~ to_pfeml + as.factor(cntryyr), data = dta)
|
| 62 |
+
table1.2 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(cntryyr), data = dta)
|
| 63 |
+
|
| 64 |
+
### With clustered SEs
|
| 65 |
+
stargazer(table1.1, table1.2,
|
| 66 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 67 |
+
se = starprep(table1.1, table1.2,
|
| 68 |
+
clusters = dta$country),
|
| 69 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 70 |
+
"econ_distance_s", "society_distance_s"))
|
| 71 |
+
|
| 72 |
+
############################################
|
| 73 |
+
###### CREATING TABLE 1 COLUMNS 3 & 4 ######
|
| 74 |
+
############################################
|
| 75 |
+
|
| 76 |
+
## Note in gendered data, the party_like and party_dislike variable indicate mean levels of
|
| 77 |
+
## like/dislike for party by ALL partisans
|
| 78 |
+
## the "dislike" variable indicates level of dislike towards out-party by partisans of specified gender
|
| 79 |
+
dta <- readRDS("gender_disagregated_8-8-21.rds")
|
| 80 |
+
|
| 81 |
+
#creating the country-year fixed effects
|
| 82 |
+
dta$countryyear <-paste(dta$country, dta$year, sep = "")
|
| 83 |
+
|
| 84 |
+
## Removing smaller parties
|
| 85 |
+
dta <- subset(dta, dta$to_prior_seats >=4)
|
| 86 |
+
|
| 87 |
+
### Create Like variable for gendered data from dislike
|
| 88 |
+
dta$like <- 10- dta$dislike
|
| 89 |
+
|
| 90 |
+
## Remove unneeded variables and NAs
|
| 91 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 92 |
+
"year", "country", "to_pfeml",
|
| 93 |
+
"countryyear", "gender", "like", "dislike", "to_prior_seats")
|
| 94 |
+
dta <- dta[vars]
|
| 95 |
+
dta <- na.omit(dta)
|
| 96 |
+
|
| 97 |
+
## Only men subset
|
| 98 |
+
dta_male <- subset(dta, gender==1)
|
| 99 |
+
dta_female <- subset(dta, gender==2)
|
| 100 |
+
|
| 101 |
+
table1.3 <-lm(like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_female)
|
| 102 |
+
table1.4 <-lm(like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_male)
|
| 103 |
+
|
| 104 |
+
### With clustered SEs - women
|
| 105 |
+
stargazer(table1.3,
|
| 106 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 107 |
+
se = starprep(table1.3,
|
| 108 |
+
clusters = dta_female$country),
|
| 109 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition", "to_pfeml2"))
|
| 110 |
+
|
| 111 |
+
### With clustered SEs - men
|
| 112 |
+
stargazer(table1.4,
|
| 113 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 114 |
+
se = starprep(table1.4,
|
| 115 |
+
clusters = dta_male$country),
|
| 116 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition", "to_pfeml2"))
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
############################################
|
| 120 |
+
###### CREATING TABLE S2 COLUMNS 1 & 2 ######
|
| 121 |
+
############################################
|
| 122 |
+
|
| 123 |
+
#Out party % women, non-clustered SEs
|
| 124 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 125 |
+
|
| 126 |
+
dta <-updated_data
|
| 127 |
+
|
| 128 |
+
#creating the country-year fixed effects
|
| 129 |
+
dta$cntryyr <-paste(dta$country, dta$year, sep = "")
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 134 |
+
"year", "country", "party_dislike", "party_like", "cntryyr", "to_pfeml", "to_prior_seats", "to_mp_number")
|
| 135 |
+
dta <- dta[vars]
|
| 136 |
+
dta <- na.omit(dta)
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
tableS2.1 <-lm(party_like ~ to_pfeml + as.factor(cntryyr), data = dta)
|
| 140 |
+
tableS2.2 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(cntryyr), data = dta)
|
| 141 |
+
|
| 142 |
+
summary(tableS2.1)
|
| 143 |
+
summary(tableS2.2)
|
| 144 |
+
|
| 145 |
+
### With clustered SEs
|
| 146 |
+
stargazer(tableS2.1, tableS2.2,
|
| 147 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 148 |
+
se = starprep(tableS2.1, tableS2.2,
|
| 149 |
+
clusters = dta$country),
|
| 150 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 151 |
+
"econ_distance_s", "society_distance_s"))
|
| 152 |
+
|
| 153 |
+
############################################
|
| 154 |
+
###### CREATING TABLE S2 COLUMNS 3 & 4 ######
|
| 155 |
+
############################################
|
| 156 |
+
|
| 157 |
+
dta <- readRDS("gender_disagregated_8-8-21.rds")
|
| 158 |
+
|
| 159 |
+
#creating the country-year fixed effects
|
| 160 |
+
dta$countryyear <-paste(dta$country, dta$year, sep = "")
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
### Create Like variable for gendered data from dislike
|
| 164 |
+
dta$like <- 10- dta$dislike
|
| 165 |
+
|
| 166 |
+
## Remove unneeded variables and NAs
|
| 167 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 168 |
+
"year", "country", "to_pfeml",
|
| 169 |
+
"countryyear", "gender", "like", "dislike", "to_prior_seats")
|
| 170 |
+
dta <- dta[vars]
|
| 171 |
+
dta <- na.omit(dta)
|
| 172 |
+
|
| 173 |
+
## Only men subset
|
| 174 |
+
dta_male <- subset(dta, gender==1)
|
| 175 |
+
dta_female <- subset(dta, gender==2)
|
| 176 |
+
|
| 177 |
+
tableS2.3 <-lm(like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_female)
|
| 178 |
+
tableS2.4 <-lm(like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_male)
|
| 179 |
+
|
| 180 |
+
summary(tableS2.3)
|
| 181 |
+
summary(tableS2.4)
|
| 182 |
+
|
| 183 |
+
### With clustered SEs - women
|
| 184 |
+
stargazer(tableS2.3,
|
| 185 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 186 |
+
se = starprep(tableS2.3,
|
| 187 |
+
clusters = dta_female$country),
|
| 188 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition", "to_pfeml2"))
|
| 189 |
+
|
| 190 |
+
### With clustered SEs - men
|
| 191 |
+
stargazer(tableS2.4,
|
| 192 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 193 |
+
se = starprep(tableS2.4,
|
| 194 |
+
clusters = dta_male$country),
|
| 195 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition", "to_pfeml2"))
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
############################################
|
| 199 |
+
############ CREATING TABLE S3 #############
|
| 200 |
+
############################################
|
| 201 |
+
|
| 202 |
+
## Read in data
|
| 203 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 204 |
+
|
| 205 |
+
dta <-updated_data
|
| 206 |
+
colnames(dta)
|
| 207 |
+
|
| 208 |
+
#creating the country-year fixed effects
|
| 209 |
+
dta$cntryyr <-paste(dta$country, dta$year, sep = "")
|
| 210 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 211 |
+
"year", "country", "party_dislike","party_like", "cntryyr", "to_pfeml", "from_rile", "to_rile",
|
| 212 |
+
"from_left_bloc", "from_right_bloc", "to_left_bloc", "to_right_bloc", "from_parfam", "to_parfam",
|
| 213 |
+
"to_prior_seats")
|
| 214 |
+
dta <- dta[vars]
|
| 215 |
+
dta <- na.omit(dta)
|
| 216 |
+
|
| 217 |
+
dta_nrr <- subset(dta, dta$to_parfam!=70)
|
| 218 |
+
dta_nrr <- subset(dta_nrr, dta_nrr$from_parfam!=70)
|
| 219 |
+
|
| 220 |
+
## Remove small parties, with fewer than 4 seats
|
| 221 |
+
dta_small_nrr <- subset(dta_nrr, dta_nrr$to_prior_seats >=4)
|
| 222 |
+
|
| 223 |
+
table.S3 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(country), data = dta_small_nrr)
|
| 224 |
+
summary(table.S3)
|
| 225 |
+
|
| 226 |
+
stargazer(table.S3,
|
| 227 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 228 |
+
se = starprep(table.S3,
|
| 229 |
+
clusters = dta_small_nrr$country),
|
| 230 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 231 |
+
"econ_distance_s", "society_distance_s"))
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
############################################
|
| 235 |
+
############ CREATING TABLE S3B ############
|
| 236 |
+
############################################
|
| 237 |
+
|
| 238 |
+
## Load
|
| 239 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 240 |
+
|
| 241 |
+
dta <-updated_data
|
| 242 |
+
|
| 243 |
+
#creating the country-year fixed effects
|
| 244 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 245 |
+
"year", "country", "party_dislike", "party_like", "to_parfam", "to_left_bloc", "to_right_bloc", "cntryyr", "to_pfeml",
|
| 246 |
+
"to_prior_seats")
|
| 247 |
+
dta <- dta[vars]
|
| 248 |
+
dta <- na.omit(dta)
|
| 249 |
+
|
| 250 |
+
## Remove small parties, with fewer than 4 seats
|
| 251 |
+
dta_small <- subset(dta, dta$to_prior_seats >=4)
|
| 252 |
+
|
| 253 |
+
table.3B.1 <-lm(party_like ~ to_pfeml + as.factor(cntryyr), data = dta_small)
|
| 254 |
+
table.3B.2 <-lm(party_like ~ to_pfeml + rile_distance_s + to_left_bloc + prior_coalition + prior_opposition + as.factor(cntryyr), data = dta_small)
|
| 255 |
+
|
| 256 |
+
summary(table.3B.2)
|
| 257 |
+
|
| 258 |
+
### With clustered SEs
|
| 259 |
+
stargazer(table.3B.1, table.3B.2,
|
| 260 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 261 |
+
se = starprep(table.3B.1, table.3B.2,
|
| 262 |
+
clusters = dta_small$country),
|
| 263 |
+
keep = c("to_pfeml", "rile_distance_s", "to_left_bloc", "prior_coalition", "prior_opposition",
|
| 264 |
+
"econ_distance_s", "society_distance_s"))
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
############################################
|
| 268 |
+
############ CREATING TABLE S4 ############
|
| 269 |
+
############################################
|
| 270 |
+
|
| 271 |
+
## Read in data
|
| 272 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 273 |
+
|
| 274 |
+
dta <-updated_data
|
| 275 |
+
|
| 276 |
+
#creating the country-year fixed effects
|
| 277 |
+
dta$countryyear <-paste(dta$country, dta$year, sep = "")
|
| 278 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 279 |
+
"year", "country", "party_dislike","party_like", "countryyear", "to_pfeml", "from_rile", "to_rile",
|
| 280 |
+
"logDM", "to_left_bloc", "to_prior_seats")
|
| 281 |
+
dta <- dta[vars]
|
| 282 |
+
dta <- na.omit(dta)
|
| 283 |
+
|
| 284 |
+
### Split by year, 1996-2006 and 2007-2017
|
| 285 |
+
dta_early <- subset(dta, dta$year<=2006)
|
| 286 |
+
dta_late <- subset(dta, dta$year>=2007)
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
table.early <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_early)
|
| 290 |
+
table.late <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_late)
|
| 291 |
+
|
| 292 |
+
### Without small parties
|
| 293 |
+
dta_early_small <- subset(dta_early, dta_early$to_prior_seats >=4)
|
| 294 |
+
dta_late_small <- subset(dta_late, dta_late$to_prior_seats >=4)
|
| 295 |
+
|
| 296 |
+
table.4.1 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_early_small)
|
| 297 |
+
table.4.2 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_late_small)
|
| 298 |
+
|
| 299 |
+
summary(table.4.1)
|
| 300 |
+
summary(table.4.2)
|
| 301 |
+
|
| 302 |
+
### With clustered SEs
|
| 303 |
+
stargazer(table.4.1,
|
| 304 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 305 |
+
se = starprep(table.4.1,
|
| 306 |
+
clusters = dta_early_small$country),
|
| 307 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition"
|
| 308 |
+
))
|
| 309 |
+
|
| 310 |
+
### With clustered SEs
|
| 311 |
+
stargazer(table.4.2,
|
| 312 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 313 |
+
se = starprep(table.4.2,
|
| 314 |
+
clusters = dta_late_small$country),
|
| 315 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition"
|
| 316 |
+
))
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
############################################
|
| 321 |
+
############ CREATING TABLE S5 #############
|
| 322 |
+
############################################
|
| 323 |
+
|
| 324 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 325 |
+
|
| 326 |
+
dta <-updated_data
|
| 327 |
+
|
| 328 |
+
#creating the country-year fixed effects
|
| 329 |
+
dta$countryyear <-paste(dta$country, dta$year, sep = "")
|
| 330 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 331 |
+
"year", "country", "party_dislike", "party_like", "countryyear",
|
| 332 |
+
"to_pfeml", "from_pfeml", "diff_pfeml", "to_prior_seats")
|
| 333 |
+
dta <- dta[vars]
|
| 334 |
+
dta <- na.omit(dta)
|
| 335 |
+
|
| 336 |
+
## Remove small parties, with fewer than 4 seats
|
| 337 |
+
dta_small <- subset(dta, dta$to_prior_seats >=4)
|
| 338 |
+
|
| 339 |
+
table.S5.1 <-lm(party_like ~ to_pfeml + from_pfeml + diff_pfeml + as.factor(countryyear), data = dta_small)
|
| 340 |
+
table.S5.2 <-lm(party_like ~ to_pfeml + from_pfeml + diff_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_small)
|
| 341 |
+
|
| 342 |
+
summary(table.S5.1)
|
| 343 |
+
summary(table.S5.2)
|
| 344 |
+
|
| 345 |
+
### With clustered SEs
|
| 346 |
+
stargazer(table.S5.1, table.S5.2,
|
| 347 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 348 |
+
se = starprep(table.S5.1, table.S5.2,
|
| 349 |
+
clusters = dta_small$country),
|
| 350 |
+
keep = c("to_pfeml", "from_pfeml", "diff_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 351 |
+
"econ_distance_s", "society_distance_s"))
|
| 352 |
+
|
| 353 |
+
############################################
|
| 354 |
+
############ CREATING FIG. S1 #############
|
| 355 |
+
############################################
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
### Create Plot Data
|
| 359 |
+
|
| 360 |
+
## All values of Out-Party % women
|
| 361 |
+
plot_1 <- as.data.frame((unique(dta$to_pfeml)))
|
| 362 |
+
colnames(plot_1) <- c("to_pfeml")
|
| 363 |
+
|
| 364 |
+
## All 1 Sd above mean of In-party % women
|
| 365 |
+
plot_1$from_pfeml <- mean(dta$from_pfeml, na.rm=T) + sd(dta$from_pfeml, na.rm=T)
|
| 366 |
+
|
| 367 |
+
## Create difference between in-and out-party women
|
| 368 |
+
plot_1$diff_pfeml <- abs(plot_1$to_pfeml - plot_1$from_pfeml)
|
| 369 |
+
|
| 370 |
+
## Select other values (mean RILE distance, opposition together, France 2012 country year)
|
| 371 |
+
plot_1$rile_distance_s <- mean(dta$rile_distance_s, na.rm=T)
|
| 372 |
+
plot_1$prior_coalition <- 0
|
| 373 |
+
plot_1$prior_opposition <- 1
|
| 374 |
+
plot_1$countryyear <- "France2012"
|
| 375 |
+
plot_1$to_mp_number <- "31320"
|
| 376 |
+
plot_1$group <- "above_mean"
|
| 377 |
+
|
| 378 |
+
## All values of Out-Party % women
|
| 379 |
+
plot_2 <- as.data.frame((unique(dta$to_pfeml)))
|
| 380 |
+
colnames(plot_2) <- c("to_pfeml")
|
| 381 |
+
|
| 382 |
+
## All 1 Sd below mean of In-party % women
|
| 383 |
+
plot_2$from_pfeml <- mean(dta$from_pfeml, na.rm=T) - sd(dta$from_pfeml, na.rm=T)
|
| 384 |
+
|
| 385 |
+
## Create difference between in-and out-party women
|
| 386 |
+
plot_2$diff_pfeml <- abs(plot_2$to_pfeml - plot_2$from_pfeml)
|
| 387 |
+
|
| 388 |
+
## Select other values (opposition together, France 2012 country year)
|
| 389 |
+
plot_2$rile_distance_s <- mean(dta$rile_distance_s, na.rm=T)
|
| 390 |
+
plot_2$prior_coalition <- 0
|
| 391 |
+
plot_2$prior_opposition <- 1
|
| 392 |
+
plot_2$countryyear <- "France2012"
|
| 393 |
+
plot_2$to_mp_number <- "31320"
|
| 394 |
+
plot_2$group <- "below_mean"
|
| 395 |
+
|
| 396 |
+
plot_dta <- rbind(plot_1, plot_2)
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
###### Plot based on table.S5.2
|
| 400 |
+
figureS1.data <- as.data.frame(predict(table.S5.2, newdata = plot_dta, interval = "confidence"))
|
| 401 |
+
|
| 402 |
+
plot_dta$fit <- figureS1.data$fit
|
| 403 |
+
plot_dta$lwr <- figureS1.data$lwr
|
| 404 |
+
plot_dta$upr <- figureS1.data$upr
|
| 405 |
+
|
| 406 |
+
figS1 <- ggplot(plot_dta, aes(x=to_pfeml, y=fit, lty=group))
|
| 407 |
+
figS1 <- figS1 + geom_line() +
|
| 408 |
+
geom_ribbon(aes(x = to_pfeml, y = fit, ymin = lwr,
|
| 409 |
+
ymax = upr),
|
| 410 |
+
lwd = 1/2, alpha=0.1) +
|
| 411 |
+
theme_minimal() +
|
| 412 |
+
theme(plot.title = element_text(size=12)) +
|
| 413 |
+
ylab("Predicted Out-Party Thermometer Rating")+
|
| 414 |
+
xlab("Proportion of Out-Party Women MPs") +
|
| 415 |
+
theme(legend.position = "none") +
|
| 416 |
+
geom_text(x=0.70, y=5.3, label="in-party % of women is \n1 SD above the mean") +
|
| 417 |
+
geom_text(x=0.70, y=4.0, label="in-party % of women is \n1 SD below the mean", color="grey37") +
|
| 418 |
+
ylim(c(2.5,6.5));figS1
|
| 419 |
+
|
| 420 |
+
pdf("figS1.pdf")
|
| 421 |
+
figS1
|
| 422 |
+
dev.off()
|
| 423 |
+
|
| 424 |
+
|
| 425 |
+
############################################
|
| 426 |
+
############ CREATING TABLE S6 #############
|
| 427 |
+
############################################
|
| 428 |
+
|
| 429 |
+
## Read in data
|
| 430 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 431 |
+
|
| 432 |
+
dta <-updated_data
|
| 433 |
+
|
| 434 |
+
#creating the country-year fixed effects
|
| 435 |
+
dta$countryyear <-paste(dta$country, dta$year, sep = "")
|
| 436 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 437 |
+
"year", "country", "party_dislike","party_like", "countryyear", "to_pfeml", "from_rile", "to_rile",
|
| 438 |
+
"logDM", "to_left_bloc", "to_prior_seats")
|
| 439 |
+
dta <- dta[vars]
|
| 440 |
+
dta <- na.omit(dta)
|
| 441 |
+
|
| 442 |
+
dta_small <- subset(dta, dta$to_prior_seats >=4)
|
| 443 |
+
|
| 444 |
+
table.S6.1 <-lm(party_like ~ to_pfeml + rile_distance_s + logDM + prior_coalition + prior_opposition + as.factor(year), data = dta_small)
|
| 445 |
+
table.S6.2 <-lm(party_like ~ to_pfeml*logDM + rile_distance_s + prior_coalition + prior_opposition + as.factor(year), data = dta_small)
|
| 446 |
+
table.S6.3 <-lm(party_like ~ to_pfeml*logDM + rile_distance_s*logDM + prior_coalition*logDM + prior_opposition*logDM + as.factor(year), data = dta_small)
|
| 447 |
+
|
| 448 |
+
summary(table.S6.1)
|
| 449 |
+
summary(table.S6.2)
|
| 450 |
+
summary(table.S6.3)
|
| 451 |
+
|
| 452 |
+
stargazer(table.S6.1, table.S6.2, table.S6.3,
|
| 453 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 454 |
+
se = starprep(table.S6.1, table.S6.2, table.S6.3,
|
| 455 |
+
clusters = dta_small$country),
|
| 456 |
+
keep = c("to_pfeml", "rile_distance_s", "logDM", "prior_coalition", "prior_opposition",
|
| 457 |
+
"econ_distance_s", "society_distance_s"))
|
| 458 |
+
|
| 459 |
+
|
| 460 |
+
############################################
|
| 461 |
+
############ CREATING TABLE S7 #############
|
| 462 |
+
############################################
|
| 463 |
+
|
| 464 |
+
#Out party % women, non-clustered SEs
|
| 465 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 466 |
+
|
| 467 |
+
dta <-updated_data
|
| 468 |
+
|
| 469 |
+
#creating the country-year fixed effects
|
| 470 |
+
dta$cntryyr <-paste(dta$country, dta$year, sep = "")
|
| 471 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 472 |
+
"year", "country", "party_dislike", "party_like", "cntryyr", "to_pfeml", "to_prior_seats")
|
| 473 |
+
dta <- dta[vars]
|
| 474 |
+
dta <- na.omit(dta)
|
| 475 |
+
|
| 476 |
+
## Creating squared term for out-party % women
|
| 477 |
+
dta$to_pfeml2 <- dta$to_pfeml^2
|
| 478 |
+
|
| 479 |
+
## Remove small parties, with fewer than 4 seats
|
| 480 |
+
dta <- subset(dta, dta$to_prior_seats >=4)
|
| 481 |
+
|
| 482 |
+
table.S7.1 <-lm(party_like ~ to_pfeml + to_pfeml2 + as.factor(cntryyr), data = dta)
|
| 483 |
+
table.S7.2 <-lm(party_like ~ to_pfeml + to_pfeml2 + rile_distance_s + prior_coalition + prior_opposition + as.factor(cntryyr), data = dta)
|
| 484 |
+
|
| 485 |
+
summary(table.S7.1)
|
| 486 |
+
summary(table.S7.2)
|
| 487 |
+
|
| 488 |
+
### With clustered SEs
|
| 489 |
+
stargazer(table.S7.1, table.S7.2,
|
| 490 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 491 |
+
se = starprep(table.S7.1, table.S7.2,
|
| 492 |
+
clusters = dta$country),
|
| 493 |
+
keep = c("to_pfeml", "to_pfeml2", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 494 |
+
"econ_distance_s", "society_distance_s"))
|
| 495 |
+
|
| 496 |
+
############################################
|
| 497 |
+
############ CREATING FIG. S2 #############
|
| 498 |
+
############################################
|
| 499 |
+
|
| 500 |
+
### Create Plot Data
|
| 501 |
+
|
| 502 |
+
## All values of Out-Party % women
|
| 503 |
+
plot_S2 <- as.data.frame((unique(dta$to_pfeml)))
|
| 504 |
+
colnames(plot_S2) <- c("to_pfeml")
|
| 505 |
+
|
| 506 |
+
## Create difference between in-and out-party women
|
| 507 |
+
plot_S2$to_pfeml2 <- plot_S2$to_pfeml^2
|
| 508 |
+
|
| 509 |
+
## Select other values (mean RILE distance, opposition together, France 2012 country year)
|
| 510 |
+
plot_S2$rile_distance_s <- mean(dta$rile_distance_s, na.rm=T)
|
| 511 |
+
plot_S2$prior_coalition <- 0
|
| 512 |
+
plot_S2$prior_opposition <- 1
|
| 513 |
+
plot_S2$cntryyr <- "France2012"
|
| 514 |
+
plot_S2$to_mp_number <- "31320"
|
| 515 |
+
|
| 516 |
+
figureS2.data <- as.data.frame(predict(table.S7.2, newdata = plot_S2, interval = "confidence"))
|
| 517 |
+
|
| 518 |
+
plot_S2$fit <- figureS2.data$fit
|
| 519 |
+
plot_S2$lwr <- figureS2.data$lwr
|
| 520 |
+
plot_S2$upr <- figureS2.data$upr
|
| 521 |
+
|
| 522 |
+
figS2 <- ggplot(plot_S2, aes(x=to_pfeml, y=fit))
|
| 523 |
+
figS2 <- figS2 + geom_line() +
|
| 524 |
+
geom_ribbon(aes(x = to_pfeml, y = fit, ymin = lwr,
|
| 525 |
+
ymax = upr),
|
| 526 |
+
lwd = 1/2, alpha=0.1) +
|
| 527 |
+
theme_minimal() +
|
| 528 |
+
theme(plot.title = element_text(size=12)) +
|
| 529 |
+
ylab("Predicted Out-Party Thermometer Rating")+
|
| 530 |
+
xlab("Proportion of Out-Party Women MPs") +
|
| 531 |
+
ylim(c(2,5));figS2
|
| 532 |
+
|
| 533 |
+
pdf("figS2.pdf")
|
| 534 |
+
figS2
|
| 535 |
+
dev.off()
|
| 536 |
+
|
| 537 |
+
############################################
|
| 538 |
+
############ CREATING TABLE S8 #############
|
| 539 |
+
############################################
|
| 540 |
+
|
| 541 |
+
#Women-led parties
|
| 542 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 543 |
+
|
| 544 |
+
dta <-updated_data
|
| 545 |
+
|
| 546 |
+
dta_womenlead <- subset(dta, dta$to_femaleleader==1)
|
| 547 |
+
|
| 548 |
+
#creating the country-year fixed effects
|
| 549 |
+
dta_womenlead$countryyear <-paste(dta_womenlead$country, dta_womenlead$year, sep = "")
|
| 550 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 551 |
+
"year", "country", "party_dislike","party_like", "countryyear", "to_pfeml", "to_prior_seats")
|
| 552 |
+
dta_womenlead <- dta_womenlead[vars]
|
| 553 |
+
dta_womenlead <- na.omit(dta_womenlead)
|
| 554 |
+
|
| 555 |
+
## Exclude small parties
|
| 556 |
+
dta_womenlead <- subset(dta_womenlead, dta_womenlead$to_prior_seats >=4)
|
| 557 |
+
|
| 558 |
+
table.S8A1 <-lm(party_like ~ to_pfeml + as.factor(countryyear), data = dta_womenlead)
|
| 559 |
+
table.S8A2 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_womenlead)
|
| 560 |
+
|
| 561 |
+
summary(table.S8A1)
|
| 562 |
+
summary(table.S8A2)
|
| 563 |
+
|
| 564 |
+
### With clustered SEs
|
| 565 |
+
stargazer(table.S8A1, table.S8A2,
|
| 566 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 567 |
+
se = starprep(table.S8A1, table.S8A2,
|
| 568 |
+
clusters = dta_womenlead$country),
|
| 569 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 570 |
+
"econ_distance_s", "society_distance_s"))
|
| 571 |
+
|
| 572 |
+
#Male-led parties
|
| 573 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 574 |
+
dta <-updated_data
|
| 575 |
+
|
| 576 |
+
dta_malelead <- subset(dta, dta$to_femaleleader==0)
|
| 577 |
+
|
| 578 |
+
#creating the country-year fixed effects
|
| 579 |
+
dta_malelead$countryyear <-paste(dta_malelead$country, dta_malelead$year, sep = "")
|
| 580 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 581 |
+
"year", "country", "party_dislike","party_like", "countryyear", "to_pfeml", "to_prior_seats")
|
| 582 |
+
dta_malelead <- dta_malelead[vars]
|
| 583 |
+
dta_malelead <- na.omit(dta_malelead)
|
| 584 |
+
|
| 585 |
+
## Exclude small parties
|
| 586 |
+
dta_malelead <- subset(dta_malelead, dta_malelead$to_prior_seats >=4)
|
| 587 |
+
|
| 588 |
+
table.S8B1 <-lm(party_like ~ to_pfeml + as.factor(countryyear), data = dta_malelead)
|
| 589 |
+
table.S8B2 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta_malelead)
|
| 590 |
+
|
| 591 |
+
summary(table.S8B1)
|
| 592 |
+
summary(table.S8B2)
|
| 593 |
+
|
| 594 |
+
### With clustered SEs
|
| 595 |
+
stargazer(table.S8B1, table.S8B2,
|
| 596 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 597 |
+
se = starprep(table.S8B1, table.S8B2,
|
| 598 |
+
clusters = dta_malelead$country),
|
| 599 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 600 |
+
"econ_distance_s", "society_distance_s"))
|
| 601 |
+
|
| 602 |
+
############################################
|
| 603 |
+
############ CREATING TABLE S9 #############
|
| 604 |
+
############################################
|
| 605 |
+
|
| 606 |
+
## Read in data
|
| 607 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 608 |
+
|
| 609 |
+
dta <- updated_data
|
| 610 |
+
|
| 611 |
+
#creating the country-year fixed effects
|
| 612 |
+
dta$countryyear <-paste(dta$country, dta$year, sep = "")
|
| 613 |
+
|
| 614 |
+
#creating the party fixed effects / cluster
|
| 615 |
+
dta$partydyad <-paste(dta$from_mp_number, dta$to_mp_number, sep = "")
|
| 616 |
+
|
| 617 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 618 |
+
"year", "country", "party_dislike","party_like", "countryyear", "to_pfeml",
|
| 619 |
+
"from_rile", "to_rile", "to_mp_number", "partydyad", "to_prior_seats")
|
| 620 |
+
dta <- dta[vars]
|
| 621 |
+
dta <- na.omit(dta)
|
| 622 |
+
|
| 623 |
+
## Exclude small parties
|
| 624 |
+
dta <- subset(dta, dta$to_prior_seats >=4)
|
| 625 |
+
|
| 626 |
+
table.S9 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(countryyear), data = dta)
|
| 627 |
+
summary(table.S9)
|
| 628 |
+
|
| 629 |
+
### With clustered SEs
|
| 630 |
+
stargazer(table.S9,
|
| 631 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Out-Party Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 632 |
+
se = starprep(table.S9,
|
| 633 |
+
clusters = dta$partydyad),
|
| 634 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 635 |
+
"econ_distance_s", "society_distance_s"))
|
| 636 |
+
|
| 637 |
+
|
| 638 |
+
############################################
|
| 639 |
+
############ CREATING TABLE 10 #############
|
| 640 |
+
############################################
|
| 641 |
+
|
| 642 |
+
load("dyadic_data_1-4-22.Rdata")
|
| 643 |
+
|
| 644 |
+
dta <-updated_data
|
| 645 |
+
|
| 646 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 647 |
+
"year", "country", "party_dislike", "to_pfeml", "party_like", "to_prior_seats")
|
| 648 |
+
dta <- dta[vars]
|
| 649 |
+
dta <- na.omit(dta)
|
| 650 |
+
|
| 651 |
+
## Remove small parties, with fewer than 4 seats
|
| 652 |
+
dta_small <- subset(dta, dta$to_prior_seats >=4)
|
| 653 |
+
|
| 654 |
+
table.S10.1 <-lm(party_like ~ to_pfeml + as.factor(country), data = dta_small)
|
| 655 |
+
table.S10.2 <-lm(party_like ~ to_pfeml + rile_distance_s + prior_coalition + prior_opposition + as.factor(country), data = dta_small)
|
| 656 |
+
|
| 657 |
+
summary(table.S10.2)
|
| 658 |
+
|
| 659 |
+
### With clustered SEs
|
| 660 |
+
stargazer(table.S10.1, table.S10.2,
|
| 661 |
+
add.lines = list(c("Country-Year Fixed Effects?", "Yes"), c("Country-Level Clustered SEs?", "Yes")),
|
| 662 |
+
se = starprep(table.S10.1, table.S10.2,
|
| 663 |
+
clusters = dta_small$country),
|
| 664 |
+
keep = c("to_pfeml", "rile_distance_s", "prior_coalition", "prior_opposition",
|
| 665 |
+
"econ_distance_s", "society_distance_s"))
|
| 666 |
+
|
| 667 |
+
##################################################
|
| 668 |
+
############ CREATING TABLES 11 & 12 #############
|
| 669 |
+
##################################################
|
| 670 |
+
|
| 671 |
+
load("Data/multilevel_1-5-22.Rdata")
|
| 672 |
+
|
| 673 |
+
indiv_data <-multilevel_data
|
| 674 |
+
|
| 675 |
+
|
| 676 |
+
vars <- c("rile_distance_s", "prior_coalition", "prior_opposition", "econ_distance_s", "society_distance_s",
|
| 677 |
+
"year", "country", "cntryyr", "to_pfeml", "from_pfeml", "thermometer_score", "ID", "party_to", "party_from",
|
| 678 |
+
"from_partyname", "to_partyname", "to_left_bloc", "from_left_bloc",
|
| 679 |
+
"to_right_bloc", "from_right_bloc", "gender", "to_parfam", "from_parfam", "to_prior_seats",
|
| 680 |
+
"from_mp_number", "to_mp_number")
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
indiv_data <- indiv_data[vars]
|
| 684 |
+
|
| 685 |
+
## Create gender variable
|
| 686 |
+
indiv_data <-mutate(indiv_data, gender = ifelse(gender == "1", "male",
|
| 687 |
+
ifelse(gender == "2", "female", NA)))
|
| 688 |
+
|
| 689 |
+
indiv_data$gender <-as.factor(indiv_data$gender)
|
| 690 |
+
|
| 691 |
+
##filter out parties with no data, mainly parties who were not in parliament plus a few cases from early 1990s
|
| 692 |
+
indiv_data <-filter(indiv_data, is.na(to_pfeml) == F)
|
| 693 |
+
|
| 694 |
+
### Create dyads for FEs/Clustered SEs
|
| 695 |
+
indiv_data$dyad <-paste(indiv_data$from_mp_number, indiv_data$to_mp_number, sep ="_to_")
|
| 696 |
+
|
| 697 |
+
### Create Table 11, column 1, with Standard errors clustered at country-year, party-dyad, and individual levels
|
| 698 |
+
table11A.1.1 <-feols(thermometer_score ~ to_pfeml | ID, data = indiv_data, cluster = ~cntryyr)
|
| 699 |
+
table11A.1.2 <-feols(thermometer_score ~ to_pfeml | ID, data = indiv_data, cluster = ~dyad)
|
| 700 |
+
table11A.1.3 <-feols(thermometer_score ~ to_pfeml | ID, data = indiv_data, cluster = ~ID)
|
| 701 |
+
|
| 702 |
+
### Create Table 11, column 2, with Standard errors clustered at country-year, party-dyad, and individual levels
|
| 703 |
+
table11A.2.1 <-feols(thermometer_score ~ to_pfeml + + rile_distance_s + prior_coalition + prior_opposition | ID, data = indiv_data, cluster = ~cntryyr)
|
| 704 |
+
table11A.2.2 <-feols(thermometer_score ~ to_pfeml + + rile_distance_s + prior_coalition + prior_opposition | ID, data = indiv_data, cluster = ~dyad)
|
| 705 |
+
table11A.2.3 <-feols(thermometer_score ~ to_pfeml + + rile_distance_s + prior_coalition + prior_opposition | ID, data = indiv_data, cluster = ~ID)
|
| 706 |
+
|
| 707 |
+
### Create Table 11B, column 1, with Standard errors clustered at country-year, party-dyad, and individual levels
|
| 708 |
+
table11B.1.1 <-feols(thermometer_score ~ to_pfeml | cntryyr, data = indiv_data, cluster = ~cntryyr)
|
| 709 |
+
table11B.1.2 <-feols(thermometer_score ~ to_pfeml | cntryyr, data = indiv_data, cluster = ~dyad)
|
| 710 |
+
table11B.1.3 <-feols(thermometer_score ~ to_pfeml | cntryyr, data = indiv_data, cluster = ~ID)
|
| 711 |
+
|
| 712 |
+
### Create Table 11B, column 2, with Standard errors clustered at country-year, party-dyad, and individual levels
|
| 713 |
+
table11B.2.1 <-feols(thermometer_score ~ to_pfeml + + rile_distance_s + prior_coalition + prior_opposition | cntryyr, data = indiv_data, cluster = ~cntryyr)
|
| 714 |
+
table11B.2.2 <-feols(thermometer_score ~ to_pfeml + + rile_distance_s + prior_coalition + prior_opposition | cntryyr, data = indiv_data, cluster = ~dyad)
|
| 715 |
+
table11B.2.3 <-feols(thermometer_score ~ to_pfeml + + rile_distance_s + prior_coalition + prior_opposition | cntryyr, data = indiv_data, cluster = ~ID)
|
| 716 |
+
|
10/should_reproduce.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e948c9ddded565a15bdaa55c5f0001dcc6e8f1c0857305a6eaf31e19ff7b2dc0
|
| 3 |
+
size 16
|