Created
November 28, 2018 18:51
-
-
Save johnjosephhorton/ae6bc4ba9083309c448534982ad52012 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/Rscript --vanilla | |
suppressPackageStartupMessages({ | |
library(magrittr) | |
library(dplyr) | |
library(foreign) | |
library(plm) | |
library(reshape2) | |
library(stargazer) | |
library(ggplot2) | |
library(scales) | |
library(JJHmisc) | |
library(lfe) | |
library(lmtest) | |
library(lfe) | |
library(lme4) | |
library(lme4) | |
library(broom) | |
}) | |
df.results <- readRDS("../computed_objects/effects_robustness.rds") | |
g <- ggplot(data = df.results, aes(x = method, y = estimate)) + | |
geom_point(position = position_dodge(0.5)) + | |
geom_errorbar(aes(ymin = estimate - 2*std.error, | |
ymax = estimate + 2*std.error | |
), position = position_dodge(0.5)) + | |
geom_hline(yintercept = 0, colour = "blue") + | |
facet_grid(outcome.type ~ ad.type) + | |
theme_bw() + | |
theme(axis.text.x = element_text(angle = 45, hjust = 1), | |
strip.text.y = element_text(angle = 0), | |
legend.position = "top") + | |
xlab("Estimation method") + | |
ylab("Effect of Firm Vary shutting off ads") | |
JJHmisc::writeImage(g, "effects_robustness", path = "../writeup/plots/", width = 6, height = 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment