Commit
·
39a18a8
1
Parent(s):
e706ec8
add 38
Browse files
38/paper.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:58d468259a9bf5ded115c28f209ba7173a4d7c2ac03ff324284d623664fbb8d4
|
3 |
+
size 343008
|
38/replication_package/Codebooks - Indecent Disclosures.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea55e4222c62a6b9bee0251c1d5173c7b941fe69f871464b457900040c628293
|
3 |
+
size 102232
|
38/replication_package/ReadMe.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:13a9aef4f88cd64d2e10a862a643a4a6246fbcd9282f32bd2d24f3faa41455a2
|
3 |
+
size 1107
|
38/replication_package/Replication.R
ADDED
@@ -0,0 +1,1075 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
### Replication
|
2 |
+
|
3 |
+
require("pacman")
|
4 |
+
|
5 |
+
pacman::p_load( stargazer, foreign, stringr, data.table, ggplot2,lfe, xtable, openxlsx, zoo, lme4, stringi)
|
6 |
+
rm(list=ls())
|
7 |
+
my_log <- file("my_log.txt")
|
8 |
+
|
9 |
+
specify_decimal <- function(x, k) format(as.numeric(round(x, k), nsmall=k))
|
10 |
+
ihs <- function(x) log(x + sqrt(x^2+1))
|
11 |
+
|
12 |
+
mod_stargazer <- function(est) {
|
13 |
+
capture.output(est)
|
14 |
+
}
|
15 |
+
multiplot <- function(..., plotlist=NULL, file, cols=1, layout=NULL) {
|
16 |
+
require(grid)
|
17 |
+
|
18 |
+
plots <- c(list(...), plotlist)
|
19 |
+
|
20 |
+
numPlots = length(plots)
|
21 |
+
|
22 |
+
if (is.null(layout)) {
|
23 |
+
layout <- matrix(seq(1, cols * ceiling(numPlots/cols)),
|
24 |
+
ncol = cols, nrow = ceiling(numPlots/cols))
|
25 |
+
}
|
26 |
+
|
27 |
+
if (numPlots==1) {
|
28 |
+
print(plots[[1]])
|
29 |
+
|
30 |
+
} else {
|
31 |
+
grid.newpage()
|
32 |
+
pushViewport(viewport(layout = grid.layout(nrow(layout), ncol(layout))))
|
33 |
+
|
34 |
+
for (i in 1:numPlots) {
|
35 |
+
matchidx <- as.data.frame(which(layout == i, arr.ind = TRUE))
|
36 |
+
|
37 |
+
print(plots[[i]], vp = viewport(layout.pos.row = matchidx$row,
|
38 |
+
layout.pos.col = matchidx$col))
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
load("cands.Rda")
|
44 |
+
load("els.Rda")
|
45 |
+
|
46 |
+
|
47 |
+
##################################################################################################
|
48 |
+
################# MAIN TEXT ##################
|
49 |
+
##################################################################################################
|
50 |
+
|
51 |
+
### TABLE 1
|
52 |
+
|
53 |
+
### Models (in order)
|
54 |
+
|
55 |
+
est1<-felm(perc_elected_partial~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type)|0 | regionid + electionyear,data=els, psdef=FALSE)
|
56 |
+
|
57 |
+
est2<-felm(perc_elected_partial~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
58 |
+
|
59 |
+
est3<-felm(perc_elected_partial~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
60 |
+
|
61 |
+
est4<-felm(perc_elected_full~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
62 |
+
|
63 |
+
est5<-felm(perc_elected_full~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
64 |
+
|
65 |
+
est6<-felm(perc_elected_full~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
66 |
+
|
67 |
+
est7<-felm(cands_per_seat~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
68 |
+
|
69 |
+
est8<-felm(cands_per_seat~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
70 |
+
|
71 |
+
est9<-felm(cands_per_seat~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
72 |
+
|
73 |
+
### Layout
|
74 |
+
|
75 |
+
Region <- list(c("Unit Type, Region Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}"))
|
76 |
+
|
77 |
+
UnitType <- list(c("Unit Type Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}"))
|
78 |
+
|
79 |
+
MuniType <- list(c("Municipality Fixed Effects","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
80 |
+
|
81 |
+
LinearTrend <- list(c("Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
82 |
+
|
83 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
84 |
+
newlayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
85 |
+
|
86 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9, omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election","No. Seats (log)","Mun. Population (log)","Mun. Territory (log)","Mun. Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-18pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-Time Incumbents (\\%)","Full-Time Incumbents (\\%)","Candidates per Seat"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
87 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
88 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
89 |
+
|
90 |
+
t_ro <-gsub("\\multicolumn{10}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
91 |
+
|
92 |
+
t_ro[6]<-paste(" \\resizebox{.99\\textwidth}{!}{",t_ro[6],sep="")
|
93 |
+
t_ro[42]<-paste(t_ro[42],"}",sep="")
|
94 |
+
|
95 |
+
sink(file="Main_AvgCandsNoHeader.tex")
|
96 |
+
cat(t_ro)
|
97 |
+
sink()
|
98 |
+
|
99 |
+
|
100 |
+
### TABLE 2
|
101 |
+
|
102 |
+
est1<-felm(cands_perc_bus~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
103 |
+
|
104 |
+
est2<-felm(cands_perc_bus~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
105 |
+
|
106 |
+
est3<-felm(cands_perc_bus~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
107 |
+
|
108 |
+
est4<-felm(cands_perc_directors~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
109 |
+
|
110 |
+
est5<-felm(cands_perc_directors~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
111 |
+
|
112 |
+
est6<-felm(cands_perc_directors~after + interactedtreatment + electionyear| factor(oktmo)|0 | regionid + electionyear,data=els, psdef=FALSE)
|
113 |
+
|
114 |
+
est7<-felm(cands_perc_entre~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
115 |
+
|
116 |
+
est8<-felm(cands_perc_entre~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
117 |
+
|
118 |
+
est9<-felm(cands_perc_entre~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
119 |
+
|
120 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9, omit="electionyear", keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election","No. Seats (log)","Mun. Population (log)","Mun. Territory (log)","Mun. Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-18pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("All Businesspeople (\\%)","Firm Directors (\\%)","Individual Entrepreneurs (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
121 |
+
|
122 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
123 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
124 |
+
t_ro <-gsub("\\multicolumn{10}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
125 |
+
|
126 |
+
t_ro[6]<-paste(" \\resizebox{.99\\textwidth}{!}{",t_ro[6],sep="")
|
127 |
+
t_ro[42]<-paste(t_ro[42],"}",sep="")
|
128 |
+
|
129 |
+
|
130 |
+
sink(file="Main_Business.tex")
|
131 |
+
cat(t_ro)
|
132 |
+
sink()
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
+
### TABLE 3
|
137 |
+
### A warning message appears from the felm command because the fixed effects absorb several of the non-time-varying variables within. This is to be expected and can be ignored.
|
138 |
+
|
139 |
+
est1<-felm(perc_elected_partial~treatment*after*reg_pressfreedom+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
140 |
+
|
141 |
+
est2<-felm(perc_elected_partial~treatment*after*reg_dem_media+electionyear++ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
142 |
+
|
143 |
+
est3<-felm(perc_elected_partial~treatment*after*fn_budget_log+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
144 |
+
|
145 |
+
est4<-felm(perc_elected_partial~treatment*after*log_justice+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
146 |
+
|
147 |
+
est5<-felm(cands_perc_entre~treatment*after*reg_pressfreedom+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
148 |
+
|
149 |
+
est6<-felm(cands_perc_entre~treatment*after*reg_dem_media+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
150 |
+
|
151 |
+
est7<-felm(cands_perc_entre~treatment*after*fn_budget_log+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
152 |
+
|
153 |
+
est8<-felm(cands_perc_entre~treatment*after*log_justice+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm| factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
154 |
+
|
155 |
+
Muni <- list(c("Regional Covariates","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
156 |
+
|
157 |
+
Region <- list(c("Municipality FE; Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
158 |
+
|
159 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8, keep.stat=c("n","rsq"),dep.var.caption="",keep=c("after","treatment:after","treatment:after:reg_pressfreedom","treatment:after:reg_dem_media" ,"treatment:after:audits_allpeople","treatment:after:ENFORCE"),
|
160 |
+
covariate.labels=c("Second Election","Treatment Group * Second Election",
|
161 |
+
"Second Election * GDF Press Freedom",
|
162 |
+
"\\textbf{Treatment Group * Second Election * GDF Press Freedom}",
|
163 |
+
"Second Election * TP Press Freedom",
|
164 |
+
"\\textbf{Treatment Group * Second Election * TP Press Freedom}",
|
165 |
+
"Second Election * Regional Tax Agency Budget",
|
166 |
+
"\\textbf{Treatment Group * Second Election * Regional Tax Agency Budget}",
|
167 |
+
"Second Election * Law Enforcement Personnel",
|
168 |
+
"\\textbf{Treatment Group * Second Election * Law Enforcement Personnel}"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-20pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-Time Incumbents (\\%)","Independent Entrepreneurs (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Muni,Region),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
169 |
+
|
170 |
+
t_ro <-gsub("\\multicolumn{9}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
171 |
+
|
172 |
+
|
173 |
+
t_ro[6]<-paste(" \\resizebox{.99\\textwidth}{!}{",t_ro[6],sep="")
|
174 |
+
t_ro[50]<-paste(t_ro[50],"}",sep="")
|
175 |
+
|
176 |
+
|
177 |
+
sink(file="Heterogeneity_MainInteractions.tex")
|
178 |
+
cat(t_ro)
|
179 |
+
sink()
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
### FIGURE 1
|
186 |
+
|
187 |
+
vrns_chart<-els[,list(vrns=uniqueN(vrn)),by=c("electionyear","treatment")]
|
188 |
+
vrns_chart$treatment<-as.character(vrns_chart$treatment)
|
189 |
+
vrns_chart$electionyear<-as.character(vrns_chart$electionyear)
|
190 |
+
|
191 |
+
ggplot(vrns_chart, aes(x = electionyear, y = vrns, fill = treatment)) +
|
192 |
+
geom_bar(stat = "identity")+scale_fill_grey(start = 0.6, end = 0.3,name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+ylim(0,7000)+xlab("\nElection Year")+ylab("Number of Elections\n")+theme_bw()+
|
193 |
+
theme(legend.key = element_rect(size = 5),
|
194 |
+
legend.key.size = unit(1.5, 'lines'),
|
195 |
+
plot.title=element_text(size=14,hjust = 0.65),
|
196 |
+
axis.text=element_text(size=14),axis.title=element_text(size=16),
|
197 |
+
legend.text=element_text(size=16)) +geom_vline(aes(xintercept=7.5),colour="darkgrey", linetype="dashed")+ annotate("text", label = "Amendment\n In Effect", x = 8.5, y = 5000, size = 4, colour = "black", angle=0)+geom_vline(aes(xintercept=5.5),colour="black")+ ggtitle("First Period Election Second Period Election")+
|
198 |
+
annotate("rect", xmin = 7.5, xmax = 9.5, ymin = 0, ymax = Inf,
|
199 |
+
alpha = .15)
|
200 |
+
ggsave(filename = "ElectionsByYear.pdf", height=6, width=10)
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
|
205 |
+
##################################################################################################
|
206 |
+
################# APPENDIX ##################
|
207 |
+
##################################################################################################
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
### FIGURE A1
|
212 |
+
|
213 |
+
cands$coded_profession<-0
|
214 |
+
cands$coded_profession[cands$entrepreneur==1]<-1
|
215 |
+
cands$coded_profession[cands$director==1]<-2
|
216 |
+
cands$coded_profession[cands$teacher==1]<-3
|
217 |
+
cands$coded_profession[cands$accountant==1]<-4
|
218 |
+
cands$coded_profession[cands$doctor==1]<-5
|
219 |
+
cands$coded_profession[cands$lowerclass==1]<-6
|
220 |
+
cands$coded_profession[cands$nowork==1]<-7
|
221 |
+
cands$coded_profession[cands$force==1]<-8
|
222 |
+
cands$coded_profession[cands$official==1]<-9
|
223 |
+
cands$coded_profession[cands$ngo==1]<-10
|
224 |
+
|
225 |
+
prop<-as.data.frame(prop.table(table(cands$coded_profession)))
|
226 |
+
|
227 |
+
prop$Freq<-prop$Freq*100
|
228 |
+
prop$label <-paste0(specify_decimal(prop$Freq,1),"%",sep="")
|
229 |
+
prop$Var1<-as.factor(prop$Var1)
|
230 |
+
prop_breaks<-unique(as.factor(prop$Var1))
|
231 |
+
|
232 |
+
prop <- transform(prop, Var1=reorder(Var1, Freq) )
|
233 |
+
|
234 |
+
ggplot(prop, aes(x=Var1,y=Freq))+geom_bar(stat = "identity")+xlab("")+ylab("\nPercentage of Candidates (%)")+ geom_text(aes(label=label), position=position_dodge(width=0.9), hjust=-0.2,size=5)+ylim(0,25)+ coord_flip() + theme_bw()+ scale_x_discrete(breaks=prop_breaks,labels=c("Other","Entrepreneur","Firm Director","Education","Private Sector Professional","Health Care","Blue Collar","Unemployed / Pensioner","Law Enforcement","Government / SOE","Civil Society"))+theme(axis.text=element_text(size=18),axis.title=element_text(size=18)) + guides(fill=guide_legend(title=" "))
|
235 |
+
|
236 |
+
ggsave(filename = "Professions.pdf", height=3.5, width=10)
|
237 |
+
|
238 |
+
|
239 |
+
### TABLE A2
|
240 |
+
|
241 |
+
els_first<-subset(els, sequence==1)
|
242 |
+
els_second<-subset(els, sequence==2)
|
243 |
+
|
244 |
+
SummaryTables <- data.frame(title=numeric(0),treatment= numeric(0),control= numeric(0),difference= numeric(0),pvalue=numeric(0))
|
245 |
+
|
246 |
+
SummaryTables[1 ,] <- c("(1) Population (log)",
|
247 |
+
mean(els_first$population_log[els_first$treatment==1],na.rm=TRUE),
|
248 |
+
mean(els_first$population_log[els_first$treatment==0],na.rm=TRUE),
|
249 |
+
summary(lm(population_log~treatment, data=els_first))[[4]][2],
|
250 |
+
summary(lm(population_log~treatment, data=els_first))[[4]][8])
|
251 |
+
|
252 |
+
SummaryTables[2 ,] <- c("(2) Territory (log)",
|
253 |
+
mean(els_first$territory_log[els_first$treatment==1],na.rm=TRUE),
|
254 |
+
mean(els_first$territory_log[els_first$treatment==0],na.rm=TRUE),
|
255 |
+
summary(lm(territory_log~treatment, data=els_first))[[4]][2],
|
256 |
+
summary(lm(territory_log~treatment, data=els_first))[[4]][8]
|
257 |
+
)
|
258 |
+
SummaryTables[3 ,] <- c("(3) Revenue (log)",
|
259 |
+
mean(els_first$income_log[els_first$treatment==1],na.rm=TRUE),
|
260 |
+
mean(els_first$income_log[els_first$treatment==0],na.rm=TRUE),
|
261 |
+
summary(lm(income_log~treatment, data=els_first))[[4]][2],
|
262 |
+
summary(lm(income_log~treatment, data=els_first))[[4]][8])
|
263 |
+
SummaryTables[4 ,] <- c("(4) City Settlement",
|
264 |
+
mean(els_first$gorpos[els_first$treatment==1],na.rm=TRUE),
|
265 |
+
mean(els_first$gorpos[els_first$treatment==0],na.rm=TRUE),
|
266 |
+
summary(lm(gorpos~treatment, data=els_first))[[4]][2],
|
267 |
+
summary(lm(gorpos~treatment, data=els_first))[[4]][8] )
|
268 |
+
|
269 |
+
SummaryTables[5 ,] <- c("(5) Rural Settlement",
|
270 |
+
mean(els_first$selpos[els_first$treatment==1],na.rm=TRUE),
|
271 |
+
mean(els_first$selpos[els_first$treatment==0],na.rm=TRUE),
|
272 |
+
summary(lm(selpos~treatment, data=els_first))[[4]][2],
|
273 |
+
summary(lm(selpos~treatment, data=els_first))[[4]][8])
|
274 |
+
|
275 |
+
SummaryTables[6 ,] <- c("(6) City District",
|
276 |
+
mean(els_first$gorokrug[els_first$treatment==1],na.rm=TRUE),
|
277 |
+
mean(els_first$gorokrug[els_first$treatment==0],na.rm=TRUE),
|
278 |
+
summary(lm(gorokrug~treatment, data=els_first))[[4]][2],
|
279 |
+
summary(lm(gorokrug~treatment, data=els_first))[[4]][8])
|
280 |
+
|
281 |
+
SummaryTables[7 ,] <- c("(7) Municipal Rayon",
|
282 |
+
mean(els_first$munrayon[els_first$treatment==1],na.rm=TRUE),
|
283 |
+
mean(els_first$munrayon[els_first$treatment==0],na.rm=TRUE),
|
284 |
+
summary(lm(munrayon~treatment, data=els_first))[[4]][2],
|
285 |
+
summary(lm(munrayon~treatment, data=els_first))[[4]][8])
|
286 |
+
|
287 |
+
SummaryTables[8 ,] <- c("(8) Number Seats",
|
288 |
+
mean(els_first$numberelected[els_first$treatment==1],na.rm=TRUE),
|
289 |
+
mean(els_first$numberelected[els_first$treatment==0],na.rm=TRUE),
|
290 |
+
summary(lm(numberelected~treatment, data=els_first))[[4]][2],
|
291 |
+
summary(lm(numberelected~treatment, data=els_first))[[4]][8])
|
292 |
+
|
293 |
+
SummaryTables[9 ,] <- c("(9) Number Candidates per Seat",
|
294 |
+
mean(els_first$cands_per_seat[els_first$treatment==1],na.rm=TRUE),
|
295 |
+
mean(els_first$cands_per_seat[els_first$treatment==0],na.rm=TRUE),
|
296 |
+
summary(lm(cands_per_seat~treatment, data=els_first))[[4]][2],
|
297 |
+
summary(lm(cands_per_seat~treatment, data=els_first))[[4]][8])
|
298 |
+
|
299 |
+
SummaryTables[10 ,] <- c("(10) Part-time Deputy Candidates (%)",
|
300 |
+
mean(els_first$perc_elected_partial[els_first$treatment==1],na.rm=TRUE),
|
301 |
+
mean(els_first$perc_elected_partial[els_first$treatment==0],na.rm=TRUE),
|
302 |
+
summary(lm(perc_elected_partial~treatment, data=els_first))[[4]][2],
|
303 |
+
summary(lm(perc_elected_partial~treatment, data=els_first))[[4]][8])
|
304 |
+
|
305 |
+
SummaryTables[11 ,] <- c("(11) Full-time Deputy Candidates (%)",
|
306 |
+
mean(els_first$perc_elected_full[els_first$treatment==1],na.rm=TRUE),
|
307 |
+
mean(els_first$perc_elected_full[els_first$treatment==0],na.rm=TRUE),
|
308 |
+
summary(lm(perc_elected_full~treatment, data=els_first))[[4]][2],
|
309 |
+
summary(lm(perc_elected_full~treatment, data=els_first))[[4]][8])
|
310 |
+
|
311 |
+
SummaryTables[12 ,] <- c("(12) Businessperson Candidates (%)",
|
312 |
+
mean(els_first$cands_perc_bus[els_first$treatment==1],na.rm=TRUE),
|
313 |
+
mean(els_first$cands_perc_bus[els_first$treatment==0],na.rm=TRUE),
|
314 |
+
summary(lm(cands_perc_bus~treatment, data=els_first))[[4]][2],
|
315 |
+
summary(lm(cands_perc_bus~treatment, data=els_first))[[4]][8])
|
316 |
+
|
317 |
+
SummaryTables[13 ,] <- c("(13) Candidate Age",
|
318 |
+
mean(els_first$age[els_first$treatment==1],na.rm=TRUE),
|
319 |
+
mean(els_first$age[els_first$treatment==0],na.rm=TRUE),
|
320 |
+
summary(lm(age~treatment, data=els_first))[[4]][2],
|
321 |
+
summary(lm(age~treatment, data=els_first))[[4]][8])
|
322 |
+
|
323 |
+
SummaryTables[14 ,] <- c("(14) Female Candidates (%)",
|
324 |
+
mean(els_first$female[els_first$treatment==1],na.rm=TRUE),
|
325 |
+
mean(els_first$female[els_first$treatment==0],na.rm=TRUE),
|
326 |
+
summary(lm(female~treatment, data=els_first))[[4]][2],
|
327 |
+
summary(lm(female~treatment, data=els_first))[[4]][8])
|
328 |
+
|
329 |
+
SummaryTables$treatment<-prettyNum(specify_decimal(as.numeric(SummaryTables$treatment),3),big.mark=",")
|
330 |
+
SummaryTables$control<-prettyNum(specify_decimal(as.numeric(SummaryTables$control),3),big.mark=",")
|
331 |
+
SummaryTables$difference<-prettyNum(specify_decimal(as.numeric(SummaryTables$difference),3),big.mark=",")
|
332 |
+
SummaryTables$pvalue<-as.numeric(SummaryTables$pvalue)
|
333 |
+
|
334 |
+
SummaryTables[15 ,] <- c("(15) Number of Elections",
|
335 |
+
prettyNum(length(unique(els_first$vrn[els_first$treatment==1])),,big.mark=","),
|
336 |
+
prettyNum(length(unique(els_first$vrn[els_first$treatment==0])),,big.mark=","),
|
337 |
+
"",
|
338 |
+
"")
|
339 |
+
SummaryTables$pvalue=NULL
|
340 |
+
|
341 |
+
colnames(SummaryTables) <- c(" ","Treated Elections","Control Elections","Difference")
|
342 |
+
S1<- capture.output(print.xtable(xtable(SummaryTables, digits=3, align="llccc",caption.placement='top',floating=TRUE,tocharFun=prettyNum),include.rownames =FALSE,hline.after=c(0,3,7,14,15)))
|
343 |
+
|
344 |
+
sink(file="PreTreatmentTable.tex")
|
345 |
+
cat(S1)
|
346 |
+
sink()
|
347 |
+
|
348 |
+
|
349 |
+
#### TABLE A3
|
350 |
+
|
351 |
+
elections_summary<-els[,list(numbercands, numberelected, cands_per_seat, perc_elected_partial, perc_elected_full, cands_perc_directors, cands_perc_entre, female, age, income_log, population_log,territory_log,lngdp,log_pop,resource_grppct,reg_urbanshare,log_mincome,reg_sharepensm,reg_pressfreedom,reg_dem_media,fn_budget_log,log_justice,audits_allpeople,ENFORCE)]
|
352 |
+
|
353 |
+
electionstable<-mod_stargazer(stargazer(elections_summary,covariate.labels=c(
|
354 |
+
"No. Candidates",
|
355 |
+
"No. Seats",
|
356 |
+
"Candidates per Seat",
|
357 |
+
"Part-Time Incumbents (\\%)",
|
358 |
+
"Full-Time Incumbents (\\%)",
|
359 |
+
"Firm Directors (\\%)",
|
360 |
+
"Entrepreneurs (\\%)",
|
361 |
+
"Female (\\%)",
|
362 |
+
"Mean Age",
|
363 |
+
"Revenue (log)","Population (log)","Territory (log)","Regional GDP (log)","Regional Population (log)","GDP from Natural Resources (\\%)","Urbanization (\\%)","Average Income (log)","Share of Pensioners (\\%)","GDF Press Freedom","TP Press Freedom","Regional Tax Agency Budget (log)","Law Enforcement Personnel (log)","Audit Risk","Enforcement Expenditures"),summary.stat=c("n","min","max","mean","median"),header=FALSE,digits=3,star.cutoffs = NA))
|
364 |
+
electionstable[19]<-paste("\\hline ",electionstable[19],sep="")
|
365 |
+
electionstable[22]<-paste("\\hline ",electionstable[22],sep="")
|
366 |
+
|
367 |
+
electionstable <-gsub("0.00000", "0", electionstable, fixed =TRUE)
|
368 |
+
|
369 |
+
sink(file="ElectionsStats.tex")
|
370 |
+
cat(electionstable)
|
371 |
+
sink()
|
372 |
+
|
373 |
+
|
374 |
+
### FIGURE C1
|
375 |
+
|
376 |
+
els_first$treatment<-as.character(els_first$treatment)
|
377 |
+
els_first_r<-subset(els_first, is.na(territory_log)==FALSE & is.na(income_log)==FALSE & is.na(population_log)==FALSE)
|
378 |
+
|
379 |
+
est_r<-felm(cands_per_seat~numberelected_log+territory_log+income_log+population_log+electionyear|factor(regionid)+factor(unit_type) |0 | regionid,data=els_first_r)
|
380 |
+
|
381 |
+
els_first_r$residuals_per_seat<-est_r$residuals
|
382 |
+
|
383 |
+
diff<-felm(residuals_per_seat~treatment, data=els_first_r)
|
384 |
+
coef<-specify_decimal(diff$coefficients[2],3)
|
385 |
+
p<-specify_decimal(diff$pval[2],2)
|
386 |
+
|
387 |
+
plot_per_seat<-ggplot(els_first_r,aes(x = residuals_per_seat,fill=treatment)) + geom_density(alpha=0.25)+scale_fill_brewer(palette = "Set1",name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+xlab(paste0("\nResiduals\n\nDiff: ",coef,' p: ',p,"\n",sep=""))+ylab("Density\n")+
|
388 |
+
theme(
|
389 |
+
plot.title=element_text(size=14,hjust = 0.65),
|
390 |
+
axis.text=element_text(size=12),axis.title=element_text(size=12),
|
391 |
+
legend.text=element_text(size=12))+ggtitle("(a) Candidates Per Seat")
|
392 |
+
|
393 |
+
est_r<-felm(perc_elected_partial~numberelected_log+territory_log+income_log+population_log+electionyear+cands_per_seat+electionyear| factor(electionyear)+factor(regionid)+factor(unit_type) |0 | regionid,data=els_first_r)
|
394 |
+
|
395 |
+
els_first_r$residuals_partial<-est_r$residuals
|
396 |
+
diff<-felm(residuals_partial~treatment, data=els_first_r)
|
397 |
+
coef<-specify_decimal(diff$coefficients[2],3)
|
398 |
+
p<-specify_decimal(diff$pval[2],2)
|
399 |
+
|
400 |
+
plot_partial<-ggplot(els_first_r,aes(x = residuals_partial,fill=treatment)) + geom_density(alpha=0.25)+scale_fill_brewer(palette = "Set1",name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+xlab(paste0("\nResiduals\n\nDiff: ",coef,' p: ',p,"\n",sep=""))+ylab("Density\n")+
|
401 |
+
theme(
|
402 |
+
plot.title=element_text(size=14,hjust = 0.65),
|
403 |
+
axis.text=element_text(size=12),axis.title=element_text(size=12),
|
404 |
+
legend.text=element_text(size=12))+ggtitle("(b) Part-Time Incumbents (%)")
|
405 |
+
|
406 |
+
est_r<-felm(perc_elected_full~numberelected_log+territory_log+income_log+population_log+electionyear| factor(electionyear)+factor(regionid)+factor(unit_type) |0 | regionid,data=els_first_r)
|
407 |
+
|
408 |
+
els_first_r$residuals_full<-est_r$residuals
|
409 |
+
diff<-felm(residuals_full~treatment, data=els_first_r)
|
410 |
+
coef<-specify_decimal(diff$coefficients[2],3)
|
411 |
+
p<-specify_decimal(diff$pval[2],2)
|
412 |
+
|
413 |
+
plot_full<-ggplot(els_first_r,aes(x = residuals_full,fill=treatment)) + geom_density(alpha=0.25)+scale_fill_brewer(palette = "Set1",name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+xlab(paste0("\nResiduals\n\nDiff: ",coef,' p: ',p,"\n",sep=""))+ylab("Density\n")+
|
414 |
+
theme(
|
415 |
+
plot.title=element_text(size=14,hjust = 0.65),
|
416 |
+
axis.text=element_text(size=12),axis.title=element_text(size=12),
|
417 |
+
legend.text=element_text(size=12))+ggtitle("(c) Full-Time Incumbents (%)")+xlim(-.025,.025)
|
418 |
+
|
419 |
+
est_r<-felm(cands_perc_bus~numberelected_log+territory_log+income_log+population_log+electionyear| factor(electionyear)+factor(regionid)+factor(unit_type) |0 | regionid,data=els_first_r)
|
420 |
+
|
421 |
+
els_first_r$residuals_bus<-est_r$residuals
|
422 |
+
diff<-felm(residuals_bus~treatment, data=els_first_r)
|
423 |
+
coef<-specify_decimal(diff$coefficients[2],3)
|
424 |
+
p<-specify_decimal(diff$pval[2],2)
|
425 |
+
|
426 |
+
plot_bus<-ggplot(els_first_r,aes(x = residuals_bus,fill=treatment)) + geom_density(alpha=0.25)+scale_fill_brewer(palette = "Set1",name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+xlab(paste0("\nResiduals\n\nDiff: ",coef,' p: ',p,"\n",sep=""))+ylab("Density\n")+
|
427 |
+
theme( plot.title=element_text(size=14,hjust = 0.65),
|
428 |
+
axis.text=element_text(size=12),axis.title=element_text(size=12),
|
429 |
+
legend.text=element_text(size=12))+ggtitle("(d) Businesspeople (%)")
|
430 |
+
|
431 |
+
est_r<-felm(cands_perc_directors~numberelected_log+territory_log+income_log+population_log+electionyear| factor(electionyear)+factor(regionid)+factor(unit_type) |0 | regionid,data=els_first_r)
|
432 |
+
|
433 |
+
els_first_r$residuals_directors<-est_r$residuals
|
434 |
+
diff<-felm(residuals_directors~treatment, data=els_first_r)
|
435 |
+
coef<-specify_decimal(diff$coefficients[2],3)
|
436 |
+
p<-specify_decimal(diff$pval[2],2)
|
437 |
+
|
438 |
+
plot_directors<-ggplot(els_first_r,aes(x = residuals_directors,fill=treatment)) + geom_density(alpha=0.25)+scale_fill_brewer(palette = "Set1",name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+xlab(paste0("\nResiduals\n\nDiff: ",coef,' p: ',p,"\n",sep=""))+ylab("Density\n")+
|
439 |
+
theme( plot.title=element_text(size=14,hjust = 0.65),
|
440 |
+
axis.text=element_text(size=12),axis.title=element_text(size=12),
|
441 |
+
legend.text=element_text(size=12))+ggtitle("(e) Firm Directors (%)")
|
442 |
+
|
443 |
+
est_r<-felm(cands_perc_entre~numberelected_log+territory_log+income_log+population_log+electionyear| factor(electionyear)+factor(regionid)+factor(unit_type) |0 | regionid,data=els_first_r)
|
444 |
+
|
445 |
+
els_first_r$residuals_entre<-est_r$residuals
|
446 |
+
diff<-felm(residuals_entre~treatment, data=els_first_r)
|
447 |
+
coef<-specify_decimal(diff$coefficients[2],3)
|
448 |
+
coef<-ifelse(coef=="0",'0.001',coef)
|
449 |
+
p<-specify_decimal(diff$pval[2],2)
|
450 |
+
|
451 |
+
plot_entre<-ggplot(els_first_r,aes(x = residuals_entre,fill=treatment)) + geom_density(alpha=0.25)+scale_fill_brewer(palette = "Set1",name="",breaks=c("0", "1"),labels=c("Control ", "Treatment "))+xlab(paste0("\nResiduals\n\nDiff: ",coef,' p: ',p,"\n",sep=""))+ylab("Density\n")+
|
452 |
+
theme( plot.title=element_text(size=14,hjust = 0.65),
|
453 |
+
axis.text=element_text(size=12),axis.title=element_text(size=12),
|
454 |
+
legend.text=element_text(size=12))+ggtitle("(f) Entrepreneurs (%)")
|
455 |
+
|
456 |
+
pdf(file = "ResidualsHistograms.pdf", height = 12, width = 12)
|
457 |
+
multiplot(plot_per_seat,plot_full,plot_directors,plot_partial,plot_bus,plot_entre,cols=2)
|
458 |
+
dev.off()
|
459 |
+
|
460 |
+
|
461 |
+
|
462 |
+
### TABLE D1
|
463 |
+
|
464 |
+
cands_e<-subset(cands, elected_izbirkom==1)
|
465 |
+
|
466 |
+
### Only take candidates that are in the first sequence and get their treatment status
|
467 |
+
els_first_t<-els_first[,list(vrn,treatment,unit_type,population_log,territory_log,income_log)]
|
468 |
+
|
469 |
+
cands_e<-merge(cands_e, els_first_t,by=c("vrn"))
|
470 |
+
|
471 |
+
### Create indicator for whether candidate ran again
|
472 |
+
g_ran_again<-cands[cands$vrn %in% els_second$vrn]
|
473 |
+
|
474 |
+
g_ran_again<-g_ran_again[,list(fullname, birthyear,oktmo,elected_izbirkom,nextparty=party)]
|
475 |
+
g_ran_again$reran<-1
|
476 |
+
setnames(g_ran_again,"elected_izbirkom","elected_izbirkom_again")
|
477 |
+
|
478 |
+
cands_e<-merge(cands_e, g_ran_again,by=c("fullname","oktmo","birthyear"),all.x=TRUE,all.y=FALSE)
|
479 |
+
cands_e$reran[is.na(cands_e$reran)==TRUE]=0
|
480 |
+
|
481 |
+
### Demographics
|
482 |
+
|
483 |
+
cands_e$log_age<-log(cands_e$age)
|
484 |
+
cands_e$numberelected_log<-log(cands_e$numberelected)
|
485 |
+
cands_e$numbercands_log<-log(cands_e$numbercands)
|
486 |
+
|
487 |
+
cands_e$systemic_opposition<-ifelse(cands_e$party=="kprf" | cands_e$party=="ldpr" | cands_e$party=="sr" | cands_e$party=="rod",1,0)
|
488 |
+
cands_e$other_opposition<-ifelse(cands_e$party=="patriots" | cands_e$party=="oth" | cands_e$party=="yab" ,1,0)
|
489 |
+
cands_e$ur<-ifelse(cands_e$party=="ur" ,1,0)
|
490 |
+
cands_e$nextparty_ur<-ifelse(cands_e$nextparty=="ur" ,1,0)
|
491 |
+
|
492 |
+
#### MODELS
|
493 |
+
|
494 |
+
est1<-felm(reran~treatment | factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=cands_e)
|
495 |
+
|
496 |
+
est2<-felm(reran~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy +ur + systemic_opposition + other_opposition| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=cands_e)
|
497 |
+
|
498 |
+
est3<-felm(reran~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy +ur + systemic_opposition + other_opposition+numberelected_log + numbercands_log + population_log + territory_log + income_log| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=cands_e)
|
499 |
+
|
500 |
+
est4<-felm(elected_izbirkom_again~treatment | factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e,reran==1))
|
501 |
+
|
502 |
+
est5<-felm(elected_izbirkom_again~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy +ur + systemic_opposition + other_opposition| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e,reran==1))
|
503 |
+
|
504 |
+
est6<-felm(elected_izbirkom_again~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy +ur + systemic_opposition + other_opposition+numberelected_log + numbercands_log + population_log + territory_log + income_log| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e,reran==1))
|
505 |
+
|
506 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6, omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group","Female","Age (log)","Businessperson","Full-time Incumbent (previous term)","Part-time Incumbent (previous term)","Ruling Party","Systemic Opposition","Other Opposition","Council Size","No. Cands (first election)","Population (log)","Territory (log)","Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-10pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Incumbent Re-ran in Second Election","Incumbent Won in Second Election"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(UnitType,Region),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
507 |
+
|
508 |
+
### Layout
|
509 |
+
|
510 |
+
Region <- list(c("Region, Year Fixed Effects","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
511 |
+
|
512 |
+
UnitType <- list(c("Unit Type Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
513 |
+
|
514 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
515 |
+
newlayout=" D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
516 |
+
|
517 |
+
t_ro[9]<-paste(t_ro[9],"\\cmidrule(l{15pt}r{15pt}){2-4}\\cmidrule(l{15pt}r{15pt}){5-7}\\\\",sep="")
|
518 |
+
|
519 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
520 |
+
t_ro <-gsub("\\multicolumn{7}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
521 |
+
|
522 |
+
sink(file="Appendix_Reran_andWon.tex")
|
523 |
+
cat(t_ro)
|
524 |
+
sink()
|
525 |
+
|
526 |
+
|
527 |
+
|
528 |
+
|
529 |
+
|
530 |
+
|
531 |
+
|
532 |
+
##### TABLE D2
|
533 |
+
|
534 |
+
est1<-felm(reran~treatment | factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1))
|
535 |
+
|
536 |
+
est2<-felm(reran~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1))
|
537 |
+
|
538 |
+
est3<-felm(reran~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy+numberelected_log + numbercands_log + population_log + territory_log + income_log| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1))
|
539 |
+
|
540 |
+
est4<-felm(elected_izbirkom_again~treatment | factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1 & reran==1))
|
541 |
+
|
542 |
+
est5<-felm(elected_izbirkom_again~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1 & reran==1))
|
543 |
+
|
544 |
+
est6<-felm(elected_izbirkom_again~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy+numberelected_log + numbercands_log + population_log + territory_log + income_log| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1 & reran==1))
|
545 |
+
|
546 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6, omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group","Female","Age (log)","Businessperson","Full-time Incumbent (previous term)","Part-time Incumbent (previous term)","Council Size","No. Cands (first election)","Population (log)","Territory (log)","Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-10pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Incumbent Re-ran in Second Election","Incumbent Won in Second Election"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(UnitType,Region),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
547 |
+
|
548 |
+
### Layout
|
549 |
+
Region <- list(c("Region, Year Fixed Effects","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
550 |
+
|
551 |
+
UnitType <- list(c("Unit Type Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
552 |
+
|
553 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
554 |
+
newlayout=" D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
555 |
+
|
556 |
+
t_ro[9]<-paste(t_ro[9],"\\cmidrule(l{15pt}r{15pt}){2-4}\\cmidrule(l{15pt}r{15pt}){5-7}\\\\",sep="")
|
557 |
+
|
558 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
559 |
+
t_ro <-gsub("\\multicolumn{7}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
560 |
+
|
561 |
+
sink(file="Appendix_Reran_onlyUR.tex")
|
562 |
+
cat(t_ro)
|
563 |
+
sink()
|
564 |
+
|
565 |
+
|
566 |
+
|
567 |
+
|
568 |
+
##### TABLE D3
|
569 |
+
|
570 |
+
est1<-felm(nextparty_ur~treatment | factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1 & reran==1))
|
571 |
+
|
572 |
+
est2<-felm(nextparty_ur~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1& reran==1))
|
573 |
+
|
574 |
+
est3<-felm(nextparty_ur~treatment + female + log_age + businessperson + onlyincumbent + partial_deputy+numberelected_log + numbercands_log + population_log + territory_log + income_log| factor(regionid)+ factor(unit_type) + factor(electionyear)|0 | regionid,data=subset(cands_e, ur==1& reran==1))
|
575 |
+
|
576 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group","Female","Age (log)","Businessperson","Full-time Incumbent (previous term)","Part-time Incumbent (previous term)","Council Size","No. Cands (first election)","Population (log)","Territory (log)","Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-10pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("UR Incumbent Re-Ran with UR"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(UnitType,Region),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
577 |
+
|
578 |
+
|
579 |
+
t_ro <-gsub("\\multicolumn{4}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
580 |
+
|
581 |
+
sink(file="Appendix_Reran_PartySwitching.tex")
|
582 |
+
cat(t_ro)
|
583 |
+
sink()
|
584 |
+
|
585 |
+
|
586 |
+
###### TABLE D4
|
587 |
+
|
588 |
+
est1<-felm(perc_elected_partial~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type)|0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
589 |
+
|
590 |
+
est2<-felm(perc_elected_partial~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
591 |
+
|
592 |
+
est3<-felm(perc_elected_partial~after + interactedtreatment + electionyear| factor(oktmo) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
593 |
+
|
594 |
+
est4<-felm(perc_elected_full~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
595 |
+
|
596 |
+
est5<-felm(perc_elected_full~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
597 |
+
|
598 |
+
est6<-felm(perc_elected_full~after + interactedtreatment + electionyear| factor(oktmo) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
599 |
+
|
600 |
+
est7<-felm(cands_per_seat~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
601 |
+
|
602 |
+
est8<-felm(cands_per_seat~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
603 |
+
|
604 |
+
est9<-felm(cands_per_seat~after + interactedtreatment + electionyear| factor(oktmo) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
605 |
+
|
606 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9, omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election","No. Seats (log)","Mun. Population (log)","Mun. Territory (log)","Mun. Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-18pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-Time Incumbents (\\%)","Full-Time Incumbents (\\%)","Candidates per Seat"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
607 |
+
|
608 |
+
### Layout
|
609 |
+
|
610 |
+
Region <- list(c("Unit Type, Region Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}"))
|
611 |
+
|
612 |
+
UnitType <- list(c("Unit Type Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}"))
|
613 |
+
|
614 |
+
MuniType <- list(c("Municipality Fixed Effects","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
615 |
+
|
616 |
+
LinearTrend <- list(c("Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
617 |
+
|
618 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
619 |
+
newlayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
620 |
+
|
621 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
622 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
623 |
+
|
624 |
+
t_ro <-gsub("\\multicolumn{10}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
625 |
+
|
626 |
+
sink(file="Main_AvgCands_MuniCluster.tex")
|
627 |
+
cat(t_ro)
|
628 |
+
sink()
|
629 |
+
|
630 |
+
|
631 |
+
##### TABLE D5
|
632 |
+
|
633 |
+
est1<-felm(cands_perc_bus~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
634 |
+
|
635 |
+
est2<-felm(cands_perc_bus~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
636 |
+
|
637 |
+
est3<-felm(cands_perc_bus~after + interactedtreatment + electionyear| factor(oktmo) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
638 |
+
|
639 |
+
est4<-felm(cands_perc_directors~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
640 |
+
|
641 |
+
est5<-felm(cands_perc_directors~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
642 |
+
|
643 |
+
est6<-felm(cands_perc_directors~after + interactedtreatment + electionyear| factor(oktmo)|0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
644 |
+
|
645 |
+
est7<-felm(cands_perc_entre~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
646 |
+
|
647 |
+
est8<-felm(cands_perc_entre~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
648 |
+
|
649 |
+
est9<-felm(cands_perc_entre~after + interactedtreatment + electionyear| factor(oktmo) |0 | oktmo+ electionyear,data=els, psdef=FALSE)
|
650 |
+
|
651 |
+
t_ro<-mod_stargazer(stargazer(est7,est8,est9,est4,est5,est6,est1,est2,est3, omit="electionyear", keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election","No. Seats (log)","Mun. Population (log)","Mun. Territory (log)","Mun. Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-18pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("All Businesspeople (\\%)","Firm Directors (\\%)","All Businesspeople (\\%)","Individual Entrepreneurs (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
652 |
+
|
653 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
654 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
655 |
+
t_ro <-gsub("\\multicolumn{10}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
656 |
+
|
657 |
+
sink(file="Main_Business_MuniCluster.tex")
|
658 |
+
cat(t_ro)
|
659 |
+
sink()
|
660 |
+
|
661 |
+
|
662 |
+
|
663 |
+
##### TABLE D6
|
664 |
+
|
665 |
+
est1<-felm(perc_elected_partial~interactedtreatment + treatment + after+ electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 2))
|
666 |
+
|
667 |
+
est2<-felm(perc_elected_partial~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 3))
|
668 |
+
|
669 |
+
est3<-felm(perc_elected_partial~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 4))
|
670 |
+
|
671 |
+
est4<-felm(perc_elected_full~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 2))
|
672 |
+
|
673 |
+
est5<-felm(perc_elected_full~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 3))
|
674 |
+
|
675 |
+
est6<-felm(perc_elected_full~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 4))
|
676 |
+
|
677 |
+
est7<-felm(cands_perc_entre~interactedtreatment + treatment + after+population_log + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 2))
|
678 |
+
|
679 |
+
est8<-felm(cands_perc_entre~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 3))
|
680 |
+
|
681 |
+
est9<-felm(cands_perc_entre~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 4))
|
682 |
+
|
683 |
+
est10<-felm(cands_perc_directors~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 2))
|
684 |
+
|
685 |
+
est11<-felm(cands_perc_directors~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 3))
|
686 |
+
|
687 |
+
est12<-felm(cands_perc_directors~interactedtreatment + treatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, reg_pressfreedom == 4))
|
688 |
+
|
689 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9,est10,est11,est12, keep=c("interactedtreatment","after","population_log"),keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Second Period Election","Mun. Population (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-15pt", align=TRUE,dep.var.labels.include = FALSE, column.labels = c("Low","Medium","High","Low","Medium","High","Low","Medium","High","Low","Medium","High"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Region,UnitType),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
690 |
+
|
691 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
692 |
+
newlayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}|| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
693 |
+
|
694 |
+
|
695 |
+
Region <- list(c("Unit Type, Region Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
696 |
+
|
697 |
+
UnitType <- list(c("Linear Time Trends","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
698 |
+
|
699 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
700 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
701 |
+
t_ro <-gsub("\\multicolumn{7}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
702 |
+
|
703 |
+
t_ro[7]<-" \\textbf{Outcome:}& \\multicolumn{3}{c}{Part-Time Incumbents (\\%)} & \\multicolumn{3}{c}{Full-Time Incumbents (\\%)} & \\multicolumn{3}{c}{Independent Entrepreneurs (\\%)} & \\multicolumn{3}{c}{Firm Directors (\\%)} \\\\ \\cmidrule(l{15pt}r{15pt}){2-4}\\cmidrule(l{15pt}r{15pt}){5-7}\\cmidrule(l{15pt}r{15pt}){8-10}\\cmidrule(l{15pt}r{15pt}){11-13}\\\\"
|
704 |
+
t_ro[9]<-paste("\\textbf{Level of Press Freedom:}",t_ro[9],sep="")
|
705 |
+
sink(file="Terciles_PressFreedom.tex")
|
706 |
+
cat(t_ro)
|
707 |
+
sink()
|
708 |
+
|
709 |
+
|
710 |
+
|
711 |
+
|
712 |
+
###### TABLE D7
|
713 |
+
|
714 |
+
est1<-felm(perc_elected_partial~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log <= 13.64463))
|
715 |
+
|
716 |
+
est2<-felm(perc_elected_partial~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log > 13.64463 & fn_budget_log<13.95877))
|
717 |
+
|
718 |
+
est3<-felm(perc_elected_partial~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log>=13.95877))
|
719 |
+
|
720 |
+
est4<-felm(perc_elected_full~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log <= 13.64463))
|
721 |
+
|
722 |
+
est5<-felm(perc_elected_full~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log > 13.64463 & fn_budget_log<13.95877))
|
723 |
+
|
724 |
+
est6<-felm(perc_elected_full~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log>=13.95877))
|
725 |
+
|
726 |
+
est7<-felm(cands_perc_entre~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log <= 13.64463))
|
727 |
+
|
728 |
+
est8<-felm(cands_perc_entre~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log > 13.64463 & fn_budget_log<13.95877))
|
729 |
+
|
730 |
+
est9<-felm(cands_perc_entre~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log>=13.95877))
|
731 |
+
|
732 |
+
est10<-felm(cands_perc_directors~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log <= 13.64463))
|
733 |
+
|
734 |
+
est11<-felm(cands_perc_directors~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log > 13.64463 & fn_budget_log<13.95877))
|
735 |
+
|
736 |
+
est12<-felm(cands_perc_directors~interactedtreatment + after + electionyear| factor(oktmo) |0 | regionid + electionyear,data=subset(els, fn_budget_log>=13.95877))
|
737 |
+
|
738 |
+
Region <- list(c("Unit Type, Region Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
739 |
+
|
740 |
+
UnitType <- list(c("Linear Time Trends","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
741 |
+
|
742 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
743 |
+
newlayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}|| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
744 |
+
|
745 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9,est10,est11,est12, keep=c("interactedtreatment","after","population_log"),keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Second Period Election","Mun. Population (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-15pt", align=TRUE,dep.var.labels.include = FALSE, column.labels = c("Low","Medium","High","Low","Medium","High","Low","Medium","High","Low","Medium","High"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Region,UnitType),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
746 |
+
|
747 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
748 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
749 |
+
t_ro <-gsub("\\multicolumn{7}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
750 |
+
|
751 |
+
t_ro[7]<-" \\textbf{Outcome:}& \\multicolumn{3}{c}{Part-Time Incumbents (\\%)} & \\multicolumn{3}{c}{Full-Time Incumbents (\\%)} & \\multicolumn{3}{c}{Independent Entrepreneurs (\\%)} & \\multicolumn{3}{c}{Firm Directors (\\%)} \\\\ \\cmidrule(l{15pt}r{15pt}){2-4}\\cmidrule(l{15pt}r{15pt}){5-7}\\cmidrule(l{15pt}r{15pt}){8-10}\\cmidrule(l{15pt}r{15pt}){11-13}\\\\"
|
752 |
+
t_ro[9]<-paste("\\textbf{Law Enforcement Capacity:}",t_ro[9],sep="")
|
753 |
+
sink(file="Terciles_AuditRisk.tex")
|
754 |
+
cat(t_ro)
|
755 |
+
sink()
|
756 |
+
|
757 |
+
|
758 |
+
|
759 |
+
|
760 |
+
##### TABLE D8
|
761 |
+
|
762 |
+
est1<-felm(perc_elected_partial~treatment*after*kgiscore+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
763 |
+
|
764 |
+
est2<-lmer(perc_elected_partial~treatment*after*kgiscore+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
765 |
+
|
766 |
+
est3<-felm(perc_elected_partial~treatment*after*audits_allpeople+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
767 |
+
|
768 |
+
est4<-lmer(perc_elected_partial~treatment*after*audits_allpeople+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
769 |
+
|
770 |
+
est5<-felm(perc_elected_partial~treatment*after*ENFORCE+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
771 |
+
|
772 |
+
est6<-lmer(perc_elected_partial~treatment*after*ENFORCE+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
773 |
+
|
774 |
+
est7<-felm(cands_perc_entre~treatment*after*kgiscore+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
775 |
+
|
776 |
+
est8<-lmer(cands_perc_entre~treatment*after*kgiscore+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
777 |
+
|
778 |
+
est9<-felm(cands_perc_entre~treatment*after*audits_allpeople+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
779 |
+
|
780 |
+
est10<-lmer(cands_perc_entre~treatment*after*audits_allpeople+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
781 |
+
|
782 |
+
est11<-felm(cands_perc_entre~treatment*after*ENFORCE+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
783 |
+
|
784 |
+
est12<-lmer(cands_perc_entre~treatment*after*ENFORCE+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
785 |
+
|
786 |
+
Muni <- list(c("Regional Covariates","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
787 |
+
|
788 |
+
Region <- list(c("Municipality FE; Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}"))
|
789 |
+
|
790 |
+
MLM <- list(c("Unit Type FE; Region RE","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
791 |
+
|
792 |
+
|
793 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9,est10,est11,est12, keep.stat=c("n","rsq"),dep.var.caption="",keep=c("treatment","after","treatment:after:kgiscore","treatment:after:fn_budget_log" ,"treatment:after:log_justice_salary"),
|
794 |
+
covariate.labels=c("Treatment Group","Second Election","
|
795 |
+
Treatment Group * Second Election",
|
796 |
+
"Treatment Group * KGI Score",
|
797 |
+
"Second Election * KGI Score",
|
798 |
+
"\\textbf{Treatment Group * Second Election * KGI Score}",
|
799 |
+
"Treatment Group * Audit Risk",
|
800 |
+
"Second Election * Audit Risk",
|
801 |
+
"\\textbf{Treatment Group * Second Election * Audit Risk}",
|
802 |
+
|
803 |
+
"Treatment Group * Enforcement Exp.",
|
804 |
+
"Second Election *Enforcement Exp. (log)",
|
805 |
+
"\\textbf{Treatment Group * Second Election * Enforcement Exp.}" ),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-20pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-Time Incumbents (\\%)","Independent Entrepreneurs (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Muni,Region,MLM),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
806 |
+
|
807 |
+
t_ro[9]<-paste(t_ro[9],"\\cmidrule(l{15pt}r{15pt}){2-7}\\cmidrule(l{15pt}r{15pt}){8-13}\\\\",sep="")
|
808 |
+
|
809 |
+
t_ro <-gsub("\\multicolumn{13}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
810 |
+
|
811 |
+
t_ro <-gsub("(0.000)","", t_ro, fixed =TRUE)
|
812 |
+
|
813 |
+
sink(file="Heterogeneity_EnforcementRobustness.tex")
|
814 |
+
cat(t_ro)
|
815 |
+
sink()
|
816 |
+
|
817 |
+
|
818 |
+
|
819 |
+
|
820 |
+
##### TABLE D9
|
821 |
+
|
822 |
+
est1<-lmer(perc_elected_partial~treatment*after*reg_pressfreedom+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
823 |
+
|
824 |
+
est2<-lmer(perc_elected_partial~treatment*after*reg_dem_media+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
825 |
+
|
826 |
+
est3<-lmer(perc_elected_partial~treatment*after*fn_budget_log+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
827 |
+
|
828 |
+
est4<-lmer(perc_elected_partial~treatment*after*log_justice+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
829 |
+
|
830 |
+
est5<-lmer(cands_perc_entre~treatment*after*reg_pressfreedom+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
831 |
+
|
832 |
+
est6<-lmer(cands_perc_entre~treatment*after*reg_dem_media+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
833 |
+
|
834 |
+
est7<-lmer(cands_perc_entre~treatment*after*fn_budget_log+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
835 |
+
|
836 |
+
est8<-lmer(cands_perc_entre~treatment*after*log_justice+electionyear+ lngdp + log_pop + resource_grppct + reg_urbanshare + log_mincome + reg_sharepensm+factor(unit_type) + (1|regionid),data=els)
|
837 |
+
|
838 |
+
|
839 |
+
Muni <- list(c("Regional Covariates, Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
840 |
+
|
841 |
+
Region <- list(c("Unit Type FE; Region RE","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
842 |
+
|
843 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8, keep.stat=c("n","rsq"),dep.var.caption="",keep=c("treatment","after","treatment:after:reg_pressfreedom","treatment:after:reg_dem_media" ,"treatment:after:fn_budget_log","treatment:after:log_justice"),
|
844 |
+
covariate.labels=c("Treatment Group","Second Election","Treatment Group * Second Election","Treatment Group * GDF Press Freedom",
|
845 |
+
"Second Election * GDF Press Freedom",
|
846 |
+
"\\textbf{Treatment Group * Second Election * GDF Press Freedom}",
|
847 |
+
"Treatment Group * TP Press Freedom",
|
848 |
+
"Second Election * TP Press Freedom",
|
849 |
+
"\\textbf{Treatment Group * Second Election * TP Press Freedom}",
|
850 |
+
"Treatment Group * Regional Tax Agency Budget",
|
851 |
+
"Second Election * Regional Tax Agency Budget",
|
852 |
+
"\\textbf{Treatment Group * Second Election * Regional Tax Agency Budget}",
|
853 |
+
"Treatment Group * Law Enforcement Personnel",
|
854 |
+
"Second Election * Law Enforcement Personnel",
|
855 |
+
"\\textbf{Treatment Group * Second Election * Law Enforcement Personnel}"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-20pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-Time Incumbents (\\%)","Independent Entrepreneurs (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(Muni,Region),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
856 |
+
|
857 |
+
t_ro[9]<-paste(t_ro[9],"\\cmidrule(l{15pt}r{15pt}){2-5}\\cmidrule(l{15pt}r{15pt}){6-9}\\\\",sep="")
|
858 |
+
|
859 |
+
t_ro <-gsub("\\multicolumn{9}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
860 |
+
|
861 |
+
|
862 |
+
sink(file="MultilevelModels.tex")
|
863 |
+
cat(t_ro)
|
864 |
+
sink()
|
865 |
+
|
866 |
+
|
867 |
+
|
868 |
+
|
869 |
+
###### TABLE D10
|
870 |
+
|
871 |
+
els[,minlevelincumbency:=min(perc_elected_partial),by="oktmo"]
|
872 |
+
|
873 |
+
est1<-felm(perc_elected_partial~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els), psdef=FALSE)
|
874 |
+
|
875 |
+
est2<-felm(perc_elected_partial~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els,minlevelincumbency>0), psdef=FALSE)
|
876 |
+
|
877 |
+
est3<-felm(perc_elected_partial~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els,minlevelincumbency>0.1), psdef=FALSE)
|
878 |
+
|
879 |
+
est4<-felm(perc_elected_partial~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els,minlevelincumbency>0.2), psdef=FALSE)
|
880 |
+
|
881 |
+
est5<-felm(perc_elected_full~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els), psdef=FALSE)
|
882 |
+
|
883 |
+
est6<-felm(perc_elected_full~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els,minlevelincumbency>0), psdef=FALSE)
|
884 |
+
|
885 |
+
est7<-felm(perc_elected_full~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els,minlevelincumbency>0.1), psdef=FALSE)
|
886 |
+
|
887 |
+
est8<-felm(perc_elected_full~interactedtreatment + after + electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els,minlevelincumbency>0.2), psdef=FALSE)
|
888 |
+
|
889 |
+
MuniType <- list(c("Municipality Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
890 |
+
|
891 |
+
LinearTrend <- list(c("Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
892 |
+
|
893 |
+
MinIncumbency <- list(c("Minimum Incumbent Constraint","\\multicolumn{1}{c}{\\text{None}}","\\multicolumn{1}{c}{\\text{0\\%}}","\\multicolumn{1}{c}{\\text{10\\%}}","\\multicolumn{1}{c}{\\text{20\\%}}","\\multicolumn{1}{c}{\\text{None}}","\\multicolumn{1}{c}{\\text{0\\%}}","\\multicolumn{1}{c}{\\text{10\\%}}","\\multicolumn{1}{c}{\\text{20\\%}}"))
|
894 |
+
|
895 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8, omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-5pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-Time Incumbents (\\%)","Full-Time Incumbents (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(MinIncumbency,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs = NA))
|
896 |
+
|
897 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
898 |
+
|
899 |
+
originallayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
900 |
+
newlayout="D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}| D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3}"
|
901 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
902 |
+
t_ro <-gsub("\\multicolumn{9}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
903 |
+
|
904 |
+
sink(file="Appendix_IncumbencyMinimum.tex")
|
905 |
+
cat(t_ro)
|
906 |
+
sink()
|
907 |
+
|
908 |
+
|
909 |
+
|
910 |
+
###### TABLE D11
|
911 |
+
|
912 |
+
#### Do this because Stargazer isn't great at removing certain variables
|
913 |
+
els[,treatment2:=treatment]
|
914 |
+
|
915 |
+
MuniType <- list(c("Municipality Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
916 |
+
|
917 |
+
LinearTrend <- list(c("Linear Time Trend","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
918 |
+
|
919 |
+
est1<-felm(perc_elected_partial~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
920 |
+
|
921 |
+
est2<-felm(perc_elected_partial~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, LowURSeats==0),psdef=FALSE)
|
922 |
+
|
923 |
+
est3<-felm(perc_elected_partial~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, LowURSeats==1),psdef=FALSE)
|
924 |
+
|
925 |
+
est4<-felm(perc_elected_partial~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, republic==1),psdef=FALSE)
|
926 |
+
|
927 |
+
est5<-felm(perc_elected_partial~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, republic==0),psdef=FALSE)
|
928 |
+
|
929 |
+
est6<-felm(perc_elected_partial~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, FarCrimea == 1),psdef=FALSE)
|
930 |
+
|
931 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6, omit=c("electionyear","treatment2"), keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Second Period Election"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="5pt", align=TRUE, dep.var.labels.include=TRUE,column.labels = c("Full Sample","Low UR Seats","High UR Seats","Ethnic Republic","Not Ethnic Republic","No 2017"), column.separate = c(1,1,1,1,1), dep.var.labels=c("Part-Time Incumbents (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
932 |
+
|
933 |
+
t_ro <-gsub("\\multicolumn{6}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
934 |
+
|
935 |
+
sink(file="Party_Partial.tex")
|
936 |
+
cat(t_ro)
|
937 |
+
sink()
|
938 |
+
|
939 |
+
|
940 |
+
####### TABLE D12
|
941 |
+
|
942 |
+
|
943 |
+
est1<-felm(cands_perc_entre~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=els,psdef=FALSE)
|
944 |
+
|
945 |
+
est2<-felm(cands_perc_entre~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, LowURSeats==0),psdef=FALSE)
|
946 |
+
|
947 |
+
est3<-felm(cands_perc_entre~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, LowURSeats==1),psdef=FALSE)
|
948 |
+
|
949 |
+
est4<-felm(cands_perc_entre~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, republic==1),psdef=FALSE)
|
950 |
+
|
951 |
+
est5<-felm(cands_perc_entre~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, republic==0),psdef=FALSE)
|
952 |
+
|
953 |
+
est6<-felm(cands_perc_entre~interactedtreatment + after+electionyear | factor(oktmo) |0 | regionid + electionyear,data=subset(els, FarCrimea == 1),psdef=FALSE)
|
954 |
+
|
955 |
+
|
956 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6, omit=c("electionyear","treatment2"), keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Second Period Election"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="5pt", align=TRUE, dep.var.labels.include=TRUE,column.labels = c("Full Sample","Low UR Seats","High UR Seats","Ethnic Republic","Not Ethnic Republic","No 2017"), column.separate = c(1,1,1,1,1), dep.var.labels=c("Individual Entrepreneurs (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
957 |
+
|
958 |
+
t_ro <-gsub("\\multicolumn{6}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
959 |
+
|
960 |
+
sink(file="Party_Entrepreneur.tex")
|
961 |
+
cat(t_ro)
|
962 |
+
sink()
|
963 |
+
|
964 |
+
|
965 |
+
|
966 |
+
|
967 |
+
|
968 |
+
####### TABLE E1
|
969 |
+
|
970 |
+
est1<-felm(partialname_per_seat~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
971 |
+
|
972 |
+
est2<-felm(partialname_per_seat~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
973 |
+
|
974 |
+
est3<-felm(partialname_per_seat~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
975 |
+
|
976 |
+
est4<-felm(business_per_seat~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
977 |
+
|
978 |
+
est5<-felm(business_per_seat~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
979 |
+
|
980 |
+
est6<-felm(business_per_seat~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
981 |
+
|
982 |
+
est7<-felm(urwins_per_seat~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
983 |
+
|
984 |
+
est8<-felm(urwins_per_seat~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
985 |
+
|
986 |
+
est9<-felm(urwins_per_seat~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
987 |
+
|
988 |
+
est10<-felm(incumbent_success_rate~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
989 |
+
|
990 |
+
est11<-felm(incumbent_success_rate~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
991 |
+
|
992 |
+
est12<-felm(incumbent_success_rate~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
993 |
+
|
994 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,est9,est10,est11,est12, omit="electionyear", keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election","No. Seats (log)","Mun. Population (log)","Mun. Territory (log)","Mun. Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-18pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Part-time Inc. Winners (\\%)","Bus. Winners (\\%)","UR Winners (\\%)","Inc. Success (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(UnitType,Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
995 |
+
|
996 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
997 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
998 |
+
t_ro <-gsub("\\multicolumn{13}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
999 |
+
|
1000 |
+
sink(file="Main_Winners.tex")
|
1001 |
+
cat(t_ro)
|
1002 |
+
sink()
|
1003 |
+
|
1004 |
+
|
1005 |
+
####### TABLE E2
|
1006 |
+
|
1007 |
+
est1<-felm(age~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
1008 |
+
|
1009 |
+
est2<-felm(age~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
1010 |
+
|
1011 |
+
est3<-felm(age~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
1012 |
+
|
1013 |
+
est4<-felm(female~interactedtreatment + treatment + after+numberelected_log + electionyear|factor(regionid)+ factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
1014 |
+
|
1015 |
+
est5<-felm(female~interactedtreatment + treatment + after+numberelected_log+population_log+territory_log+income_log + electionyear| factor(regionid)+factor(unit_type) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
1016 |
+
|
1017 |
+
est6<-felm(female~after + interactedtreatment + electionyear| factor(oktmo) |0 | regionid + electionyear,data=els, psdef=FALSE)
|
1018 |
+
|
1019 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6, omit="electionyear", keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Treatment Group","Second Period Election","No. Seats (log)","Mun. Population (log)","Mun. Territory (log)","Mun. Revenue (log)"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-18pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c("Mean Age","Female (\\%)","Education Level"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(UnitType,Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs=NA))
|
1020 |
+
|
1021 |
+
t_ro[11]<-"\\hline \\bigstrut "
|
1022 |
+
t_ro <-gsub(originallayout, newlayout, t_ro, fixed =TRUE)
|
1023 |
+
t_ro <-gsub("\\multicolumn{7}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
1024 |
+
|
1025 |
+
sink(file="Main_Demo.tex")
|
1026 |
+
cat(t_ro)
|
1027 |
+
sink()
|
1028 |
+
|
1029 |
+
|
1030 |
+
|
1031 |
+
###### TABLE E3
|
1032 |
+
|
1033 |
+
est1<-felm(cands_perc_official~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1034 |
+
|
1035 |
+
est2<-felm(cands_perc_doctor~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1036 |
+
|
1037 |
+
est3<-felm(cands_perc_teacher~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1038 |
+
|
1039 |
+
est4<-felm(cands_perc_force~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1040 |
+
|
1041 |
+
est5<-felm(cands_perc_accountant~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1042 |
+
|
1043 |
+
est6<-felm(cands_perc_ngo~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1044 |
+
|
1045 |
+
est7<-felm(cands_perc_lowerclass~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1046 |
+
|
1047 |
+
est8<-felm(cands_perc_notwork~after + interactedtreatment+electionyear| factor(oktmo) |0 | regionid,data=els)
|
1048 |
+
|
1049 |
+
Region <- list(c("Region Fixed Effects","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}"))
|
1050 |
+
|
1051 |
+
UnitType <- list(c("Unit Type Fixed Effects","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}","\\multicolumn{1}{c}{\\text{No}}"))
|
1052 |
+
|
1053 |
+
MuniType <- list(c("Municipality Fixed Effects","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}","\\multicolumn{1}{c}{\\text{Yes}}"))
|
1054 |
+
|
1055 |
+
t_ro<-mod_stargazer(stargazer(est1,est2,est3,est4,est5,est6,est7,est8,omit="electionyear",keep.stat=c("n","rsq"),dep.var.caption="",covariate.labels=c("Treatment Group * Second Period Election","Second Period Election"),order=c("interactedtreatment","after"),ci=FALSE, ci.level=0.95, digits=3, column.sep.width="-5pt", align=TRUE, dep.var.labels.include=TRUE, dep.var.labels=c(
|
1056 |
+
"Government (\\%)",
|
1057 |
+
"Health Care (\\%)",
|
1058 |
+
"Education (\\%)",
|
1059 |
+
"Law Enforcement (\\%)",
|
1060 |
+
"Professional (\\%)",
|
1061 |
+
"Civil Society (\\%)",
|
1062 |
+
"Blue Collar (\\%)",
|
1063 |
+
"Unemployed (\\%)"),font.size="small",model.names=FALSE,header=FALSE,add.lines=c(UnitType,Region,MuniType,LinearTrend),out.header=FALSE,notes.append=FALSE, notes.label="",notes=c(""),star.cutoffs = NA))
|
1064 |
+
|
1065 |
+
t_ro <-gsub("\\multicolumn{9}{r}{} \\\\ ","", t_ro, fixed =TRUE)
|
1066 |
+
|
1067 |
+
sink(file="ProfessionsDiD.tex")
|
1068 |
+
cat(t_ro)
|
1069 |
+
sink()
|
1070 |
+
my_log <- file("my_log.txt")
|
1071 |
+
sink(my_log, append = TRUE, type = "output")
|
1072 |
+
sink(my_log, append=TRUE, type="message")
|
1073 |
+
|
1074 |
+
con <- file("test.log")
|
1075 |
+
sink(con, append=TRUE)
|
38/replication_package/cands.Rda
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:db4b934d9b6acb79b192ab9aab0cc4da8e546ebb9bc855b30791e6907d59b16e
|
3 |
+
size 23356019
|
38/replication_package/els.Rda
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a7b5972081d468fe0e5cec1e64e0bb18eabc313715f7c56c5d488b4ee22855f0
|
3 |
+
size 1466102
|
38/should_reproduce.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bdd6a0d3fa3c58213acec4b2949638f45635114bb4a10cecec2ecb3b63853c84
|
3 |
+
size 15
|