-
Notifications
You must be signed in to change notification settings - Fork 0
/
ap2.Rnw
121 lines (102 loc) · 5.24 KB
/
ap2.Rnw
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
% Appendix 2: Other estimations for Models
<<parent_to_ap2, include = F>>=
set_parent('main.Rnw') # Set the parent document preamble
@
\section{Appendix B: Other estimations for models in Table \ref{tab:simplemodel}}
\label{app:second}
Table \ref{tab:probitsimp} shows a probit estimation of the model displayed in Equation \ref{eqn:simplemod}. The signs of the coefficients in this table confirm the findings of the logit model as explained in Table \ref{tab:simplemodel}. Table \ref{tab:probitsimpape} shows average partial effects for the probit models in Table \ref{tab:probitsimp}. The magnitudes of these effects are similar to those shown in Table \ref{tab:simplemodel}. Table \ref{tab:lpmsimp} shows the estimated effects of a linear probability model of Equation \ref{eqn:simplemod}, which also follow the coefficient signs in the logit and probit estimates.
% Probit coefficients
\begin{table}[htbp]
\caption{Probit coefficients for baseline models}
\label{tab:probitsimp}
<<table-probit, include = T, results = 'asis', warning = F, message = F>>=
# Source the models
source('scripts/baseline_regs.R')
# Coefficient name mappings
coefficient_names<-c('(Intercept)' = 'Constant',
'year2016' = '2016 Dummy',
'econ_sitWorse' = 'Worse Economic Situation',
'unem2_4a' = 'Unemployment',
'pres_conf' = 'Confidence in President',
'pres_aprov' = 'Approval of Pres. Performance',
'polscore' = 'Political Wing',
'year2016:econ_sitWorse' = 'Econ. Situation Interaction',
'year2016:unem2_4a' = 'Unemployment Interaction',
'year2016:pres_conf' = 'Pres. Confidence Interaction',
'year2016:pres_aprov' = 'Pres. Approval Interaction',
'year2016:polscore' = 'Pol. Wing Interaction')
# GOF mapping
base_models_stats<-
list(list("raw" = "nobs", "clean" = "$N$", "fmt" = 0),
list("raw" = "aic", "clean" = "AIC", "fmt" = 2),
list("raw" = "bic", "clean" = "BIC", "fmt" = 2))
# Do the table
modelsummary(base_models_prob,
output = 'latex_tabular',
gof_map = base_models_stats,
coef_map = coefficient_names)
@
\vspace{0.25cm}
\textbf{Note:} Probit coefficients of the baseline models as described by Equation \ref{eqn:simplemod}. Standard errors consider design effects of the AB complex survey design.\\
*$p$ < 0.1, **$p$< 0.05, ***$p$ < 0.01.
\end{table}
% Do the APE table
\begin{table}[htbp]
\caption{Average partial effects for probit models in Table \ref{tab:probitsimp}}
\begin{center}
\label{tab:probitsimpape}
<<baseline-apes-table, include = T, results = 'asis', cache = F>>=
# Coefficient mappings
coefficient_names_ape<-c('year' = '2016 Dummy',
'econ_sit' = 'Worse Economic Situation',
'unem2_4a' = 'Unemployment',
'pres_conf' = 'Confidence in President',
'pres_aprov' = 'Approval of Pres. Performance',
'polscore' = 'Political Wing')
# Goodness of fit mappings
gof_simpapes<-
list(list("raw" = "nobs", "clean" = "$N$", "fmt" = 0))
modelsummary(base_probit_mfx,
stars = c('*'= 0.1, '**' = 0.05, '***'= 0.01),
output = 'latex_tabular',
coef_map = coefficient_names_ape,
gof_map = gof_simpapes)
@
\vspace{0.25cm}
\end{center}
\textbf{Note:} Average partial effects for the models estimated in Table \ref{tab:probitsimp}. Data from the open-access AB databases. Standard errors consider design effects of the AB complex survey design.\\
*$p$ < 0.1, **$p$< 0.05, ***$p$ < 0.01.
\end{table}
% LPM coefficients
\begin{table}[htbp]
\caption{LPM coefficients for baseline models}
\label{tab:lpmsimp}
<<table-lpm, include = T, results = 'asis', warning = F, message = F>>=
# Coefficient name mappings
coefficient_names<-c('(Intercept)' = 'Constant',
'year2016' = '2016 Dummy',
'econ_sitWorse' = 'Worse Economic Situation',
'unem2_4a' = 'Unemployment',
'pres_conf' = 'Confidence in President',
'pres_aprov' = 'Approval of Pres. Performance',
'polscore' = 'Political Wing',
'year2016:econ_sitWorse' = 'Econ. Situation Interaction',
'year2016:unem2_4a' = 'Unemployment Interaction',
'year2016:pres_conf' = 'Pres. Confidence Interaction',
'year2016:pres_aprov' = 'Pres. Approval Interaction',
'year2016:polscore' = 'Pol. Wing Interaction')
# GOF mapping
base_models_stats<-
list(list("raw" = "nobs", "clean" = "$N$", "fmt" = 0),
list("raw" = "aic", "clean" = "AIC", "fmt" = 2),
list("raw" = "bic", "clean" = "BIC", "fmt" = 2))
# Do the table
modelsummary(base_models_lpm,
output = 'latex_tabular',
gof_map = base_models_stats,
coef_map = coefficient_names)
@
\vspace{0.25cm}
\textbf{Note:} LPM coefficients of the baseline models as described by Equation \ref{eqn:simplemod}. Standard errors consider design effects of the AB complex survey design.\\
*$p$ < 0.1, **$p$< 0.05, ***$p$ < 0.01.
\end{table}