Commit
·
4897581
1
Parent(s):
c907c18
add 25
Browse files- 25/paper.pdf +3 -0
- 25/replication_package/AJPS_2021_Kim_Appendix.R +780 -0
- 25/replication_package/AJPS_2021_Kim_Appendix_RMarkdown.Rmd +777 -0
- 25/replication_package/AJPS_2021_Kim_Appendix_RMarkdown.html +0 -0
- 25/replication_package/AJPS_2021_Kim_Manuscript.R +330 -0
- 25/replication_package/AJPS_2021_Kim_Manuscript_RMarkdown.Rmd +317 -0
- 25/replication_package/AJPS_2021_Kim_Manuscript_RMarkdown.html +0 -0
- 25/replication_package/AJPS_Kim_readme.txt +3 -0
- 25/replication_package/AJPS_Replication_Data_Codebook.pdf +3 -0
- 25/replication_package/anes2016.rdata +3 -0
- 25/replication_package/appendix_table_b1.xlsx +3 -0
- 25/replication_package/combined.rdata +3 -0
- 25/replication_package/contentanalysis.rdata +3 -0
- 25/replication_package/gss.rdata +3 -0
- 25/replication_package/imdb.rdata +3 -0
- 25/replication_package/iscap.rdata +3 -0
- 25/replication_package/labinthefield.rdata +3 -0
- 25/replication_package/merit.rdata +3 -0
- 25/replication_package/mturk.rdata +3 -0
- 25/replication_package/nyt.RData +3 -0
- 25/replication_package/ssi.rdata +3 -0
- 25/replication_package/tvcoding.rdata +3 -0
- 25/should_reproduce.txt +3 -0
25/paper.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c30991c973eca15183b5ff245fc6adeb4c145059af922126a47612dd895a8821
|
3 |
+
size 630868
|
25/replication_package/AJPS_2021_Kim_Appendix.R
ADDED
@@ -0,0 +1,780 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
4 |
+
# ------------------------------------------- -------------------------------------------------------------------------------------
|
5 |
+
# Entertaining Beliefs in Economic Mobility
|
6 |
+
# Eunji Kim, 2021
|
7 |
+
# American Journal of Political Science
|
8 |
+
# APPENDIX #
|
9 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
10 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
11 |
+
|
12 |
+
#list.of.packages <- c("foreign", "ggplot2", "readstata13", "dplyr", "haven", "xtable", "stargazer", "tidytext", "stringr", "tidyr", "wordcloud", "scales", "tables", "ggpubr", "lubridate", "DescTools", "ggeffects", "tidyverse", "egg")
|
13 |
+
#new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
|
14 |
+
#if(length(new.packages)) install.packages(new.packages)
|
15 |
+
|
16 |
+
#setwd("[path to where replication archive was downloaded]")
|
17 |
+
|
18 |
+
|
19 |
+
library(foreign)
|
20 |
+
library(ggplot2)
|
21 |
+
library(readstata13)
|
22 |
+
library(dplyr)
|
23 |
+
library(haven)
|
24 |
+
library(xtable)
|
25 |
+
library(stargazer)
|
26 |
+
library(tidytext)
|
27 |
+
library(stringr)
|
28 |
+
library(tidyr)
|
29 |
+
library(wordcloud)
|
30 |
+
library(scales)
|
31 |
+
library(tables)
|
32 |
+
library(ggpubr)
|
33 |
+
library(lubridate)
|
34 |
+
library(scales)
|
35 |
+
library(DescTools)
|
36 |
+
library(ggeffects)
|
37 |
+
library(tidyverse)
|
38 |
+
library(egg)
|
39 |
+
|
40 |
+
|
41 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
42 |
+
|
43 |
+
# APPENDIX A
|
44 |
+
|
45 |
+
## Figure A1. Content analysis results of reality/game programs aired 2015-2017.
|
46 |
+
|
47 |
+
|
48 |
+
load("contentanalysis.rdata")
|
49 |
+
|
50 |
+
ca$ordinary <- as.factor(ca$ordinary)
|
51 |
+
ca$economicbenefit <- as.factor(ca$economicbenefit)
|
52 |
+
ca$hardwork <- as.factor(ca$hardwork)
|
53 |
+
|
54 |
+
ca$ordinary <- factor(ca$ordinary,
|
55 |
+
levels = c(0,1,2),
|
56 |
+
labels = c("Celebrity", "Professional", "Everyman"))
|
57 |
+
|
58 |
+
|
59 |
+
ca$economicbenefit <- factor(ca$economicbenefit,
|
60 |
+
levels = c(0,1,2),
|
61 |
+
labels = c("None/trivial", "Modest", "Significant"))
|
62 |
+
|
63 |
+
ca$hardwork <- factor(ca$hardwork,
|
64 |
+
levels = c(0,1,2),
|
65 |
+
labels = c("Not much effort", "Some effort", "A lot of effort"))
|
66 |
+
|
67 |
+
|
68 |
+
ordinary.pct = ca %>% group_by(ordinary) %>%
|
69 |
+
dplyr::summarise(count = n()) %>%
|
70 |
+
mutate(pct=count/sum(count))
|
71 |
+
|
72 |
+
econ.pct = ca %>% group_by(economicbenefit) %>%
|
73 |
+
dplyr::summarise(count = n()) %>%
|
74 |
+
mutate(pct=count/sum(count))
|
75 |
+
hardwork.pct = ca %>% group_by(hardwork) %>%
|
76 |
+
dplyr::summarise(count = n()) %>%
|
77 |
+
mutate(pct=count/sum(count))
|
78 |
+
|
79 |
+
ordinary.pct$ordinary <- factor(ordinary.pct$ordinary , levels=c("Celebrity", "Professional", "Everyman"))
|
80 |
+
|
81 |
+
|
82 |
+
p1 <- ggplot(ordinary.pct, aes(x=ordinary, y=pct*100, fill=ordinary)) +
|
83 |
+
geom_bar(stat="identity", width = 0.4, position=position_dodge(0.1)) +
|
84 |
+
theme(aspect.ratio = 1) +
|
85 |
+
scale_fill_manual(values = c("Celebrity" = "#214D72", "Professional" = "#2C7695", "Everyman"="#50BFC3")) +
|
86 |
+
scale_y_continuous(limits=c(0,100)) +
|
87 |
+
geom_text(data=ordinary.pct, aes(label=paste0(round(pct*100,1),"%"), y=pct*100+3), size=4) +
|
88 |
+
ylab("Percent") + xlab("") +
|
89 |
+
ggtitle("Type of People") + theme_minimal() + theme(legend.position="none") +
|
90 |
+
theme(legend.title = element_blank()) +
|
91 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
92 |
+
axis.text.y = element_text(color= "black", size=12),
|
93 |
+
axis.text.x = element_text(color= "black", size=12),
|
94 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
95 |
+
plot.title = element_text(size = 14, face="bold"))
|
96 |
+
|
97 |
+
ordinary.pct$ordinary <- factor(ordinary.pct$ordinary , levels=c("Celebrity", "Professional", "Everyman"))
|
98 |
+
|
99 |
+
econ.pct$economicbenefit <- factor(econ.pct$economicbenefit, levels=c("None/trivial", "Modest", "Significant"))
|
100 |
+
|
101 |
+
p2 <- ggplot(econ.pct, aes(x=economicbenefit, y=pct*100, fill=economicbenefit)) +
|
102 |
+
geom_bar(stat="identity", width = 0.4, position=position_dodge(0.1)) + theme(aspect.ratio = 1) +
|
103 |
+
scale_fill_manual(values = c("None/trivial" = "#214D72", "Modest" = "#2C7695", "Significant"="#50BFC3" )) +
|
104 |
+
scale_y_continuous(limits=c(0,100)) +
|
105 |
+
geom_text(data=econ.pct, aes(label=paste0(round(pct*100,1),"%"), y=pct*100+3), size=4) +
|
106 |
+
ylab("") + xlab("") +
|
107 |
+
ggtitle("Degree of Economic Benefit") + theme_minimal() + theme(legend.position="none") +
|
108 |
+
theme(legend.title = element_blank()) +
|
109 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
110 |
+
axis.text.y = element_blank(),
|
111 |
+
axis.text.x = element_text(color= "black", size=12),
|
112 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
113 |
+
plot.title = element_text(size = 14, face="bold"))
|
114 |
+
|
115 |
+
hardwork.pct$hardwork <- factor(hardwork.pct$hardwork, levels=c("Not much effort", "Some effort", "A lot of effort"))
|
116 |
+
|
117 |
+
p3 <- ggplot(hardwork.pct, aes(x=hardwork, y=pct*100, fill=hardwork)) +
|
118 |
+
geom_bar(stat="identity", width = 0.4, position=position_dodge(0.1)) + theme(aspect.ratio = 1) +
|
119 |
+
scale_fill_manual(values = c("Not much effort" = "#214D72", "Some effort" = "#2C7695", "A lot of effort"="#50BFC3")) +
|
120 |
+
scale_y_continuous(limits=c(0,100)) +
|
121 |
+
geom_text(data=hardwork.pct, aes(label=paste0(round(pct*100,1),"%"), y=pct*100+3), size=4) +
|
122 |
+
ylab("") + xlab("") +
|
123 |
+
ggtitle("Amount of Hard Work/Effort") + theme_minimal() + theme(legend.position="none") +
|
124 |
+
theme(legend.title = element_blank()) +
|
125 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
126 |
+
axis.text.y = element_blank(),
|
127 |
+
axis.text.x = element_text(color= "black", size=12),
|
128 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
129 |
+
plot.title = element_text(size = 14, face="bold"))
|
130 |
+
|
131 |
+
#jpeg("contentanalysis.jpeg", units="in", width=12, height=4.5, res=300)
|
132 |
+
|
133 |
+
egg::ggarrange(p1, p2, p3,nrow = 1)
|
134 |
+
|
135 |
+
#dev.off()
|
136 |
+
|
137 |
+
|
138 |
+
|
139 |
+
## Table A1. Full Coding Results for a Random Subset of Competitive Reality/Game Shows
|
140 |
+
|
141 |
+
load("tvcoding.rdata")
|
142 |
+
|
143 |
+
first <- CohenKappa(tvcoding$ordinary1, tvcoding$ordinary2, weights = c("Unweighted"))
|
144 |
+
second <- CohenKappa(tvcoding$benefit1, tvcoding$benefit2, weights = c("Unweighted"))
|
145 |
+
third <- CohenKappa(tvcoding$hardwork1, tvcoding$hardwork2, weights = c("Unweighted"))
|
146 |
+
|
147 |
+
# Cohen's Kappa (unweighted) for the first category
|
148 |
+
round(first, digits=3)
|
149 |
+
|
150 |
+
# Cohen's Kappa (unweighted) for the second category
|
151 |
+
round(second, digits=3)
|
152 |
+
|
153 |
+
# Cohen's Kappa (unweighted) for the third category
|
154 |
+
round(third, digits=3)
|
155 |
+
|
156 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
157 |
+
# APPENDIX B
|
158 |
+
|
159 |
+
## Figure B1. Relative Share of news shows and reality/game shows over time (1960-2017)
|
160 |
+
|
161 |
+
load("imdb.rdata")
|
162 |
+
|
163 |
+
p <- ggplot(imdb, aes(x = year, y = value,fill = variable),
|
164 |
+
scale_fill_manual(breaks = c("news", "realitygame"), values =c("#24345A", "#2B8D9C"))) +
|
165 |
+
scale_x_continuous(breaks=seq(1960,2018,4)) +
|
166 |
+
scale_y_continuous(breaks=seq(0,0.7,0.05)) +
|
167 |
+
xlab("Year") + ylab("% of TV Shows by Genre") +
|
168 |
+
geom_jitter(size=2, aes(colour=variable), alpha=1) +
|
169 |
+
scale_color_manual(breaks = c("news", "realitygame"), values =c("#24345A", "#2B8D9C")) +
|
170 |
+
geom_smooth(aes(x=year, y=value, color=as.factor(variable))) +
|
171 |
+
scale_fill_manual(breaks = c("news", "realitygame"), values =c("#24345A", "#2B8D9C")) +
|
172 |
+
theme_minimal() +
|
173 |
+
theme(legend.title = element_blank(), legend.position = "none") +
|
174 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
175 |
+
axis.text.y = element_text(color= "black", size=12),
|
176 |
+
axis.text.x = element_text(color= "black", size=12),
|
177 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
178 |
+
plot.title = element_text(size = 14, face="bold"))
|
179 |
+
|
180 |
+
p <- p + theme(legend.position = "none") +
|
181 |
+
ggplot2::annotate("text", x = 1995, y = 0.13, fontface=2, size=4,
|
182 |
+
label = "REALITY/GAME", color="#2B8D9C") +
|
183 |
+
ggplot2::annotate("text", x = 2012, y = 0.05, fontface=2, size=4,
|
184 |
+
label = "NEWS", color= "#24345A") +
|
185 |
+
theme(panel.grid.minor = element_blank(),
|
186 |
+
panel.grid.major = element_line(color = "gray50", size = 0.1),
|
187 |
+
panel.grid.major.x = element_blank(),
|
188 |
+
panel.background = element_blank(),
|
189 |
+
axis.line.x = element_line(size = 0.1, linetype = "solid", colour = "gray50"))
|
190 |
+
|
191 |
+
|
192 |
+
|
193 |
+
#jpeg("imdbplot.jpeg", units="in", width=10, height=6, res=300)
|
194 |
+
|
195 |
+
p
|
196 |
+
|
197 |
+
#dev.off()
|
198 |
+
|
199 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
200 |
+
|
201 |
+
# APPENDIX E
|
202 |
+
|
203 |
+
## Table E1. Program-Level Entertainment Media Consumption Patterns
|
204 |
+
|
205 |
+
|
206 |
+
load("ssi.rdata")
|
207 |
+
|
208 |
+
tv <- ssi %>%
|
209 |
+
dplyr::summarise( tv1=mean(tv_americagottalent)*100,
|
210 |
+
tv2=mean(tv_nflcbs)*100,
|
211 |
+
tv3=mean(tv_sundayfootball)*100,
|
212 |
+
tv4=mean(tv_foxnfl)*100,
|
213 |
+
tv5=mean(tv_sharktank)*100,
|
214 |
+
tv6 = mean(tv_hellkitchen)*100,
|
215 |
+
tv7 = mean(tv_voice)*100,
|
216 |
+
tv8 = mean(tv_idol)*100,
|
217 |
+
tv9 = mean(tv_ninja)*100,
|
218 |
+
tv10 = mean(tv_masterchef)*100,
|
219 |
+
tv11 = mean(tv_celebrityfamily)*100,
|
220 |
+
tv12 = mean(tv_survivor)*100,
|
221 |
+
tv13 = mean(tv_mlbfox)*100,
|
222 |
+
tv14 = mean(tv_collegefootball)*100,
|
223 |
+
tv15 = mean(tv_youcandance)*100,
|
224 |
+
tv16 = mean(tv_amazingrace)*100,
|
225 |
+
tv17 = mean(tv_collegebasketball)*100,
|
226 |
+
tv18 = mean(tv_nbaprimetime)*100,
|
227 |
+
tv19 = mean(tv_kardashians)*100,
|
228 |
+
tv20 = mean(tv_nascar)*100,
|
229 |
+
tv21 = mean(tv_bachelor)*100,
|
230 |
+
tv22 = mean(tv_bachelorette)*100,
|
231 |
+
tv23 = mean(tv_jerseyshore)*100,
|
232 |
+
tv24 = mean(tv_housewives)*100,
|
233 |
+
tv25 = mean(tv_ufc)*100,
|
234 |
+
tv26 = mean(tv_worldofdance)*100,
|
235 |
+
tv27 = mean(tv_lovehiphop)*100,
|
236 |
+
tv28 = mean(tv_cbssports)*100,
|
237 |
+
tv29 = mean(tv_battlebots)*100,
|
238 |
+
tv30 = mean(tv_loveconnection)*100 )
|
239 |
+
|
240 |
+
m <- as.data.frame(t(tv))
|
241 |
+
|
242 |
+
colnames(m) <- c('prop')
|
243 |
+
|
244 |
+
m$prop<- round(m$prop, digits=1)
|
245 |
+
m$tv <- c("America's Got Talent", "NFL on CBS", "Sunday Night Football",
|
246 |
+
"Fox NFL Sunday", "Shark Tank", "Hell's Kichen", "Voice", "American Idol",
|
247 |
+
"American Ninja Warrior", "MasterChef", "Celebrity Family Feud", "Survivor",
|
248 |
+
"MLB on Fox", "Colege Football Today", "So You Think You Can Dance", "Amazing Race",
|
249 |
+
"College Bastketball on CBS", "NBA Saturday Primetime", "Keeping Up with Kardashians",
|
250 |
+
"NASCAR on Fox", "Bachelor", "Bachelorette", "Jersey Shore", "The Real Housewives", "UFC Fight Night",
|
251 |
+
"World of Dance", "Love and Hip Hop: Hollywood", "CBS Sports Spectaular", "BattleBots", "Love Connection")
|
252 |
+
|
253 |
+
m
|
254 |
+
|
255 |
+
|
256 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
257 |
+
|
258 |
+
# APPENDIX F
|
259 |
+
|
260 |
+
## Table F1.
|
261 |
+
|
262 |
+
load("ssi.rdata")
|
263 |
+
|
264 |
+
m1 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
265 |
+
|
266 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
267 |
+
education_n + income_n + married + female + age +
|
268 |
+
white + unemployed + polinterst + religion_attend +
|
269 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
270 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
271 |
+
|
272 |
+
m3 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
273 |
+
|
274 |
+
m4 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
275 |
+
education_n + income_n + married + female + age +
|
276 |
+
white + unemployed + polinterst + religion_attend +
|
277 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
278 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
279 |
+
|
280 |
+
m5 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
281 |
+
|
282 |
+
m6 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
283 |
+
education_n + income_n + married + female + age +
|
284 |
+
white + unemployed + polinterst + religion_attend +
|
285 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
286 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
287 |
+
|
288 |
+
|
289 |
+
table <- capture.output({stargazer(m1, m2, m3, m4, m5, m6,
|
290 |
+
dep.var.caption = "",
|
291 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
292 |
+
omit = c('state_n') ,
|
293 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
294 |
+
no.space=TRUE,
|
295 |
+
star.char = c("+", "*", "**", "***"),
|
296 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
297 |
+
notes.append = F,
|
298 |
+
notes.align="l",
|
299 |
+
digits=3,
|
300 |
+
align = TRUE,
|
301 |
+
type= "text")
|
302 |
+
})
|
303 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
304 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
305 |
+
cat(table)
|
306 |
+
|
307 |
+
|
308 |
+
## Table F2.
|
309 |
+
|
310 |
+
m2_conti <- lm(mindex_rsc ~ realitytv + othertv + sportstv + rep + dem +
|
311 |
+
education_n + income_n + married + female + age +
|
312 |
+
white + unemployed + polinterst + religion_attend +
|
313 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
314 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
315 |
+
|
316 |
+
table <- capture.output({stargazer(m2_conti,
|
317 |
+
dep.var.caption = "",
|
318 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
319 |
+
omit = c('state_n') ,
|
320 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
321 |
+
no.space=TRUE,
|
322 |
+
star.char = c("+", "*", "**", "***"),
|
323 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
324 |
+
notes.append = F,
|
325 |
+
notes.align="l",
|
326 |
+
digits=3,
|
327 |
+
align = TRUE,
|
328 |
+
type= "text")
|
329 |
+
})
|
330 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
331 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
332 |
+
cat(table)
|
333 |
+
|
334 |
+
|
335 |
+
## Table F3. The Impact of Watching Rags-to-Riches Programs By Level of Political Interest
|
336 |
+
|
337 |
+
load("ssi.rdata")
|
338 |
+
|
339 |
+
plow <- lm(mindex_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
340 |
+
education_n + income_n + married + female + age +
|
341 |
+
white + unemployed + religion_attend +
|
342 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
343 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==0,])
|
344 |
+
|
345 |
+
|
346 |
+
phigh <- lm(mindex_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
347 |
+
education_n + income_n + married + female + age +
|
348 |
+
white + unemployed + religion_attend +
|
349 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
350 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==1,])
|
351 |
+
|
352 |
+
|
353 |
+
plow_i <- lm(internalatt_rsc~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
354 |
+
education_n + income_n + married + female + age +
|
355 |
+
white + unemployed + religion_attend +
|
356 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
357 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==0,])
|
358 |
+
|
359 |
+
|
360 |
+
phigh_i <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
361 |
+
education_n + income_n + married + female + age +
|
362 |
+
white + unemployed + religion_attend +
|
363 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
364 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==1,])
|
365 |
+
|
366 |
+
plow_e <- lm(externalatt_rsc~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
367 |
+
education_n + income_n + married + female + age +
|
368 |
+
white + unemployed + religion_attend +
|
369 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
370 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==0,])
|
371 |
+
|
372 |
+
|
373 |
+
phigh_e <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
374 |
+
education_n + income_n + married + female + age +
|
375 |
+
white + unemployed + religion_attend +
|
376 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
377 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==1,])
|
378 |
+
|
379 |
+
|
380 |
+
table <- capture.output({stargazer(plow, phigh, plow_i, phigh_i, plow_e, phigh_e,
|
381 |
+
dep.var.caption = "",
|
382 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
383 |
+
omit = c('state_n') ,
|
384 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
385 |
+
no.space=TRUE,
|
386 |
+
star.char = c("+", "*", "**", "***"),
|
387 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
388 |
+
notes.append = F,
|
389 |
+
notes.align="l",
|
390 |
+
digits=3,
|
391 |
+
align = TRUE,
|
392 |
+
type= "text")
|
393 |
+
})
|
394 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
395 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
396 |
+
cat(table)
|
397 |
+
|
398 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
399 |
+
# APPENIDX G
|
400 |
+
|
401 |
+
|
402 |
+
## Table G1, Columns (1) to (3)
|
403 |
+
|
404 |
+
|
405 |
+
load("anes2016.rdata")
|
406 |
+
|
407 |
+
# ANES 2016
|
408 |
+
|
409 |
+
aw <- lm(mobilityindex_rsc ~ realitynew + rep + dem + ideo_conserv + white + educat3 +
|
410 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
411 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger ,
|
412 |
+
data=anes2016, weights=V160102)
|
413 |
+
|
414 |
+
awr <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
415 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
416 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
417 |
+
data=anes2016[anes2016$rep==1,], weights=V160102)
|
418 |
+
|
419 |
+
awd <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
420 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
421 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
422 |
+
data=anes2016[anes2016$dem==1,], weights=V160102)
|
423 |
+
|
424 |
+
|
425 |
+
table <- capture.output({stargazer(aw, awr, awd,
|
426 |
+
column.labels = c('All', 'Rep','Dem'),
|
427 |
+
column.separate = c(1, 1, 1),
|
428 |
+
dep.var.caption = "",
|
429 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
430 |
+
omit = c('PPSTATEN_11', 'ideo_conserv', "white", "educat3", "female", "income", "agecat13",
|
431 |
+
"married", "bornagain", "outofwork", "wrongdirection", "econbetterthanlastyear",
|
432 |
+
"unemployment_worse", "incomegap_larger", "rep", "dem", "Constant") ,
|
433 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
434 |
+
no.space=TRUE,
|
435 |
+
star.char = c("+", "*", "**", "***"),
|
436 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
437 |
+
notes.append = F,
|
438 |
+
notes.align="l",
|
439 |
+
digits=3,
|
440 |
+
align = TRUE,
|
441 |
+
type="text")
|
442 |
+
})
|
443 |
+
#table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
444 |
+
#table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
445 |
+
cat(table)
|
446 |
+
|
447 |
+
## Table G1, Columns (4) to (6)
|
448 |
+
|
449 |
+
# iscap
|
450 |
+
|
451 |
+
load("iscap.rdata")
|
452 |
+
|
453 |
+
ia <- lm(mobility_rsc ~ combined +
|
454 |
+
newscount_w8_new +
|
455 |
+
rep_11 + dem_11 +
|
456 |
+
ideo_11_rsc + age +
|
457 |
+
female_11 + income +
|
458 |
+
married_11 + white_11 +
|
459 |
+
educ_11 + protestant +
|
460 |
+
unemployed_11 + socio_11_rsc +
|
461 |
+
PPMSACAT_11 + sjs_mean_rsc,
|
462 |
+
data=iscap, weights=weight1_11)
|
463 |
+
|
464 |
+
|
465 |
+
|
466 |
+
iar <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
467 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
468 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$rep_11==1,], weights=weight1_11)
|
469 |
+
|
470 |
+
|
471 |
+
iad <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
472 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
473 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$dem_11==1,], weights=weight1_11)
|
474 |
+
|
475 |
+
|
476 |
+
table <- capture.output({stargazer( ia, iar, iad,
|
477 |
+
column.labels = c( 'All', 'Rep','Dem'),
|
478 |
+
column.separate = c( 1, 1, 1),
|
479 |
+
dep.var.caption = "",
|
480 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
481 |
+
omit = c('newscount_w8_new', 'rep_11', "dem_11", "ideo_11_rsc", "age",
|
482 |
+
'female_11', "income", "married_11", "white_11",
|
483 |
+
'educ_11', "protestant", "unemployed_11", "socio_11_rsc",
|
484 |
+
"PPMSACAT_11", "sjs_mean_rsc", "Constant") ,
|
485 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
486 |
+
no.space=TRUE,
|
487 |
+
star.char = c("+", "*", "**", "***"),
|
488 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
489 |
+
notes.append = F,
|
490 |
+
notes.align="l",
|
491 |
+
digits=3,
|
492 |
+
align = TRUE,
|
493 |
+
type="text")
|
494 |
+
})
|
495 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
496 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
497 |
+
cat(table)
|
498 |
+
|
499 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
500 |
+
# APPENIDX H
|
501 |
+
|
502 |
+
# Table H1. Columns (1) to (4)
|
503 |
+
|
504 |
+
load("anes2016.rdata")
|
505 |
+
|
506 |
+
|
507 |
+
aw <- lm(mobilityindex_rsc ~ realitynew + rep + dem + ideo_conserv + white + educat3 +
|
508 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
509 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger ,
|
510 |
+
data=anes2016, weights=V160102)
|
511 |
+
|
512 |
+
awr <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
513 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
514 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
515 |
+
data=anes2016[anes2016$rep==1,], weights=V160102)
|
516 |
+
|
517 |
+
awd <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
518 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
519 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
520 |
+
data=anes2016[anes2016$dem==1,], weights=V160102)
|
521 |
+
|
522 |
+
|
523 |
+
awi <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
524 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
525 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
526 |
+
data=anes2016[anes2016$ind==1,], weights=V160102)
|
527 |
+
|
528 |
+
table <- capture.output({stargazer(aw, awr, awd, awi,
|
529 |
+
column.labels = c('All', 'Rep','Dem', "Ind"),
|
530 |
+
column.separate = c(1, 1, 1, 1),
|
531 |
+
dep.var.caption = "",
|
532 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
533 |
+
omit = c('PPSTATEN_11', 'ideo_conserv', "white", "educat3", "female", "income", "agecat13",
|
534 |
+
"married", "bornagain", "outofwork", "wrongdirection", "econbetterthanlastyear",
|
535 |
+
"unemployment_worse", "incomegap_larger", "rep", "dem", "Constant") ,
|
536 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
537 |
+
no.space=TRUE,
|
538 |
+
star.char = c("+", "*", "**", "***"),
|
539 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
540 |
+
notes.append = F,
|
541 |
+
notes.align="l",
|
542 |
+
digits=3,
|
543 |
+
align = TRUE,
|
544 |
+
type="text")
|
545 |
+
})
|
546 |
+
#table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
547 |
+
#table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
548 |
+
cat(table)
|
549 |
+
|
550 |
+
# Table H1. Columns (5) to (8)
|
551 |
+
|
552 |
+
|
553 |
+
load("iscap.rdata")
|
554 |
+
|
555 |
+
|
556 |
+
ia <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
557 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
558 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc,
|
559 |
+
data=iscap, weights=weight1_11)
|
560 |
+
|
561 |
+
iar <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
562 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
563 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$rep_11==1,], weights=weight1_11)
|
564 |
+
|
565 |
+
|
566 |
+
iad <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
567 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
568 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$dem_11==1,], weights=weight1_11)
|
569 |
+
|
570 |
+
|
571 |
+
iai <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
572 |
+
ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
573 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$ind_11==1,], weights=weight1_11)
|
574 |
+
|
575 |
+
|
576 |
+
table <- capture.output({stargazer( ia, iar, iad, iai,
|
577 |
+
column.labels = c( 'All', 'Rep','Dem', "Ind"),
|
578 |
+
column.separate = c( 1, 1, 1),
|
579 |
+
dep.var.caption = "",
|
580 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
581 |
+
omit = c('newscount_w8_new', 'rep_11', "dem_11", "ideo_11_rsc", "age",
|
582 |
+
'female_11', "income", "married_11", "white_11",
|
583 |
+
'educ_11', "protestant", "unemployed_11", "socio_11_rsc",
|
584 |
+
"PPMSACAT_11", "sjs_mean_rsc", "Constant") ,
|
585 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
586 |
+
no.space=TRUE,
|
587 |
+
star.char = c("+", "*", "**", "***"),
|
588 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
589 |
+
notes.append = F,
|
590 |
+
notes.align="l",
|
591 |
+
digits=3,
|
592 |
+
align = TRUE,
|
593 |
+
type="text")
|
594 |
+
})
|
595 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
596 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
597 |
+
cat(table)
|
598 |
+
|
599 |
+
|
600 |
+
|
601 |
+
|
602 |
+
|
603 |
+
## Table H2 2018 Media and Culture Survey Results by Party ID
|
604 |
+
|
605 |
+
load("ssi.rdata")
|
606 |
+
|
607 |
+
|
608 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
609 |
+
education_n + income_n + married + female + age +
|
610 |
+
white + unemployed + polinterst + religion_attend +
|
611 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
612 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
613 |
+
|
614 |
+
|
615 |
+
m2r <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv +
|
616 |
+
education_n + income_n + married + female + age +
|
617 |
+
white + unemployed + polinterst + religion_attend +
|
618 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
619 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi[ssi$rep==1,])
|
620 |
+
|
621 |
+
m2d <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv +
|
622 |
+
education_n + income_n + married + female + age +
|
623 |
+
white + unemployed + polinterst + religion_attend +
|
624 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
625 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi[ssi$dem==1,])
|
626 |
+
|
627 |
+
|
628 |
+
m2i <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv +
|
629 |
+
education_n + income_n + married + female + age +
|
630 |
+
white + unemployed + polinterst + religion_attend +
|
631 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
632 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi[ssi$ind==1,])
|
633 |
+
|
634 |
+
|
635 |
+
|
636 |
+
table <- capture.output({stargazer(m2, m2r, m2d, m2i,
|
637 |
+
column.labels = c('All', 'Rep','Dem', 'Ind'),
|
638 |
+
column.separate = c(1, 1, 1, 1),
|
639 |
+
dep.var.caption = "",
|
640 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
641 |
+
omit = c('state_n', "othertv", "sportstv", "education_n", "income_n", "married", "female", "age",
|
642 |
+
"white", "unemployed", "polinterst", "religion_attend", "protestant", "optimismindex", "insecurity",
|
643 |
+
"intergenmobility", "parentsimmigrant", "absolutemobility", "gini", "Constant", "rep", "dem") ,
|
644 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
645 |
+
no.space=TRUE,
|
646 |
+
star.char = c("+", "*", "**", "***"),
|
647 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
648 |
+
notes.append = F,
|
649 |
+
notes.align="l",
|
650 |
+
label = "ssi2018",
|
651 |
+
title = "ssi2018",
|
652 |
+
digits=3,
|
653 |
+
align = TRUE,
|
654 |
+
type="text")
|
655 |
+
})
|
656 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
657 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
658 |
+
cat(table)
|
659 |
+
|
660 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
661 |
+
# APPENDIX K
|
662 |
+
|
663 |
+
|
664 |
+
load("combined.rdata")
|
665 |
+
|
666 |
+
# manipulation check
|
667 |
+
|
668 |
+
# person featured on the show profitted a lot financially
|
669 |
+
t.test(combined$m1_rsc ~ combined$condition2)
|
670 |
+
# likely to have a higher income from now
|
671 |
+
t.test(combined$m2_rsc ~ combined$condition2)
|
672 |
+
# has a good work ethic
|
673 |
+
t.test(combined$m3_rsc ~ combined$condition2)
|
674 |
+
# showed that people can succeed when they are willing to work hard
|
675 |
+
t.test(combined$m4_rsc ~ combined$condition2)
|
676 |
+
# liked the program
|
677 |
+
t.test(combined$like ~ combined$condition2)
|
678 |
+
# thought the program was entertaining
|
679 |
+
t.test(combined$entertaining ~ combined$condition2)
|
680 |
+
|
681 |
+
|
682 |
+
## Table K1. Heterogeneous Treatment Effects by System Justification Tendency
|
683 |
+
|
684 |
+
|
685 |
+
j <- lm(mperception_combined ~ condition2*sjs_high + pid + optimism_index + date + as.factor(surveymode_n),
|
686 |
+
data=combined)
|
687 |
+
|
688 |
+
table <- capture.output({stargazer(j,
|
689 |
+
covariate.labels = c('Rags-to-Riches TV Treatment', "System Justification Scale - High", "Party ID",
|
690 |
+
"Optimism Index", "Treatment x System Justification Scale"),
|
691 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
692 |
+
omit = c('surveymode_n', 'date') ,
|
693 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
694 |
+
no.space=TRUE,
|
695 |
+
star.char = c("+", "*", "**", "***"),
|
696 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
697 |
+
notes.append = F,
|
698 |
+
notes.align="l",
|
699 |
+
label = "experiment",
|
700 |
+
title = "Heterogeneous Treatment Effects by SJS",
|
701 |
+
digits=3,
|
702 |
+
align = TRUE,
|
703 |
+
type="text")
|
704 |
+
})
|
705 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
706 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
707 |
+
cat(table)
|
708 |
+
|
709 |
+
|
710 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
711 |
+
# APPENDIX L
|
712 |
+
|
713 |
+
# Table L1. The impact of merit-based rags-to-riches TV on redistribution-related attitudes
|
714 |
+
|
715 |
+
load("merit.rdata")
|
716 |
+
|
717 |
+
m1 <- lm( dv3_rich_rcd ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
718 |
+
m2 <- lm( dv3_poor_rcd ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
719 |
+
m3 <- lm( dv4_inequality_rsc ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
720 |
+
m4 <- lm( antigov2 ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
721 |
+
|
722 |
+
table <- capture.output({stargazer(m1, m2, m3, m4,
|
723 |
+
dep.var.labels= c('The rich works hard',
|
724 |
+
'The poor lacks efforts',
|
725 |
+
'Inequality is desirable',
|
726 |
+
'Anti-redistribution'),
|
727 |
+
covariate.labels = c('Meritocracy Treatment'),
|
728 |
+
dep.var.caption = "",
|
729 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
730 |
+
omit = c('surveymode_n', 'date_n', 'durationinseconds', 'rep', 'dem', 'Constant') ,
|
731 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
732 |
+
no.space=TRUE,
|
733 |
+
star.char = c("+", "*", "**", "***"),
|
734 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
735 |
+
notes.append = F,
|
736 |
+
notes.align="l",
|
737 |
+
label = "main",
|
738 |
+
title = "The Casual Effect of Merit-Based Rags-to-Riches TV",
|
739 |
+
digits=3,
|
740 |
+
align = TRUE,
|
741 |
+
type = "text")
|
742 |
+
})
|
743 |
+
|
744 |
+
#%table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
745 |
+
#table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
746 |
+
cat(table)
|
747 |
+
|
748 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
749 |
+
# APPENDIX M
|
750 |
+
# Figure M1
|
751 |
+
|
752 |
+
load("gss.rdata")
|
753 |
+
|
754 |
+
|
755 |
+
fit <- lm(getahead_new~ tv_dummy*as.factor(year) + news + polviews + pid3 +
|
756 |
+
age + income + as.factor(race) + educ + sex, data = gss, weights=gss$wtssall)
|
757 |
+
|
758 |
+
dat <- ggpredict(fit, terms = c("year", "tv_dummy"))
|
759 |
+
dat$year <- as.Date(as.character(dat$x), format = "%Y")
|
760 |
+
dat$year <- year(dat$year)
|
761 |
+
|
762 |
+
|
763 |
+
p1 <- ggplot(dat, aes(x=year, y=predicted, color=group, shape=group)) +
|
764 |
+
geom_smooth(span=1.2, se=T, alpha=0.2, aes(fill=group)) + scale_fill_manual(name='group', values=c("black", "#00A7A3"))+ geom_point() + scale_shape_manual(values = c(4, 11)) +
|
765 |
+
theme_minimal() + theme(legend.position="top") + guides(shape = FALSE, fill=F) +
|
766 |
+
xlab("Year") +
|
767 |
+
ylab("people can get ahead by working hard") + scale_x_continuous(breaks=seq(1970,2020,4)) +
|
768 |
+
scale_y_continuous(breaks=scales::pretty_breaks(n=4)) +
|
769 |
+
scale_color_manual(values=c("#214455", "#00A7A3", "grey40"), name="Overall TV Consumption", labels=c("Low", "High")) +
|
770 |
+
theme(axis.text.x = element_text(colour = "black", size=15),
|
771 |
+
axis.title.x = element_text(size=15),
|
772 |
+
axis.text.y=element_text(colour = "black", size=15),
|
773 |
+
legend.text=element_text(size=16, face="bold"), legend.title=element_text(size=16, face="bold"),
|
774 |
+
axis.title.y = element_text(size=18), panel.grid.minor.x = element_blank(), panel.grid.minor.y=element_blank())
|
775 |
+
p1
|
776 |
+
|
777 |
+
#pdf('gss_timetrend_new.pdf',height=6,width=8)
|
778 |
+
#p1
|
779 |
+
#dev.off()
|
780 |
+
|
25/replication_package/AJPS_2021_Kim_Appendix_RMarkdown.Rmd
ADDED
@@ -0,0 +1,777 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: "AJPS_2021_Kim_Appendix_Markdown"
|
3 |
+
subtitle: "Entertaining Beliefs in Economic Mobility"
|
4 |
+
author: "Eunji Kim"
|
5 |
+
date: "8/15/2021"
|
6 |
+
output: html_document
|
7 |
+
---
|
8 |
+
|
9 |
+
```{r, message=F, warning=F, echo=F}
|
10 |
+
# Load libraries
|
11 |
+
rm(list=ls())
|
12 |
+
library(foreign)
|
13 |
+
library(ggplot2)
|
14 |
+
library(readstata13)
|
15 |
+
library(dplyr)
|
16 |
+
library(haven)
|
17 |
+
library(xtable)
|
18 |
+
library(stargazer)
|
19 |
+
library(tidytext)
|
20 |
+
library(stringr)
|
21 |
+
library(tidyr)
|
22 |
+
library(wordcloud)
|
23 |
+
library(scales)
|
24 |
+
library(tables)
|
25 |
+
library(ggpubr)
|
26 |
+
library(lubridate)
|
27 |
+
library(scales)
|
28 |
+
library(DescTools)
|
29 |
+
library(ggeffects)
|
30 |
+
library(tidyverse)
|
31 |
+
library(egg)
|
32 |
+
|
33 |
+
```
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
```{r, warning=F, message=F, results="asis"}
|
38 |
+
|
39 |
+
|
40 |
+
# APPENDIX A
|
41 |
+
|
42 |
+
## Figure A1. Content analysis results of reality/game programs aired 2015-2017.
|
43 |
+
|
44 |
+
|
45 |
+
load("contentanalysis.rdata")
|
46 |
+
|
47 |
+
ca$ordinary <- as.factor(ca$ordinary)
|
48 |
+
ca$economicbenefit <- as.factor(ca$economicbenefit)
|
49 |
+
ca$hardwork <- as.factor(ca$hardwork)
|
50 |
+
|
51 |
+
ca$ordinary <- factor(ca$ordinary,
|
52 |
+
levels = c(0,1,2),
|
53 |
+
labels = c("Celebrity", "Professional", "Everyman"))
|
54 |
+
|
55 |
+
|
56 |
+
ca$economicbenefit <- factor(ca$economicbenefit,
|
57 |
+
levels = c(0,1,2),
|
58 |
+
labels = c("None/trivial", "Modest", "Significant"))
|
59 |
+
|
60 |
+
ca$hardwork <- factor(ca$hardwork,
|
61 |
+
levels = c(0,1,2),
|
62 |
+
labels = c("Not much effort", "Some effort", "A lot of effort"))
|
63 |
+
|
64 |
+
|
65 |
+
ordinary.pct = ca %>% group_by(ordinary) %>%
|
66 |
+
dplyr::summarise(count = n()) %>%
|
67 |
+
mutate(pct=count/sum(count))
|
68 |
+
|
69 |
+
econ.pct = ca %>% group_by(economicbenefit) %>%
|
70 |
+
dplyr::summarise(count = n()) %>%
|
71 |
+
mutate(pct=count/sum(count))
|
72 |
+
hardwork.pct = ca %>% group_by(hardwork) %>%
|
73 |
+
dplyr::summarise(count = n()) %>%
|
74 |
+
mutate(pct=count/sum(count))
|
75 |
+
|
76 |
+
ordinary.pct$ordinary <- factor(ordinary.pct$ordinary , levels=c("Celebrity", "Professional", "Everyman"))
|
77 |
+
|
78 |
+
|
79 |
+
p1 <- ggplot(ordinary.pct, aes(x=ordinary, y=pct*100, fill=ordinary)) +
|
80 |
+
geom_bar(stat="identity", width = 0.4, position=position_dodge(0.1)) +
|
81 |
+
theme(aspect.ratio = 1) +
|
82 |
+
scale_fill_manual(values = c("Celebrity" = "#214D72", "Professional" = "#2C7695", "Everyman"="#50BFC3")) +
|
83 |
+
scale_y_continuous(limits=c(0,100)) +
|
84 |
+
geom_text(data=ordinary.pct, aes(label=paste0(round(pct*100,1),"%"), y=pct*100+3), size=4) +
|
85 |
+
ylab("Percent") + xlab("") +
|
86 |
+
ggtitle("Type of People") + theme_minimal() + theme(legend.position="none") +
|
87 |
+
theme(legend.title = element_blank()) +
|
88 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
89 |
+
axis.text.y = element_text(color= "black", size=12),
|
90 |
+
axis.text.x = element_text(color= "black", size=12),
|
91 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
92 |
+
plot.title = element_text(size = 14, face="bold"))
|
93 |
+
|
94 |
+
ordinary.pct$ordinary <- factor(ordinary.pct$ordinary , levels=c("Celebrity", "Professional", "Everyman"))
|
95 |
+
|
96 |
+
econ.pct$economicbenefit <- factor(econ.pct$economicbenefit, levels=c("None/trivial", "Modest", "Significant"))
|
97 |
+
|
98 |
+
p2 <- ggplot(econ.pct, aes(x=economicbenefit, y=pct*100, fill=economicbenefit)) +
|
99 |
+
geom_bar(stat="identity", width = 0.4, position=position_dodge(0.1)) + theme(aspect.ratio = 1) +
|
100 |
+
scale_fill_manual(values = c("None/trivial" = "#214D72", "Modest" = "#2C7695", "Significant"="#50BFC3" )) +
|
101 |
+
scale_y_continuous(limits=c(0,100)) +
|
102 |
+
geom_text(data=econ.pct, aes(label=paste0(round(pct*100,1),"%"), y=pct*100+3), size=4) +
|
103 |
+
ylab("") + xlab("") +
|
104 |
+
ggtitle("Degree of Economic Benefit") + theme_minimal() + theme(legend.position="none") +
|
105 |
+
theme(legend.title = element_blank()) +
|
106 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
107 |
+
axis.text.y = element_blank(),
|
108 |
+
axis.text.x = element_text(color= "black", size=12),
|
109 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
110 |
+
plot.title = element_text(size = 14, face="bold"))
|
111 |
+
|
112 |
+
hardwork.pct$hardwork <- factor(hardwork.pct$hardwork, levels=c("Not much effort", "Some effort", "A lot of effort"))
|
113 |
+
|
114 |
+
p3 <- ggplot(hardwork.pct, aes(x=hardwork, y=pct*100, fill=hardwork)) +
|
115 |
+
geom_bar(stat="identity", width = 0.4, position=position_dodge(0.1)) + theme(aspect.ratio = 1) +
|
116 |
+
scale_fill_manual(values = c("Not much effort" = "#214D72", "Some effort" = "#2C7695", "A lot of effort"="#50BFC3")) +
|
117 |
+
scale_y_continuous(limits=c(0,100)) +
|
118 |
+
geom_text(data=hardwork.pct, aes(label=paste0(round(pct*100,1),"%"), y=pct*100+3), size=4) +
|
119 |
+
ylab("") + xlab("") +
|
120 |
+
ggtitle("Amount of Hard Work/Effort") + theme_minimal() + theme(legend.position="none") +
|
121 |
+
theme(legend.title = element_blank()) +
|
122 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
123 |
+
axis.text.y = element_blank(),
|
124 |
+
axis.text.x = element_text(color= "black", size=12),
|
125 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
126 |
+
plot.title = element_text(size = 14, face="bold"))
|
127 |
+
|
128 |
+
#jpeg("contentanalysis.jpeg", units="in", width=12, height=4.5, res=300)
|
129 |
+
|
130 |
+
egg::ggarrange(p1, p2, p3,nrow = 1)
|
131 |
+
|
132 |
+
#dev.off()
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
+
|
137 |
+
## Table A1. Full Coding Results for a Random Subset of Competitive Reality/Game Shows
|
138 |
+
|
139 |
+
load("tvcoding.rdata")
|
140 |
+
|
141 |
+
first <- CohenKappa(tvcoding$ordinary1, tvcoding$ordinary2, weights = c("Unweighted"))
|
142 |
+
second <- CohenKappa(tvcoding$benefit1, tvcoding$benefit2, weights = c("Unweighted"))
|
143 |
+
third <- CohenKappa(tvcoding$hardwork1, tvcoding$hardwork2, weights = c("Unweighted"))
|
144 |
+
|
145 |
+
# Cohen's Kappa (unweighted) for the first category
|
146 |
+
round(first, digits=3)
|
147 |
+
|
148 |
+
# Cohen's Kappa (unweighted) for the second category
|
149 |
+
round(second, digits=3)
|
150 |
+
|
151 |
+
# Cohen's Kappa (unweighted) for the third category
|
152 |
+
round(third, digits=3)
|
153 |
+
|
154 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
155 |
+
# APPENDIX B
|
156 |
+
|
157 |
+
## Figure B1. Relative Share of news shows and reality/game shows over time (1960-2017)
|
158 |
+
|
159 |
+
load("imdb.rdata")
|
160 |
+
|
161 |
+
p <- ggplot(imdb, aes(x = year, y = value,fill = variable),
|
162 |
+
scale_fill_manual(breaks = c("news", "realitygame"), values =c("#24345A", "#2B8D9C"))) +
|
163 |
+
scale_x_continuous(breaks=seq(1960,2018,4)) +
|
164 |
+
scale_y_continuous(breaks=seq(0,0.7,0.05)) +
|
165 |
+
xlab("Year") + ylab("% of TV Shows by Genre") +
|
166 |
+
geom_jitter(size=2, aes(colour=variable), alpha=1) +
|
167 |
+
scale_color_manual(breaks = c("news", "realitygame"), values =c("#24345A", "#2B8D9C")) +
|
168 |
+
geom_smooth(aes(x=year, y=value, color=as.factor(variable))) +
|
169 |
+
scale_fill_manual(breaks = c("news", "realitygame"), values =c("#24345A", "#2B8D9C")) +
|
170 |
+
theme_minimal() +
|
171 |
+
theme(legend.title = element_blank(), legend.position = "none") +
|
172 |
+
theme(axis.title.x = element_text(color="black", size=14, face="bold"),
|
173 |
+
axis.text.y = element_text(color= "black", size=12),
|
174 |
+
axis.text.x = element_text(color= "black", size=12),
|
175 |
+
axis.title.y = element_text(color="black", size=14, face="bold"),
|
176 |
+
plot.title = element_text(size = 14, face="bold"))
|
177 |
+
|
178 |
+
p <- p + theme(legend.position = "none") +
|
179 |
+
ggplot2::annotate("text", x = 1995, y = 0.13, fontface=2, size=4,
|
180 |
+
label = "REALITY/GAME", color="#2B8D9C") +
|
181 |
+
ggplot2::annotate("text", x = 2012, y = 0.05, fontface=2, size=4,
|
182 |
+
label = "NEWS", color= "#24345A") +
|
183 |
+
theme(panel.grid.minor = element_blank(),
|
184 |
+
panel.grid.major = element_line(color = "gray50", size = 0.1),
|
185 |
+
panel.grid.major.x = element_blank(),
|
186 |
+
panel.background = element_blank(),
|
187 |
+
axis.line.x = element_line(size = 0.1, linetype = "solid", colour = "gray50"))
|
188 |
+
|
189 |
+
|
190 |
+
|
191 |
+
#jpeg("imdbplot.jpeg", units="in", width=10, height=6, res=300)
|
192 |
+
|
193 |
+
p
|
194 |
+
|
195 |
+
#dev.off()
|
196 |
+
|
197 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
198 |
+
# APPENDIX E
|
199 |
+
|
200 |
+
## Table E1. Program-Level Entertainment Media Consumption Patterns
|
201 |
+
|
202 |
+
|
203 |
+
load("ssi.rdata")
|
204 |
+
|
205 |
+
tv <- ssi %>%
|
206 |
+
dplyr::summarise( tv1=mean(tv_americagottalent)*100,
|
207 |
+
tv2=mean(tv_nflcbs)*100,
|
208 |
+
tv3=mean(tv_sundayfootball)*100,
|
209 |
+
tv4=mean(tv_foxnfl)*100,
|
210 |
+
tv5=mean(tv_sharktank)*100,
|
211 |
+
tv6 = mean(tv_hellkitchen)*100,
|
212 |
+
tv7 = mean(tv_voice)*100,
|
213 |
+
tv8 = mean(tv_idol)*100,
|
214 |
+
tv9 = mean(tv_ninja)*100,
|
215 |
+
tv10 = mean(tv_masterchef)*100,
|
216 |
+
tv11 = mean(tv_celebrityfamily)*100,
|
217 |
+
tv12 = mean(tv_survivor)*100,
|
218 |
+
tv13 = mean(tv_mlbfox)*100,
|
219 |
+
tv14 = mean(tv_collegefootball)*100,
|
220 |
+
tv15 = mean(tv_youcandance)*100,
|
221 |
+
tv16 = mean(tv_amazingrace)*100,
|
222 |
+
tv17 = mean(tv_collegebasketball)*100,
|
223 |
+
tv18 = mean(tv_nbaprimetime)*100,
|
224 |
+
tv19 = mean(tv_kardashians)*100,
|
225 |
+
tv20 = mean(tv_nascar)*100,
|
226 |
+
tv21 = mean(tv_bachelor)*100,
|
227 |
+
tv22 = mean(tv_bachelorette)*100,
|
228 |
+
tv23 = mean(tv_jerseyshore)*100,
|
229 |
+
tv24 = mean(tv_housewives)*100,
|
230 |
+
tv25 = mean(tv_ufc)*100,
|
231 |
+
tv26 = mean(tv_worldofdance)*100,
|
232 |
+
tv27 = mean(tv_lovehiphop)*100,
|
233 |
+
tv28 = mean(tv_cbssports)*100,
|
234 |
+
tv29 = mean(tv_battlebots)*100,
|
235 |
+
tv30 = mean(tv_loveconnection)*100 )
|
236 |
+
|
237 |
+
m <- as.data.frame(t(tv))
|
238 |
+
|
239 |
+
colnames(m) <- c('prop')
|
240 |
+
|
241 |
+
m$prop<- round(m$prop, digits=1)
|
242 |
+
m$tv <- c("America's Got Talent", "NFL on CBS", "Sunday Night Football",
|
243 |
+
"Fox NFL Sunday", "Shark Tank", "Hell's Kichen", "Voice", "American Idol",
|
244 |
+
"American Ninja Warrior", "MasterChef", "Celebrity Family Feud", "Survivor",
|
245 |
+
"MLB on Fox", "Colege Football Today", "So You Think You Can Dance", "Amazing Race",
|
246 |
+
"College Bastketball on CBS", "NBA Saturday Primetime", "Keeping Up with Kardashians",
|
247 |
+
"NASCAR on Fox", "Bachelor", "Bachelorette", "Jersey Shore", "The Real Housewives", "UFC Fight Night",
|
248 |
+
"World of Dance", "Love and Hip Hop: Hollywood", "CBS Sports Spectaular", "BattleBots", "Love Connection")
|
249 |
+
|
250 |
+
m
|
251 |
+
|
252 |
+
|
253 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
254 |
+
|
255 |
+
# APPENDIX F
|
256 |
+
|
257 |
+
## Table F1.
|
258 |
+
|
259 |
+
load("ssi.rdata")
|
260 |
+
|
261 |
+
m1 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
262 |
+
|
263 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
264 |
+
education_n + income_n + married + female + age +
|
265 |
+
white + unemployed + polinterst + religion_attend +
|
266 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
267 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
268 |
+
|
269 |
+
m3 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
270 |
+
|
271 |
+
m4 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
272 |
+
education_n + income_n + married + female + age +
|
273 |
+
white + unemployed + polinterst + religion_attend +
|
274 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
275 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
276 |
+
|
277 |
+
m5 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
278 |
+
|
279 |
+
m6 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
280 |
+
education_n + income_n + married + female + age +
|
281 |
+
white + unemployed + polinterst + religion_attend +
|
282 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
283 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
284 |
+
|
285 |
+
|
286 |
+
table <- capture.output({stargazer(m1, m2, m3, m4, m5, m6,
|
287 |
+
dep.var.caption = "",
|
288 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
289 |
+
omit = c('state_n') ,
|
290 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
291 |
+
no.space=TRUE,
|
292 |
+
star.char = c("+", "*", "**", "***"),
|
293 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
294 |
+
notes.append = F,
|
295 |
+
notes.align="l",
|
296 |
+
digits=3,
|
297 |
+
align = TRUE,
|
298 |
+
type= "html")
|
299 |
+
})
|
300 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
301 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
302 |
+
cat(table)
|
303 |
+
|
304 |
+
|
305 |
+
## Table F2.
|
306 |
+
|
307 |
+
m2_conti <- lm(mindex_rsc ~ realitytv + othertv + sportstv + rep + dem +
|
308 |
+
education_n + income_n + married + female + age +
|
309 |
+
white + unemployed + polinterst + religion_attend +
|
310 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
311 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
312 |
+
|
313 |
+
table <- capture.output({stargazer(m2_conti,
|
314 |
+
dep.var.caption = "",
|
315 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
316 |
+
omit = c('state_n') ,
|
317 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
318 |
+
no.space=TRUE,
|
319 |
+
star.char = c("+", "*", "**", "***"),
|
320 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
321 |
+
notes.append = F,
|
322 |
+
notes.align="l",
|
323 |
+
digits=3,
|
324 |
+
align = TRUE,
|
325 |
+
type= "html")
|
326 |
+
})
|
327 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
328 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
329 |
+
cat(table)
|
330 |
+
|
331 |
+
|
332 |
+
## Table F3. The Impact of Watching Rags-to-Riches Programs By Level of Political Interest
|
333 |
+
|
334 |
+
load("ssi.rdata")
|
335 |
+
|
336 |
+
plow <- lm(mindex_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
337 |
+
education_n + income_n + married + female + age +
|
338 |
+
white + unemployed + religion_attend +
|
339 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
340 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==0,])
|
341 |
+
|
342 |
+
|
343 |
+
phigh <- lm(mindex_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
344 |
+
education_n + income_n + married + female + age +
|
345 |
+
white + unemployed + religion_attend +
|
346 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
347 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==1,])
|
348 |
+
|
349 |
+
|
350 |
+
plow_i <- lm(internalatt_rsc~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
351 |
+
education_n + income_n + married + female + age +
|
352 |
+
white + unemployed + religion_attend +
|
353 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
354 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==0,])
|
355 |
+
|
356 |
+
|
357 |
+
phigh_i <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
358 |
+
education_n + income_n + married + female + age +
|
359 |
+
white + unemployed + religion_attend +
|
360 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
361 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==1,])
|
362 |
+
|
363 |
+
plow_e <- lm(externalatt_rsc~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
364 |
+
education_n + income_n + married + female + age +
|
365 |
+
white + unemployed + religion_attend +
|
366 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
367 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==0,])
|
368 |
+
|
369 |
+
|
370 |
+
phigh_e <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer+ heavyviewer + othertv + sportstv + rep + dem +
|
371 |
+
education_n + income_n + married + female + age +
|
372 |
+
white + unemployed + religion_attend +
|
373 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
374 |
+
absolutemobility + gini + as.factor(state_n), data=ssi[ssi$polinterest_high==1,])
|
375 |
+
|
376 |
+
|
377 |
+
table <- capture.output({stargazer(plow, phigh, plow_i, phigh_i, plow_e, phigh_e,
|
378 |
+
dep.var.caption = "",
|
379 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
380 |
+
omit = c('state_n') ,
|
381 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
382 |
+
no.space=TRUE,
|
383 |
+
star.char = c("+", "*", "**", "***"),
|
384 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
385 |
+
notes.append = F,
|
386 |
+
notes.align="l",
|
387 |
+
digits=3,
|
388 |
+
align = TRUE,
|
389 |
+
type= "html")
|
390 |
+
})
|
391 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
392 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
393 |
+
cat(table)
|
394 |
+
|
395 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
396 |
+
|
397 |
+
# APPENIDX G
|
398 |
+
|
399 |
+
|
400 |
+
## Table G1, Columns (1) to (3)
|
401 |
+
|
402 |
+
|
403 |
+
load("anes2016.rdata")
|
404 |
+
|
405 |
+
# ANES 2016
|
406 |
+
|
407 |
+
aw <- lm(mobilityindex_rsc ~ realitynew + rep + dem + ideo_conserv + white + educat3 +
|
408 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
409 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger ,
|
410 |
+
data=anes2016, weights=V160102)
|
411 |
+
|
412 |
+
awr <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
413 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
414 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
415 |
+
data=anes2016[anes2016$rep==1,], weights=V160102)
|
416 |
+
|
417 |
+
awd <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
418 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
419 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
420 |
+
data=anes2016[anes2016$dem==1,], weights=V160102)
|
421 |
+
|
422 |
+
|
423 |
+
table <- capture.output({stargazer(aw, awr, awd,
|
424 |
+
column.labels = c('All', 'Rep','Dem'),
|
425 |
+
column.separate = c(1, 1, 1),
|
426 |
+
dep.var.caption = "",
|
427 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
428 |
+
omit = c('PPSTATEN_11', 'ideo_conserv', "white", "educat3", "female", "income", "agecat13",
|
429 |
+
"married", "bornagain", "outofwork", "wrongdirection", "econbetterthanlastyear",
|
430 |
+
"unemployment_worse", "incomegap_larger", "rep", "dem", "Constant") ,
|
431 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
432 |
+
no.space=TRUE,
|
433 |
+
star.char = c("+", "*", "**", "***"),
|
434 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
435 |
+
notes.append = F,
|
436 |
+
notes.align="l",
|
437 |
+
digits=3,
|
438 |
+
align = TRUE,
|
439 |
+
type="html")
|
440 |
+
})
|
441 |
+
#table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
442 |
+
#table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
443 |
+
cat(table)
|
444 |
+
|
445 |
+
## Table G1, Columns (4) to (6)
|
446 |
+
|
447 |
+
# iscap
|
448 |
+
|
449 |
+
load("iscap.rdata")
|
450 |
+
|
451 |
+
ia <- lm(mobility_rsc ~ combined +
|
452 |
+
newscount_w8_new +
|
453 |
+
rep_11 + dem_11 +
|
454 |
+
ideo_11_rsc + age +
|
455 |
+
female_11 + income +
|
456 |
+
married_11 + white_11 +
|
457 |
+
educ_11 + protestant +
|
458 |
+
unemployed_11 + socio_11_rsc +
|
459 |
+
PPMSACAT_11 + sjs_mean_rsc,
|
460 |
+
data=iscap, weights=weight1_11)
|
461 |
+
|
462 |
+
|
463 |
+
|
464 |
+
iar <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
465 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
466 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$rep_11==1,], weights=weight1_11)
|
467 |
+
|
468 |
+
|
469 |
+
iad <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
470 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
471 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$dem_11==1,], weights=weight1_11)
|
472 |
+
|
473 |
+
|
474 |
+
table <- capture.output({stargazer( ia, iar, iad,
|
475 |
+
column.labels = c( 'All', 'Rep','Dem'),
|
476 |
+
column.separate = c( 1, 1, 1),
|
477 |
+
dep.var.caption = "",
|
478 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
479 |
+
omit = c('newscount_w8_new', 'rep_11', "dem_11", "ideo_11_rsc", "age",
|
480 |
+
'female_11', "income", "married_11", "white_11",
|
481 |
+
'educ_11', "protestant", "unemployed_11", "socio_11_rsc",
|
482 |
+
"PPMSACAT_11", "sjs_mean_rsc", "Constant") ,
|
483 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
484 |
+
no.space=TRUE,
|
485 |
+
star.char = c("+", "*", "**", "***"),
|
486 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
487 |
+
notes.append = F,
|
488 |
+
notes.align="l",
|
489 |
+
digits=3,
|
490 |
+
align = TRUE,
|
491 |
+
type="html")
|
492 |
+
})
|
493 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
494 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
495 |
+
cat(table)
|
496 |
+
|
497 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
498 |
+
# Table H1. Columns (1) to (4)
|
499 |
+
|
500 |
+
load("anes2016.rdata")
|
501 |
+
|
502 |
+
|
503 |
+
aw <- lm(mobilityindex_rsc ~ realitynew + rep + dem + ideo_conserv + white + educat3 +
|
504 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
505 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger ,
|
506 |
+
data=anes2016, weights=V160102)
|
507 |
+
|
508 |
+
awr <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
509 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
510 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
511 |
+
data=anes2016[anes2016$rep==1,], weights=V160102)
|
512 |
+
|
513 |
+
awd <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
514 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
515 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
516 |
+
data=anes2016[anes2016$dem==1,], weights=V160102)
|
517 |
+
|
518 |
+
|
519 |
+
awi <- lm(mobilityindex_rsc ~ realitynew + ideo_conserv + white + educat3 +
|
520 |
+
female + income + agecat13 + married + bornagain + outofwork +
|
521 |
+
wrongdirection + econbetterthanlastyear + unemployment_worse + incomegap_larger,
|
522 |
+
data=anes2016[anes2016$ind==1,], weights=V160102)
|
523 |
+
|
524 |
+
table <- capture.output({stargazer(aw, awr, awd, awi,
|
525 |
+
column.labels = c('All', 'Rep','Dem', "Ind"),
|
526 |
+
column.separate = c(1, 1, 1, 1),
|
527 |
+
dep.var.caption = "",
|
528 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
529 |
+
omit = c('PPSTATEN_11', 'ideo_conserv', "white", "educat3", "female", "income", "agecat13",
|
530 |
+
"married", "bornagain", "outofwork", "wrongdirection", "econbetterthanlastyear",
|
531 |
+
"unemployment_worse", "incomegap_larger", "rep", "dem", "Constant") ,
|
532 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
533 |
+
no.space=TRUE,
|
534 |
+
star.char = c("+", "*", "**", "***"),
|
535 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
536 |
+
notes.append = F,
|
537 |
+
notes.align="l",
|
538 |
+
digits=3,
|
539 |
+
align = TRUE,
|
540 |
+
type="html")
|
541 |
+
})
|
542 |
+
#table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
543 |
+
#table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
544 |
+
cat(table)
|
545 |
+
|
546 |
+
|
547 |
+
# Table H1. Columns (5) to (8)
|
548 |
+
|
549 |
+
|
550 |
+
load("iscap.rdata")
|
551 |
+
|
552 |
+
|
553 |
+
ia <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
554 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
555 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc,
|
556 |
+
data=iscap, weights=weight1_11)
|
557 |
+
|
558 |
+
iar <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
559 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
560 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$rep_11==1,], weights=weight1_11)
|
561 |
+
|
562 |
+
|
563 |
+
iad <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
564 |
+
rep_11 + dem_11 + ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
565 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$dem_11==1,], weights=weight1_11)
|
566 |
+
|
567 |
+
|
568 |
+
iai <- lm(mobility_rsc ~ combined + newscount_w8_new +
|
569 |
+
ideo_11_rsc + age + female_11 + income + married_11 + white_11 +
|
570 |
+
educ_11 + protestant + unemployed_11 + socio_11_rsc + PPMSACAT_11 + sjs_mean_rsc, data=iscap[iscap$ind_11==1,], weights=weight1_11)
|
571 |
+
|
572 |
+
|
573 |
+
table <- capture.output({stargazer( ia, iar, iad, iai,
|
574 |
+
column.labels = c( 'All', 'Rep','Dem', "Ind"),
|
575 |
+
column.separate = c( 1, 1, 1),
|
576 |
+
dep.var.caption = "",
|
577 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
578 |
+
omit = c('newscount_w8_new', 'rep_11', "dem_11", "ideo_11_rsc", "age",
|
579 |
+
'female_11', "income", "married_11", "white_11",
|
580 |
+
'educ_11', "protestant", "unemployed_11", "ind_11" ,"socio_11_rsc",
|
581 |
+
"PPMSACAT_11", "sjs_mean_rsc", "Constant") ,
|
582 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
583 |
+
no.space=TRUE,
|
584 |
+
star.char = c("+", "*", "**", "***"),
|
585 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
586 |
+
notes.append = F,
|
587 |
+
notes.align="l",
|
588 |
+
digits=3,
|
589 |
+
align = TRUE,
|
590 |
+
type="html")
|
591 |
+
})
|
592 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
593 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
594 |
+
cat(table)
|
595 |
+
|
596 |
+
|
597 |
+
## Table H2 2018 Media and Culture Survey Results by Party ID
|
598 |
+
load("ssi.rdata")
|
599 |
+
|
600 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
601 |
+
education_n + income_n + married + female + age +
|
602 |
+
white + unemployed + polinterst + religion_attend +
|
603 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
604 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
605 |
+
|
606 |
+
|
607 |
+
m2r <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv +
|
608 |
+
education_n + income_n + married + female + age +
|
609 |
+
white + unemployed + polinterst + religion_attend +
|
610 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
611 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi[ssi$rep==1,])
|
612 |
+
|
613 |
+
m2d <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv +
|
614 |
+
education_n + income_n + married + female + age +
|
615 |
+
white + unemployed + polinterst + religion_attend +
|
616 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
617 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi[ssi$dem==1,])
|
618 |
+
|
619 |
+
|
620 |
+
m2i <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv +
|
621 |
+
education_n + income_n + married + female + age +
|
622 |
+
white + unemployed + polinterst + religion_attend +
|
623 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
624 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi[ssi$ind==1,])
|
625 |
+
|
626 |
+
|
627 |
+
|
628 |
+
table <- capture.output({stargazer(m2, m2r, m2d, m2i,
|
629 |
+
column.labels = c('All', 'Rep','Dem', 'Ind'),
|
630 |
+
column.separate = c(1, 1, 1, 1),
|
631 |
+
dep.var.caption = "",
|
632 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
633 |
+
omit = c('state_n', "othertv", "sportstv", "education_n",
|
634 |
+
"income_n", "married", "female", "age",
|
635 |
+
"white", "unemployed", "polinterst", "religion_attend",
|
636 |
+
"protestant", "optimismindex", "insecurity",
|
637 |
+
"intergenmobility", "parentsimmigrant", "absolutemobility",
|
638 |
+
"gini", "Constant", "rep", "dem") ,
|
639 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
640 |
+
no.space=TRUE,
|
641 |
+
star.char = c("+", "*", "**", "***"),
|
642 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
643 |
+
notes.append = F,
|
644 |
+
notes.align="l",
|
645 |
+
label = "ssi2018",
|
646 |
+
title = "ssi2018",
|
647 |
+
digits=3,
|
648 |
+
align = TRUE,
|
649 |
+
type="html")
|
650 |
+
})
|
651 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
652 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
653 |
+
cat(table)
|
654 |
+
|
655 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
656 |
+
|
657 |
+
|
658 |
+
# APPENDIX K
|
659 |
+
|
660 |
+
|
661 |
+
load("combined.rdata")
|
662 |
+
|
663 |
+
# manipulation check
|
664 |
+
|
665 |
+
# person featured on the show profitted a lot financially
|
666 |
+
t.test(combined$m1_rsc ~ combined$condition2)
|
667 |
+
# likely to have a higher income from now
|
668 |
+
t.test(combined$m2_rsc ~ combined$condition2)
|
669 |
+
# has a good work ethic
|
670 |
+
t.test(combined$m3_rsc ~ combined$condition2)
|
671 |
+
# showed that people can succeed when they are willing to work hard
|
672 |
+
t.test(combined$m4_rsc ~ combined$condition2)
|
673 |
+
# liked the program
|
674 |
+
t.test(combined$like ~ combined$condition2)
|
675 |
+
# thought the program was entertaining
|
676 |
+
t.test(combined$entertaining ~ combined$condition2)
|
677 |
+
|
678 |
+
|
679 |
+
## Table K1. Heterogeneous Treatment Effects by System Justification Tendency
|
680 |
+
|
681 |
+
|
682 |
+
j <- lm(mperception_combined ~ condition2*sjs_high + pid + optimism_index + date + as.factor(surveymode_n),
|
683 |
+
data=combined)
|
684 |
+
|
685 |
+
table <- capture.output({stargazer(j,
|
686 |
+
covariate.labels = c('Rags-to-Riches TV Treatment',
|
687 |
+
"System Justification Scale - High", "Party ID",
|
688 |
+
"Optimism Index", "Treatment x System Justification Scale"),
|
689 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
690 |
+
omit = c('surveymode_n', 'date') ,
|
691 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
692 |
+
no.space=TRUE,
|
693 |
+
star.char = c("+", "*", "**", "***"),
|
694 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
695 |
+
notes.append = F,
|
696 |
+
notes.align="l",
|
697 |
+
label = "experiment",
|
698 |
+
title = "Heterogeneous Treatment Effects by SJS",
|
699 |
+
digits=3,
|
700 |
+
align = TRUE,
|
701 |
+
type="html")
|
702 |
+
})
|
703 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
704 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
705 |
+
cat(table)
|
706 |
+
|
707 |
+
|
708 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
709 |
+
# APPENDIX L
|
710 |
+
|
711 |
+
# Table L1. The impact of merit-based rags-to-riches TV on redistribution-related attitudes
|
712 |
+
|
713 |
+
load("merit.rdata")
|
714 |
+
|
715 |
+
m1 <- lm( dv3_rich_rcd ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
716 |
+
m2 <- lm( dv3_poor_rcd ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
717 |
+
m3 <- lm( dv4_inequality_rsc ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
718 |
+
m4 <- lm( antigov2 ~ condition2 + rep + dem + as.factor(surveymode_n) + as.factor(date_n) + durationinseconds,data=merit)
|
719 |
+
|
720 |
+
table <- capture.output({stargazer(m1, m2, m3, m4,
|
721 |
+
dep.var.labels= c('The rich works hard',
|
722 |
+
'The poor lacks efforts',
|
723 |
+
'Inequality is desirable',
|
724 |
+
'Anti-redistribution'),
|
725 |
+
covariate.labels = c('Meritocracy Treatment'),
|
726 |
+
dep.var.caption = "",
|
727 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
728 |
+
omit = c('surveymode_n', 'date_n', 'durationinseconds', 'rep', 'dem', 'Constant') ,
|
729 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
730 |
+
no.space=TRUE,
|
731 |
+
star.char = c("+", "*", "**", "***"),
|
732 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
733 |
+
notes.append = F,
|
734 |
+
notes.align="l",
|
735 |
+
label = "main",
|
736 |
+
title = "The Casual Effect of Merit-Based Rags-to-Riches TV",
|
737 |
+
digits=3,
|
738 |
+
align = TRUE,
|
739 |
+
type = "html")
|
740 |
+
})
|
741 |
+
|
742 |
+
#%table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
743 |
+
#table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
744 |
+
cat(table)
|
745 |
+
|
746 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
747 |
+
# APPENDIX M
|
748 |
+
# Figure M1
|
749 |
+
|
750 |
+
load("gss.rdata")
|
751 |
+
|
752 |
+
|
753 |
+
fit <- lm(getahead_new~ tv_dummy*as.factor(year) + news + polviews + pid3 +
|
754 |
+
age + income + as.factor(race) + educ + sex, data = gss, weights=gss$wtssall)
|
755 |
+
|
756 |
+
dat <- ggpredict(fit, terms = c("year", "tv_dummy"))
|
757 |
+
dat$year <- as.Date(as.character(dat$x), format = "%Y")
|
758 |
+
dat$year <- year(dat$year)
|
759 |
+
|
760 |
+
|
761 |
+
p1 <- ggplot(dat, aes(x=year, y=predicted, color=group, shape=group)) +
|
762 |
+
geom_smooth(span=1.2, se=T, alpha=0.2, aes(fill=group)) + scale_fill_manual(name='group', values=c("black", "#00A7A3"))+ geom_point() + scale_shape_manual(values = c(4, 11)) +
|
763 |
+
theme_minimal() + theme(legend.position="top") + guides(shape = FALSE, fill=F) +
|
764 |
+
xlab("Year") +
|
765 |
+
ylab("people can get ahead by working hard") + scale_x_continuous(breaks=seq(1970,2020,4)) +
|
766 |
+
scale_y_continuous(breaks=scales::pretty_breaks(n=4)) +
|
767 |
+
scale_color_manual(values=c("#214455", "#00A7A3", "grey40"), name="Overall TV Consumption", labels=c("Low", "High")) +
|
768 |
+
theme(axis.text.x = element_text(colour = "black", size=15),
|
769 |
+
axis.title.x = element_text(size=15),
|
770 |
+
axis.text.y=element_text(colour = "black", size=15),
|
771 |
+
legend.text=element_text(size=16, face="bold"), legend.title=element_text(size=16, face="bold"),
|
772 |
+
axis.title.y = element_text(size=18), panel.grid.minor.x = element_blank(), panel.grid.minor.y=element_blank())
|
773 |
+
p1
|
774 |
+
|
775 |
+
|
776 |
+
```
|
777 |
+
|
25/replication_package/AJPS_2021_Kim_Appendix_RMarkdown.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
25/replication_package/AJPS_2021_Kim_Manuscript.R
ADDED
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
3 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
4 |
+
# Entertaining Beliefs in Economic Mobility
|
5 |
+
# Eunji Kim, 2021
|
6 |
+
# American Journal of Political Science
|
7 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
8 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
9 |
+
|
10 |
+
#list.of.packages <- c("foreign", "ggplot2", "readstata13", "dplyr", "haven", "xtable", "stargazer", "tidytext", "stringr", "tidyr", "scales", "tables", "ggpubr")
|
11 |
+
#new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
|
12 |
+
#if(length(new.packages)) install.packages(new.packages)
|
13 |
+
|
14 |
+
#setwd("[path to where replication archive was downloaded]")
|
15 |
+
|
16 |
+
library(foreign)
|
17 |
+
library(ggplot2)
|
18 |
+
library(readstata13)
|
19 |
+
library(dplyr)
|
20 |
+
library(haven)
|
21 |
+
library(xtable)
|
22 |
+
library(stargazer)
|
23 |
+
library(tidytext)
|
24 |
+
library(stringr)
|
25 |
+
library(tidyr)
|
26 |
+
library(scales)
|
27 |
+
library(tables)
|
28 |
+
library(ggpubr)
|
29 |
+
|
30 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
31 |
+
# MAIN MANUSCRIPT FIGURE 1 #
|
32 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
33 |
+
|
34 |
+
load("nyt.rdata")
|
35 |
+
|
36 |
+
cleaned_nyt_text %>%
|
37 |
+
count(year) %>%
|
38 |
+
filter(year != 2020 & year != 1980) %>%
|
39 |
+
ggplot(aes(as.Date(paste(year, "-01", "-01", sep="")), n)) +
|
40 |
+
geom_col(show.legend = F) +
|
41 |
+
labs(x = "Year", y = "Number of Articles Containing Keywords",
|
42 |
+
title = "Articles by Year")
|
43 |
+
|
44 |
+
|
45 |
+
search_terms <- paste(c('economic mobility', 'social ladder', 'income ladder', 'social mobility', 'economic ladder',
|
46 |
+
'rags to riches', 'economic mobility', 'social ladder', 'class mobility', 'socioeconomic mobility',
|
47 |
+
'intergenerational mobility', 'upward mobility', "meritocracy", "american dream", "land of opportunity",
|
48 |
+
'rugged individualism', 'horatio alger', 'self-made man', 'self-made woman', 'self-made success'),
|
49 |
+
collapse = '|')
|
50 |
+
|
51 |
+
custom_stop_words <- stop_words
|
52 |
+
|
53 |
+
cleaned_nyt_text$text <- as.character(cleaned_nyt_text$text)
|
54 |
+
|
55 |
+
nyt_words <- cleaned_nyt_text %>%
|
56 |
+
unnest_tokens(word, text) %>%
|
57 |
+
mutate(word = gsub("\u2019", "'", word)) %>%
|
58 |
+
anti_join(custom_stop_words)
|
59 |
+
|
60 |
+
bing <- get_sentiments('bing')
|
61 |
+
|
62 |
+
nyt_polarity_year <- nyt_words %>%
|
63 |
+
inner_join(bing) %>%
|
64 |
+
count(sentiment, Month_Yr) %>%
|
65 |
+
spread(sentiment, n) %>%
|
66 |
+
mutate(polarity = positive - negative,
|
67 |
+
percent_positive = positive / (positive + negative) * 100) %>%
|
68 |
+
filter(!str_detect(Month_Yr, "2020"))
|
69 |
+
|
70 |
+
|
71 |
+
nyt_polarity_year$year<- nyt_polarity_year %>%
|
72 |
+
separate(Month_Yr, into = c("year", "month")) %>%
|
73 |
+
pull("year")
|
74 |
+
|
75 |
+
nyt_polarity_year_2000 <- nyt_polarity_year %>% filter(year > 1999)
|
76 |
+
|
77 |
+
|
78 |
+
polarity_over_time <- nyt_polarity_year_2000 %>%
|
79 |
+
ggplot(aes(as.Date(paste(Month_Yr, "-01", sep="")),
|
80 |
+
polarity,
|
81 |
+
color = ifelse(polarity >= 0, '#86d7c1', '#0e698b'))) +
|
82 |
+
geom_col(position = "identity",
|
83 |
+
color=ifelse(nyt_polarity_year_2000$polarity>= 0,'#86d7c1', '#0e698b'),
|
84 |
+
fill = ifelse(nyt_polarity_year_2000$polarity>= 0,'#86d7c1', '#0e698b'),
|
85 |
+
size = 0.1, show.legend = F) +
|
86 |
+
#theme(plot.title = element_text(size = 11), legend.position = "none") +
|
87 |
+
theme(plot.title = element_text(size = 11), legend.position = "none",
|
88 |
+
panel.background = element_blank(),
|
89 |
+
axis.title.x = element_text(color="black", size=10),
|
90 |
+
axis.title.y = element_text(color="black", size=10)) +
|
91 |
+
theme(axis.text.x = element_text(color="black", size=10),
|
92 |
+
axis.text.y = element_text(color="black", size=10)) +
|
93 |
+
xlab("Year") + ylab("Sentiment Score")
|
94 |
+
|
95 |
+
# ggtitle("NYT Word Sentiment Polarity Over Time (positive words - negative words per year)")
|
96 |
+
|
97 |
+
polarity_over_time
|
98 |
+
|
99 |
+
|
100 |
+
#pdf('nytsentiment.pdf',height=4,width=7)
|
101 |
+
#polarity_over_time
|
102 |
+
#dev.off()
|
103 |
+
|
104 |
+
|
105 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
106 |
+
# MAIN MANUSCRIPT TABLE 1 #
|
107 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
108 |
+
|
109 |
+
# mturk
|
110 |
+
|
111 |
+
load("mturk.rdata")
|
112 |
+
|
113 |
+
m1 <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index, data=msample)
|
114 |
+
mr <-lm(mperception_combined ~ condition2 + optimism_index + sjs_index, data=msample[msample$rep==1,])
|
115 |
+
md <- lm(mperception_combined ~ condition2 + optimism_index + sjs_index, data=msample[msample$dem==1,])
|
116 |
+
# interaction model
|
117 |
+
mrd <-lm(mperception_combined ~ condition2*rep1dem0new + optimism_index + sjs_index, data=msample)
|
118 |
+
|
119 |
+
# lab in the field
|
120 |
+
# main model
|
121 |
+
|
122 |
+
load("labinthefield.rdata")
|
123 |
+
|
124 |
+
f1 <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index +
|
125 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample)
|
126 |
+
fr <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index +
|
127 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample[fieldsample$rep==1,])
|
128 |
+
fd <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index +
|
129 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample[fieldsample$dem==1,])
|
130 |
+
frd <-lm(mperception_combined ~ condition2*rep1dem0new + optimism_index + sjs_index +
|
131 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample)
|
132 |
+
|
133 |
+
table <- capture.output({stargazer(m1, mr, md, mrd, f1, fr, fd, frd,
|
134 |
+
dep.var.labels= c(
|
135 |
+
"Mturk Sample",
|
136 |
+
"Lab-in-the-Field Sample"),
|
137 |
+
covariate.labels = c('Rags-to-Riches TV Treatment'),
|
138 |
+
column.labels = c('All', 'Rep', 'Dem', 'Interaction Model','All', 'Rep', 'Dem', 'Interaction Model'),
|
139 |
+
column.separate = c(1,1, 1, 1, 1, 1, 1,1),
|
140 |
+
dep.var.caption = "",
|
141 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
142 |
+
omit = c('surveymode_n', 'date_n' ) ,
|
143 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
144 |
+
no.space=TRUE,
|
145 |
+
star.char = c("+", "*", "**", "***"),
|
146 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
147 |
+
notes.append = F,
|
148 |
+
notes.align="l",
|
149 |
+
label = "experiment",
|
150 |
+
title = "The Casual Effect of Rags-to-Riches TV",
|
151 |
+
digits=3,
|
152 |
+
align = TRUE,
|
153 |
+
type="text")
|
154 |
+
})
|
155 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
156 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
157 |
+
cat(table)
|
158 |
+
|
159 |
+
|
160 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
161 |
+
# MAIN MANUSCRIPT TABLE 2 #
|
162 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
163 |
+
|
164 |
+
|
165 |
+
load("ssi.rdata")
|
166 |
+
|
167 |
+
m1 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
168 |
+
|
169 |
+
|
170 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
171 |
+
education_n + income_n + married + female + age +
|
172 |
+
white + unemployed + polinterst + religion_attend +
|
173 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
174 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
175 |
+
|
176 |
+
m3 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
177 |
+
|
178 |
+
m4 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
179 |
+
education_n + income_n + married + female + age +
|
180 |
+
white + unemployed + polinterst + religion_attend +
|
181 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
182 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
183 |
+
|
184 |
+
m5 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
185 |
+
|
186 |
+
m6 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
187 |
+
education_n + income_n + married + female + age +
|
188 |
+
white + unemployed + polinterst + religion_attend +
|
189 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
190 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
191 |
+
|
192 |
+
|
193 |
+
table <- capture.output({stargazer(m1, m2, m3, m4, m5, m6,
|
194 |
+
dep.var.caption = "",
|
195 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
196 |
+
omit = c('state_n') ,
|
197 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
198 |
+
no.space=TRUE,
|
199 |
+
star.char = c("+", "*", "**", "***"),
|
200 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
201 |
+
notes.append = F,
|
202 |
+
notes.align="l",
|
203 |
+
digits=3,
|
204 |
+
align = TRUE,
|
205 |
+
type= "text")
|
206 |
+
})
|
207 |
+
table <- gsub("\\begin{tabular}","\\resizebox{1\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
208 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
209 |
+
cat(table)
|
210 |
+
|
211 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
212 |
+
# MAIN MANUSCRIPT FIGURE 3 #
|
213 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
214 |
+
|
215 |
+
load("ssi.rdata")
|
216 |
+
|
217 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
218 |
+
education_n + income_n + married + female + age +
|
219 |
+
white + unemployed + polinterst + religion_attend +
|
220 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
221 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
222 |
+
|
223 |
+
|
224 |
+
t1 <- coef(summary(m2))
|
225 |
+
|
226 |
+
|
227 |
+
# Combined
|
228 |
+
|
229 |
+
c3 <- numeric(length = 16)
|
230 |
+
|
231 |
+
c3[16] <- t1[7,1]*sd(ssi$rep)
|
232 |
+
c3[15] <- t1[21,1]*sd(ssi$intergenmobility)
|
233 |
+
c3[14] <- t1[13,1]*sd(ssi$age)
|
234 |
+
c3[13] <- t1[22,1]*sd(ssi$parentsimmigrant, na.rm=T)
|
235 |
+
c3[12] <- t1[4,1]*sd(ssi$heavyviewer)
|
236 |
+
c3[11] <- t1[3,1]*sd(ssi$frequentviewer)
|
237 |
+
c3[10] <- t1[2,1]*sd(ssi$occasionalviewer)
|
238 |
+
c3[9] <- t1[14,1]*sd(ssi$white)
|
239 |
+
c3[8] <- t1[18,1]*sd(ssi$protestant)
|
240 |
+
c3[7] <- t1[23,1]*sd(ssi$absolutemobility, na.rm=T)
|
241 |
+
c3[6] <- t1[20,1]*sd(ssi$insecurity, na.rm=T)
|
242 |
+
c3[5] <- t1[24,1]*sd(ssi$gini, na.rm=T)
|
243 |
+
c3[4] <- t1[8,1]*sd(ssi$dem)
|
244 |
+
c3[3] <- t1[10,1]*sd(ssi$income_n)
|
245 |
+
c3[2] <- t1[15,1]*sd(ssi$unemployed)
|
246 |
+
c3[1] <- t1[9,1]*sd(ssi$education_n)
|
247 |
+
|
248 |
+
c3 <-as.data.frame((c3))
|
249 |
+
|
250 |
+
c3[1,c(2)] <- "#24345A"
|
251 |
+
c3[2,c(2)] <-"#24345A"
|
252 |
+
c3[3,c(2)] <- "#24345A"
|
253 |
+
c3[4,c(2)] <- "#24345A"
|
254 |
+
c3[5,c(2)] <- "#24345A"
|
255 |
+
c3[6,c(2)] <- "#24345A"
|
256 |
+
c3[7,c(2)] <- "#24345A"
|
257 |
+
c3[8,c(2)] <-"#24345A"
|
258 |
+
c3[9,c(2)] <- "#24345A"
|
259 |
+
c3[10,c(2)] <- "#2B8D9C"
|
260 |
+
c3[11,c(2)] <-"#2B8D9C"
|
261 |
+
c3[12,c(2)] <- "#2B8D9C"
|
262 |
+
c3[13,c(2)] <- "#24345A"
|
263 |
+
c3[14,c(2)] <- "#24345A"
|
264 |
+
c3[15,c(2)] <- "#24345A"
|
265 |
+
c3[16,c(2)] <- "#24345A"
|
266 |
+
|
267 |
+
|
268 |
+
s3 <- numeric(length = 16)
|
269 |
+
|
270 |
+
|
271 |
+
s3[16] <- t1[7,2]*sd(ssi$rep)
|
272 |
+
s3[15] <- t1[21,2]*sd(ssi$intergenmobility)
|
273 |
+
s3[14] <- t1[13,2]*sd(ssi$age)
|
274 |
+
s3[13] <- t1[22,2]*sd(ssi$parentsimmigrant, na.rm=T)
|
275 |
+
s3[12] <- t1[4,2]*sd(ssi$heavyviewer)
|
276 |
+
s3[11] <- t1[3,2]*sd(ssi$frequentviewer)
|
277 |
+
s3[10] <- t1[2,2]*sd(ssi$occasionalviewer)
|
278 |
+
s3[9] <- t1[14,2]*sd(ssi$white)
|
279 |
+
s3[8] <- t1[18,2]*sd(ssi$protestant)
|
280 |
+
s3[7] <- t1[23,2]*sd(ssi$absolutemobility, na.rm=T)
|
281 |
+
s3[6] <- t1[20,2]*sd(ssi$insecurity, na.rm=T)
|
282 |
+
s3[5] <- t1[24,2]*sd(ssi$gini, na.rm=T)
|
283 |
+
s3[4] <- t1[8,2]*sd(ssi$dem)
|
284 |
+
s3[3] <- t1[10,2]*sd(ssi$income_n)
|
285 |
+
s3[2] <- t1[15,2]*sd(ssi$unemployed)
|
286 |
+
s3[1] <- t1[9,2]*sd(ssi$education_n)
|
287 |
+
|
288 |
+
yloc <- c(1, 2, 3, 4,5,6,7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
# jpeg("SDfigure_AJPS.jpg", units="in", width=10, height=5, res=300)
|
293 |
+
p <- recordPlot()
|
294 |
+
plot.new()
|
295 |
+
|
296 |
+
plot(c3$`(c3)`, yloc, pch = 23, col=c3$V2, bg=c3$V2,
|
297 |
+
xlim = c(-0.135, 0.14), ylim = c(0,16), xlab = "Impact of Standard Deviation Change",
|
298 |
+
ylab = "", yaxt = "n", xaxt = "n", axes=FALSE)
|
299 |
+
abline(v = 0, col = "gray")
|
300 |
+
grid()
|
301 |
+
segments((c3$`(c3)` - (qnorm(0.975) * s3)), yloc, (c3$`(c3)` + (qnorm(0.975) * s3)), yloc, col = c3$V2,
|
302 |
+
lwd = 2)
|
303 |
+
|
304 |
+
|
305 |
+
text(-0.05,16,'Republican' ,pos=2, cex=.8, col='grey30')
|
306 |
+
text(-0.05,15,'Perceived Personal Mobility',pos=2, cex=.8, col='grey30')
|
307 |
+
text(-0.05,14,'Age',pos=2, cex=.8, col='grey30')
|
308 |
+
text(-0.05,13,'Have Immigrant Parents',pos=2, cex=.8, col='grey30')
|
309 |
+
text(-0.05,12,'Rags-to-Riches TV: Heavy Viewer',pos=2, cex=.8, font=2)
|
310 |
+
text(-0.05,11,'Rags-to-Riches TV: Frequent Viewer',pos=2, cex=.8, font=2)
|
311 |
+
text(-0.05,10,'Rags-to-Riches TV: Occasional Viewer',pos=2, cex=.8, font=2)
|
312 |
+
text(-0.05,9,'White',pos=2, cex=.8, col='grey30')
|
313 |
+
text(-0.05,8,'Protestant',pos=2, cex=.8, col='grey30')
|
314 |
+
text(-0.05,7,'County-level Intergenerational Mobility Rates' ,pos=2, cex=.8, col='grey30')
|
315 |
+
text(-0.05,6,'Personal economic insecurity', ,pos=2, cex=.8, col='grey30')
|
316 |
+
text(-0.05,5,'County-level Income Inequality (Gini)',pos=2, cex=.8, col='grey30')
|
317 |
+
text(-0.05,4,'Democrat',pos=2, cex=.8, col='grey30')
|
318 |
+
text(-0.05,3,'Income',pos=2, cex=.8, col='grey30')
|
319 |
+
text(-0.05,2, 'Unemployed', cex=.8,pos=2, col='grey30')
|
320 |
+
text(-0.05,1,'Education',cex=.8, pos=2, col='grey30')
|
321 |
+
|
322 |
+
axis(1, at=c(-0.05, 0, 0.05, 0.1))
|
323 |
+
|
324 |
+
# dev.off()
|
325 |
+
|
326 |
+
|
327 |
+
|
328 |
+
|
329 |
+
|
330 |
+
|
25/replication_package/AJPS_2021_Kim_Manuscript_RMarkdown.Rmd
ADDED
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: "AJPS_2021_Kim_Manuscript_Markdown"
|
3 |
+
subtitle: "Entertaining Beliefs in Economic Mobility"
|
4 |
+
author: "Eunji Kim"
|
5 |
+
date: "8/15/2021"
|
6 |
+
output: html_document
|
7 |
+
---
|
8 |
+
|
9 |
+
|
10 |
+
```{r, message=F, warning=F, echo=F}
|
11 |
+
# Load libraries
|
12 |
+
rm(list=ls())
|
13 |
+
library(foreign)
|
14 |
+
library(ggplot2)
|
15 |
+
library(readstata13)
|
16 |
+
library(dplyr)
|
17 |
+
library(haven)
|
18 |
+
library(xtable)
|
19 |
+
library(stargazer)
|
20 |
+
library(ggplot2)
|
21 |
+
library(dplyr)
|
22 |
+
library(tidytext)
|
23 |
+
library(stringr)
|
24 |
+
library(tidyr)
|
25 |
+
library(scales)
|
26 |
+
library(tables)
|
27 |
+
|
28 |
+
library(ggpubr)
|
29 |
+
|
30 |
+
```
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
```{r, warning=F, message=F, results="asis"}
|
35 |
+
|
36 |
+
|
37 |
+
load("nyt.rdata")
|
38 |
+
|
39 |
+
search_terms <- paste(c('economic mobility', 'social ladder', 'income ladder', 'social mobility', 'economic ladder',
|
40 |
+
'rags to riches', 'economic mobility', 'social ladder', 'class mobility', 'socioeconomic mobility',
|
41 |
+
'intergenerational mobility', 'upward mobility', "meritocracy", "american dream", "land of opportunity",
|
42 |
+
'rugged individualism', 'horatio alger', 'self-made man', 'self-made woman', 'self-made success'),
|
43 |
+
collapse = '|')
|
44 |
+
|
45 |
+
custom_stop_words <- stop_words
|
46 |
+
|
47 |
+
cleaned_nyt_text$text <- as.character(cleaned_nyt_text$text)
|
48 |
+
|
49 |
+
nyt_words <- cleaned_nyt_text %>%
|
50 |
+
unnest_tokens(word, text) %>%
|
51 |
+
mutate(word = gsub("\u2019", "'", word)) %>%
|
52 |
+
anti_join(custom_stop_words)
|
53 |
+
|
54 |
+
bing <- get_sentiments('bing')
|
55 |
+
|
56 |
+
nyt_polarity_year <- nyt_words %>%
|
57 |
+
inner_join(bing) %>%
|
58 |
+
count(sentiment, Month_Yr) %>%
|
59 |
+
spread(sentiment, n) %>%
|
60 |
+
mutate(polarity = positive - negative,
|
61 |
+
percent_positive = positive / (positive + negative) * 100) %>%
|
62 |
+
filter(!str_detect(Month_Yr, "2020"))
|
63 |
+
|
64 |
+
|
65 |
+
nyt_polarity_year$year<- nyt_polarity_year %>%
|
66 |
+
separate(Month_Yr, into = c("year", "month")) %>%
|
67 |
+
pull("year")
|
68 |
+
|
69 |
+
nyt_polarity_year_2000 <- nyt_polarity_year %>% filter(year > 1999)
|
70 |
+
|
71 |
+
|
72 |
+
polarity_over_time <- nyt_polarity_year_2000 %>%
|
73 |
+
ggplot(aes(as.Date(paste(Month_Yr, "-01", sep="")),
|
74 |
+
polarity,
|
75 |
+
color = ifelse(polarity >= 0, '#86d7c1', '#0e698b'))) +
|
76 |
+
geom_col(position = "identity",
|
77 |
+
color=ifelse(nyt_polarity_year_2000$polarity>= 0,'#86d7c1', '#0e698b'),
|
78 |
+
fill = ifelse(nyt_polarity_year_2000$polarity>= 0,'#86d7c1', '#0e698b'),
|
79 |
+
size = 0.1, show.legend = F) +
|
80 |
+
#theme(plot.title = element_text(size = 11), legend.position = "none") +
|
81 |
+
theme(plot.title = element_text(size = 11), legend.position = "none",
|
82 |
+
panel.background = element_blank(),
|
83 |
+
axis.title.x = element_text(color="black", size=10),
|
84 |
+
axis.title.y = element_text(color="black", size=10)) +
|
85 |
+
theme(axis.text.x = element_text(color="black", size=10),
|
86 |
+
axis.text.y = element_text(color="black", size=10)) +
|
87 |
+
xlab("Year") + ylab("Sentiment Score")
|
88 |
+
|
89 |
+
# ggtitle("NYT Word Sentiment Polarity Over Time (positive words - negative words per year)")
|
90 |
+
|
91 |
+
polarity_over_time
|
92 |
+
|
93 |
+
|
94 |
+
#pdf('nytsentiment.pdf',height=4,width=7)
|
95 |
+
#polarity_over_time
|
96 |
+
#dev.off()
|
97 |
+
|
98 |
+
|
99 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
100 |
+
# MAIN MANUSCRIPT TABLE 1 #
|
101 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
102 |
+
|
103 |
+
# mturk
|
104 |
+
|
105 |
+
load("mturk.rdata")
|
106 |
+
|
107 |
+
m1 <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index, data=msample)
|
108 |
+
mr <-lm(mperception_combined ~ condition2 + optimism_index + sjs_index, data=msample[msample$rep==1,])
|
109 |
+
md <- lm(mperception_combined ~ condition2 + optimism_index + sjs_index, data=msample[msample$dem==1,])
|
110 |
+
# interaction model
|
111 |
+
mrd <-lm(mperception_combined ~ condition2*rep1dem0new + optimism_index + sjs_index, data=msample)
|
112 |
+
|
113 |
+
# lab in the field
|
114 |
+
# main model
|
115 |
+
|
116 |
+
load("labinthefield.rdata")
|
117 |
+
|
118 |
+
f1 <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index +
|
119 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample)
|
120 |
+
fr <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index +
|
121 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample[fieldsample$rep==1,])
|
122 |
+
fd <-lm(mperception_combined ~ condition2 + rep + dem + optimism_index + sjs_index +
|
123 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample[fieldsample$dem==1,])
|
124 |
+
frd <-lm(mperception_combined ~ condition2*rep1dem0new + optimism_index + sjs_index +
|
125 |
+
as.factor(surveymode_n) + as.factor(date_n), data=fieldsample)
|
126 |
+
|
127 |
+
table <- capture.output({stargazer(m1, mr, md, mrd, f1, fr, fd, frd,
|
128 |
+
dep.var.labels= c(
|
129 |
+
"Mturk Sample",
|
130 |
+
"Lab-in-the-Field Sample"),
|
131 |
+
covariate.labels = c('Rags-to-Riches TV Treatment'),
|
132 |
+
column.labels = c('All', 'Rep', 'Dem', 'Interaction Model','All', 'Rep', 'Dem', 'Interaction Model'),
|
133 |
+
column.separate = c(1,1, 1, 1, 1, 1, 1,1),
|
134 |
+
dep.var.caption = "",
|
135 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
136 |
+
omit = c('surveymode_n', 'date_n' ) ,
|
137 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
138 |
+
no.space=TRUE,
|
139 |
+
star.char = c("+", "*", "**", "***"),
|
140 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
141 |
+
notes.append = F,
|
142 |
+
notes.align="l",
|
143 |
+
label = "experiment",
|
144 |
+
title = "The Casual Effect of Rags-to-Riches TV",
|
145 |
+
digits=3,
|
146 |
+
align = TRUE,
|
147 |
+
type="html")
|
148 |
+
})
|
149 |
+
table <- gsub("\\begin{tabular}","\\resizebox{0.8\\textwidth}{!}{\\begin{tabular}", table,fixed=T)
|
150 |
+
table <- gsub("\\end{tabular}","\\end{tabular}}", table,fixed=T)
|
151 |
+
cat(table)
|
152 |
+
|
153 |
+
|
154 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
155 |
+
# MAIN MANUSCRIPT TABLE 2 #
|
156 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
157 |
+
|
158 |
+
|
159 |
+
load("ssi.rdata")
|
160 |
+
|
161 |
+
m1 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
162 |
+
|
163 |
+
|
164 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
165 |
+
education_n + income_n + married + female + age +
|
166 |
+
white + unemployed + polinterst + religion_attend +
|
167 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
168 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
169 |
+
|
170 |
+
m3 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
171 |
+
|
172 |
+
m4 <- lm(internalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
173 |
+
education_n + income_n + married + female + age +
|
174 |
+
white + unemployed + polinterst + religion_attend +
|
175 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
176 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
177 |
+
|
178 |
+
m5 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer, data=ssi)
|
179 |
+
|
180 |
+
m6 <- lm(externalatt_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
181 |
+
education_n + income_n + married + female + age +
|
182 |
+
white + unemployed + polinterst + religion_attend +
|
183 |
+
protestant + optimismindex + insecurity + intergenmobility + parentsimmigrant +
|
184 |
+
+absolutemobility + gini + as.factor(state_n), data=ssi)
|
185 |
+
|
186 |
+
|
187 |
+
stargazer(m1, m2, m3, m4, m5, m6,
|
188 |
+
dep.var.caption = "",
|
189 |
+
omit.stat=c("adj.rsq","LL","ser","f"),
|
190 |
+
omit = c('state_n', "othertv", "sportstv", "rep", "dem", "education_n",
|
191 |
+
"income_n", "married", "female", "age", "white", "unemployed",
|
192 |
+
"polinterst", "religion_attend", "protestant", "optimismindex",
|
193 |
+
"insecurity", "intergenmobility", "parentsimmigrant", "absolutemobility", "gini", "Constant") ,
|
194 |
+
star.cutoffs = c(0.1, .05,.01,.001),
|
195 |
+
no.space=TRUE,
|
196 |
+
star.char = c("+", "*", "**", "***"),
|
197 |
+
notes = c("+ p< 0.1, * p<0.05; ** p<0.01; *** p<0.001"),
|
198 |
+
notes.append = F,
|
199 |
+
notes.align="l",
|
200 |
+
digits=3,
|
201 |
+
align = TRUE,
|
202 |
+
type= "html")
|
203 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
204 |
+
# MAIN MANUSCRIPT FIGURE 3 #
|
205 |
+
# --------------------------------------------------------------------------------------------------------------------------------
|
206 |
+
|
207 |
+
load("ssi.rdata")
|
208 |
+
|
209 |
+
m2 <- lm(mindex_rsc ~ occasionalviewer + frequentviewer + heavyviewer + othertv + sportstv + rep + dem +
|
210 |
+
education_n + income_n + married + female + age +
|
211 |
+
white + unemployed + polinterst + religion_attend +
|
212 |
+
protestant + optimismindex +insecurity + intergenmobility + parentsimmigrant +
|
213 |
+
+absolutemobility + gini + as.factor(state_n) , data=ssi)
|
214 |
+
|
215 |
+
|
216 |
+
t1 <- coef(summary(m2))
|
217 |
+
|
218 |
+
|
219 |
+
# Combined
|
220 |
+
|
221 |
+
c3 <- numeric(length = 16)
|
222 |
+
|
223 |
+
c3[16] <- t1[7,1]*sd(ssi$rep)
|
224 |
+
c3[15] <- t1[21,1]*sd(ssi$intergenmobility)
|
225 |
+
c3[14] <- t1[13,1]*sd(ssi$age)
|
226 |
+
c3[13] <- t1[22,1]*sd(ssi$parentsimmigrant, na.rm=T)
|
227 |
+
c3[12] <- t1[4,1]*sd(ssi$heavyviewer)
|
228 |
+
c3[11] <- t1[3,1]*sd(ssi$frequentviewer)
|
229 |
+
c3[10] <- t1[2,1]*sd(ssi$occasionalviewer)
|
230 |
+
c3[9] <- t1[14,1]*sd(ssi$white)
|
231 |
+
c3[8] <- t1[18,1]*sd(ssi$protestant)
|
232 |
+
c3[7] <- t1[23,1]*sd(ssi$absolutemobility, na.rm=T)
|
233 |
+
c3[6] <- t1[20,1]*sd(ssi$insecurity, na.rm=T)
|
234 |
+
c3[5] <- t1[24,1]*sd(ssi$gini, na.rm=T)
|
235 |
+
c3[4] <- t1[8,1]*sd(ssi$dem)
|
236 |
+
c3[3] <- t1[10,1]*sd(ssi$income_n)
|
237 |
+
c3[2] <- t1[15,1]*sd(ssi$unemployed)
|
238 |
+
c3[1] <- t1[9,1]*sd(ssi$education_n)
|
239 |
+
|
240 |
+
c3 <-as.data.frame((c3))
|
241 |
+
|
242 |
+
c3[1,c(2)] <- "#24345A"
|
243 |
+
c3[2,c(2)] <-"#24345A"
|
244 |
+
c3[3,c(2)] <- "#24345A"
|
245 |
+
c3[4,c(2)] <- "#24345A"
|
246 |
+
c3[5,c(2)] <- "#24345A"
|
247 |
+
c3[6,c(2)] <- "#24345A"
|
248 |
+
c3[7,c(2)] <- "#24345A"
|
249 |
+
c3[8,c(2)] <-"#24345A"
|
250 |
+
c3[9,c(2)] <- "#24345A"
|
251 |
+
c3[10,c(2)] <- "#2B8D9C"
|
252 |
+
c3[11,c(2)] <-"#2B8D9C"
|
253 |
+
c3[12,c(2)] <- "#2B8D9C"
|
254 |
+
c3[13,c(2)] <- "#24345A"
|
255 |
+
c3[14,c(2)] <- "#24345A"
|
256 |
+
c3[15,c(2)] <- "#24345A"
|
257 |
+
c3[16,c(2)] <- "#24345A"
|
258 |
+
|
259 |
+
|
260 |
+
s3 <- numeric(length = 16)
|
261 |
+
|
262 |
+
|
263 |
+
s3[16] <- t1[7,2]*sd(ssi$rep)
|
264 |
+
s3[15] <- t1[21,2]*sd(ssi$intergenmobility)
|
265 |
+
s3[14] <- t1[13,2]*sd(ssi$age)
|
266 |
+
s3[13] <- t1[22,2]*sd(ssi$parentsimmigrant, na.rm=T)
|
267 |
+
s3[12] <- t1[4,2]*sd(ssi$heavyviewer)
|
268 |
+
s3[11] <- t1[3,2]*sd(ssi$frequentviewer)
|
269 |
+
s3[10] <- t1[2,2]*sd(ssi$occasionalviewer)
|
270 |
+
s3[9] <- t1[14,2]*sd(ssi$white)
|
271 |
+
s3[8] <- t1[18,2]*sd(ssi$protestant)
|
272 |
+
s3[7] <- t1[23,2]*sd(ssi$absolutemobility, na.rm=T)
|
273 |
+
s3[6] <- t1[20,2]*sd(ssi$insecurity, na.rm=T)
|
274 |
+
s3[5] <- t1[24,2]*sd(ssi$gini, na.rm=T)
|
275 |
+
s3[4] <- t1[8,2]*sd(ssi$dem)
|
276 |
+
s3[3] <- t1[10,2]*sd(ssi$income_n)
|
277 |
+
s3[2] <- t1[15,2]*sd(ssi$unemployed)
|
278 |
+
s3[1] <- t1[9,2]*sd(ssi$education_n)
|
279 |
+
|
280 |
+
yloc <- c(1, 2, 3, 4,5,6,7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
|
281 |
+
|
282 |
+
|
283 |
+
|
284 |
+
# jpeg("SDfigure_AJPS.jpg", units="in", width=10, height=5, res=300)
|
285 |
+
p <- recordPlot()
|
286 |
+
plot.new()
|
287 |
+
|
288 |
+
plot(c3$`(c3)`, yloc, pch = 23, col=c3$V2, bg=c3$V2,
|
289 |
+
xlim = c(-0.135, 0.14), ylim = c(0,16), xlab = "Impact of Standard Deviation Change",
|
290 |
+
ylab = "", yaxt = "n", xaxt = "n", axes=FALSE)
|
291 |
+
abline(v = 0, col = "gray")
|
292 |
+
grid()
|
293 |
+
segments((c3$`(c3)` - (qnorm(0.975) * s3)), yloc, (c3$`(c3)` + (qnorm(0.975) * s3)), yloc, col = c3$V2,
|
294 |
+
lwd = 2)
|
295 |
+
|
296 |
+
|
297 |
+
text(-0.05,16,'Republican' ,pos=2, cex=.8, col='grey30')
|
298 |
+
text(-0.05,15,'Perceived Personal Mobility',pos=2, cex=.8, col='grey30')
|
299 |
+
text(-0.05,14,'Age',pos=2, cex=.8, col='grey30')
|
300 |
+
text(-0.05,13,'Have Immigrant Parents',pos=2, cex=.8, col='grey30')
|
301 |
+
text(-0.05,12,'Rags-to-Riches TV: Heavy Viewer',pos=2, cex=.8, font=2)
|
302 |
+
text(-0.05,11,'Rags-to-Riches TV: Frequent Viewer',pos=2, cex=.8, font=2)
|
303 |
+
text(-0.05,10,'Rags-to-Riches TV: Occasional Viewer',pos=2, cex=.8, font=2)
|
304 |
+
text(-0.05,9,'White',pos=2, cex=.8, col='grey30')
|
305 |
+
text(-0.05,8,'Protestant',pos=2, cex=.8, col='grey30')
|
306 |
+
text(-0.05,7,'County-level Intergenerational Mobility Rates' ,pos=2, cex=.8, col='grey30')
|
307 |
+
text(-0.05,6,'Personal economic insecurity', ,pos=2, cex=.8, col='grey30')
|
308 |
+
text(-0.05,5,'County-level Income Inequality (Gini)',pos=2, cex=.8, col='grey30')
|
309 |
+
text(-0.05,4,'Democrat',pos=2, cex=.8, col='grey30')
|
310 |
+
text(-0.05,3,'Income',pos=2, cex=.8, col='grey30')
|
311 |
+
text(-0.05,2, 'Unemployed', cex=.8,pos=2, col='grey30')
|
312 |
+
text(-0.05,1,'Education',cex=.8, pos=2, col='grey30')
|
313 |
+
|
314 |
+
axis(1, at=c(-0.05, 0, 0.05, 0.1))
|
315 |
+
|
316 |
+
|
317 |
+
```
|
25/replication_package/AJPS_2021_Kim_Manuscript_RMarkdown.html
ADDED
The diff for this file is too large to render.
See raw diff
|
|
25/replication_package/AJPS_Kim_readme.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59fcaa336d3894ee7bbadccc254d726277c9bfbe006960a39806847875f6d343
|
3 |
+
size 4931
|
25/replication_package/AJPS_Replication_Data_Codebook.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c0f44cac9343bc5ffedf0150d96e600c2ea125c4f5a95981a1394cae8ee17ab8
|
3 |
+
size 1483030
|
25/replication_package/anes2016.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:527002be31f18aecc082c6b46b8f667f53a8f9f452606a3cc9f44adc39283163
|
3 |
+
size 50379
|
25/replication_package/appendix_table_b1.xlsx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76e4261715fd02b82f4c33dc9c65eeccf75094e661a4e88ce5eac61c9b80a16e
|
3 |
+
size 12553
|
25/replication_package/combined.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:95b17c3f0d0b724aa36ce88122d669fc2d7079027c8acc411137a13d64ca0e64
|
3 |
+
size 7288
|
25/replication_package/contentanalysis.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6be49781fc57db1417df505aa3675d25f4a72d1afb2fc075e34e9005b8f61c7e
|
3 |
+
size 4346
|
25/replication_package/gss.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6ebc4959e5be7c2fe588f1853bc0e9992693cac6b564110a88c31c92f02e91c
|
3 |
+
size 145668
|
25/replication_package/imdb.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f8641366e2ee47eefad649d3c61b301129c1c80390196c599d271494a7e022dc
|
3 |
+
size 1258
|
25/replication_package/iscap.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ff4d27b1320cd201b95400ea567cd726ed9dd384e2962fcfba59c1e0e4a9903d
|
3 |
+
size 15198
|
25/replication_package/labinthefield.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4aead9f14ee03615362c08a8e77ed3b6196397524e2f830860fa1f4b13595e7c
|
3 |
+
size 1508
|
25/replication_package/merit.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81786d5a31141c3bcea13225c2f30ac5dd47764f9516ba7764d1568d514fc82d
|
3 |
+
size 1260
|
25/replication_package/mturk.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:452f6296b8caf93fd2c8b6f76b186933380db580d6df906edbf536dea7f01d93
|
3 |
+
size 4073
|
25/replication_package/nyt.RData
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:73cf20cef2cec54a7e2686a53a3e9a20b04593b2d95959d1bf6d8548bc4ee1f1
|
3 |
+
size 50906696
|
25/replication_package/ssi.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9a1356fb9edd45adf04c88a81a2317da28bef588f3ba3eb9d97793c6c6ca5b27
|
3 |
+
size 78485
|
25/replication_package/tvcoding.rdata
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ddf108c30868be42c3ef500e4bd64ae76164528f77d47a3a3c12213761e27cd2
|
3 |
+
size 1900
|
25/should_reproduce.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af1591c95e5a486a3c3b7498360035eba147c757722820a6d16d009f832086f0
|
3 |
+
size 16
|