This repository was archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAppendix.Rmd
More file actions
130 lines (113 loc) · 6.03 KB
/
Appendix.Rmd
File metadata and controls
130 lines (113 loc) · 6.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: "Appendix"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
# Setting Working directory
try(setwd("/home/torben/GIT/Pair_Assignment_2"), silent = TRUE)
try(setwd("D:/Eigene Datein/Dokumente/Uni/Hertie/Materials/Collaborative Social Science Data Analysis/CSSR_Project"), silent = TRUE)
# load data / models / graphs
source("main.R")
```
#Appendix
```{r descriptive, echo=FALSE}
# select diagnoses data for state comparison
DS.A <- TOTAL %>% filter(GENDER == "all", AGE=="all") %>%
select(STATE, YEAR, F100_p1000, F102_p1000, K70_p1000, GDP_P_C, UR.LF, YUR, BTAX_P_C, PP)
# Youth unemployment rate
#ggplot(data=DS.A, aes(x = YEAR, y = YUR, group = STATE, colour = STATE)) +
# geom_line() + # line plot
# theme_bw() + # bw background
# xlab("Years") +
# ylab("Youth unemployment rate") +
# ggtitle("Youth unemployment in German states 2000-2014")
# Beer Tax
# REMARK: Beer TAX might be a bad proxy for beer consumption.
# According to this statistic Bremen is the largest consumer, but it probably just hints at Becks
#ggplot(data=DS.A, aes(x = YEAR, y = BTAX_P_C, group = STATE, colour = STATE)) +
# geom_line() + # line plot
# theme_bw() + # bw background
# xlab("Years") +
# ylab("Beer tax revenue per capita") +
# ggtitle("Beer tax in German states 2000-2014")
# German wide beer tax revenue
#BTAX.G <- TOTAL %>% filter(GENDER == "all", AGE == "all") %>%
# select(YEAR, STATE, BTAX)
#BTAX.G <- aggregate(as.numeric(BTAX.G$BTAX), by = list(BTAX.G$YEAR),
# FUN = sum)
#colnames(BTAX.G) <- c("YEAR","BTAX")
# Beer tax revenue in Germany 2000-2014
#ggplot(data=BTAX.G, aes(x = YEAR, y = BTAX)) +
# geom_line(colour="blue", size=1.5) + # line plot
# theme_bw() + # bw background
# xlab("Years") +
# ylab("Beer Tax Revenue in Tsd. Euro") +
# ggtitle("Beer Tax Revenue 2000-2014")
```
## Robustness Tests
```{r robustness, results="asis", echo=FALSE}
mod1.labels <- c("GDP per capita", "Unemployment rate", "Population density", "(Intercept)")
mod1.modellist <- as.character(c(2000:2014))
stargazer::stargazer(mod1.list[1:5],
covariate.labels = mod1.labels,
column.labels = mod1.modellist[1:5],
model.numbers = FALSE,
dep.var.labels = "F10.0 Diagnoses per 1000 capita",
title = 'Robustness test model 1 for the years 2000-2004',
digits = 2, type = 'latex', header = FALSE)
stargazer::stargazer(mod1.list[6:10],
covariate.labels = mod1.labels,
column.labels = mod1.modellist[6:10],
model.numbers = FALSE,
dep.var.labels = "F10.0 Diagnoses per 1000 capita",
title = 'Robustness test model 1 for the years 2005-2009',
digits = 2, type = 'latex', header = FALSE)
stargazer::stargazer(mod1.list[11:15],
covariate.labels = mod1.labels,
column.labels = mod1.modellist[11:15],
model.numbers = FALSE,
dep.var.labels = "F10.0 Diagnoses per 1000 capita",
title = 'Robustness test model 1 for the years 2010-2014',
digits = 2, type = 'latex', header = FALSE)
```
```{r, results="asis", echo=FALSE}
stargazer::stargazer(mod2.F100, mod2.F102, mod2.K70,
column.labels = c("F10.0", "F10.2", "K70"),
covariate.labels = c("GDP Change", "Unemployment Change",
"Beer Tax Change", "(Intercept)"),
model.numbers = FALSE,
dep.var.labels = c("Change in F10.0","Change in F10.2",
"Change in K70"),
title = 'Regression results for Model 2 with first differenced data',
digits = 2, type = 'latex', header = FALSE)
# Results Model 3
stargazer::stargazer(mod3.16, mod3.13,
column.labels = c("(3) All states + ages", "(3) non-city states + all ages"),
covariate.labels = c("BW night sale ban", "Post-ban dummy",
"Interaction dummy", "(Intercept)"),
model.numbers = FALSE,
dep.var.labels = c("F10.0 cases per 1000 PP (all ages)"),
title = 'Model 3 Simple Diff-in-Diff',
digits = 2, type = 'latex', header = FALSE)
stargazer::stargazer(mod3.age15.16, mod3.age15.13,
column.labels = c("(3) All states + 15-19y", "(3) non-city states + 15-19y"),
covariate.labels = c("BW night sale ban", "Post-ban dummy",
"Interaction dummy", "(Intercept)"),
model.numbers = FALSE,
dep.var.labels = c("F10.0 cases per 1000 PP among 15-19 year olds"),
title = 'Model 3 Simple Diff-in-Diff for 15-19 year old',
digits = 2, type = 'latex', header = FALSE)
```
```{r, results="asis", echo=FALSE}
stargazer::stargazer(mod4, mod4.age15, mod4.age15.13,
column.labels = c("(4) All states + ages","(4) All states + 15-19y",
"(4) non-city states + 15-19y"),
covariate.labels = c("BW night sale ban", "Post-ban dummy",
"GDP per capita", "Youth unemployment",
"Interaction dummy", "(Intercept)"),
model.numbers = FALSE,
dep.var.labels = c("F10.0 cases per 1000 PP (different age groups)"),
title = 'Model 4 Simple Diff-in-Diff with controls',
digits = 2, type = 'latex', header = FALSE)
```