-
Notifications
You must be signed in to change notification settings - Fork 9
/
07-class.Rmd
241 lines (160 loc) Β· 4.66 KB
/
07-class.Rmd
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
---
title: "Class 7: RCTs and IPW"
author: "Andrew Heiss"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
lib_dir: "libs"
chakra: "libs/remark-latest.min.js"
css: ["default", "css/ath-slides.css", "css/ath-inferno-fonts.css", "css/animate.css"]
seal: false
anchor_sections: false
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
ratio: "16:9"
navigation:
scroll: false
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE,
fig.retina = 3, fig.align = "center")
```
```{r packages-data, include=FALSE}
library(tidyverse)
library(ggdag)
library(palmerpenguins)
library(modelsummary)
```
```{r xaringanExtra, echo=FALSE}
xaringanExtra::use_xaringan_extra(c("tile_view"))
```
class: center middle main-title section-title-3
# In-person<br>session 7
.class-info[
**February 23, 2023**
.light[PMAP 8521: Program evaluation<br>
Andrew Young School of Policy Studies
]
]
---
name: outline
class: title title-inv-8
# Plan for today
--
.box-3.medium.sp-after-half[Super quick FAQs]
--
.box-2.medium.sp-after-half[RCTs]
--
.box-4.medium.sp-after-half[Matching and IPW]
---
layout: false
name: faqs
class: center middle section-title section-title-3 animated fadeIn
# Super quick FAQs
---
layout: true
class: middle
---
.box-3.large[Commenting stuff]
???
> I've had this question for a bit but remembered it during the section on building out the Matching and IPW project in R Studio. I'm trying to understand the commenting syntax in order to keep things in the code that do not get run. In Stata if you use /* to open and */ to close a comment block, everything between the two gets 'commented out' like this:
>
> /*
> Comments etc here
> */
>
> Is there a way to do this in R with pound signs?
---
.box-3.large[Randomness]
.box-3.medium[How do we use random.org for things in R?]
---
.box-3.medium[Do researchers actually check<br>all of the assumptions of OLS?<br>(or any statistical test?)]
.box-inv-3.small[[Sometimes](https://stats.andrewheiss.com/donors-crackdowns-aid/03_h1-total-aid.html)]
---
layout: false
name: rcts
class: center middle section-title section-title-2 animated fadeIn
# RCTs
---
layout: true
class: middle
---
.box-2.large[Do we really not control<br>for things in an RCT?]
---
.box-2.large[Randomness and arrow deletion]
???
> Since every arrow should reflect a causal relationship, itβs not possible for there to be an arrow pointing from a covariate to the allocation, since it is done at random. With no arrow pointing to the exposure, there can be no unblocked backdoor path, and thus no confounding. VoilΓ . <https://statsepi.substack.com/p/out-of-balance>
---
.center[
<figure>
<img src="img/07-class/coins.jpg" alt="Stack of coins" title="Stack of coins" width="70%">
</figure>
]
???
[Coins](http://www.freestockphotos.biz/stockphoto/8215)
---
.box-2.medium[Wordle!]
.center[
<figure>
<img src="img/07-class/blank-wordle.png" alt="Blank Wordle" title="Blank Wordle" width="40%">
</figure>
]
???
<https://twitter.com/dave_andersen/status/1495530221096873993>
<https://twitter.com/johnlray/status/1495421626074214402?s=21>
---
.center[
```text
Feb 10 2022 Day 236 PAUSE
Feb 11 2022 Day 237 ULCER
Feb 12 2022 Day 238 ULTRA
Feb 13 2022 Day 239 ROBIN
-----NYT TAKES OVER-----
Feb 14 2022 Day 240 CYNIC
Feb 15 2022 Day 241 AGORA
Feb 16 2022 Day 242 AROMA
Feb 17 2022 Day 243 CAULK
Feb 18 2022 Day 244 SHAKE
```
]
???
<https://medium.com/@owenyin/here-lies-wordle-2021-2027-full-answer-list-52017ee99e86>
---
.box-2.large[Balance tests]
???
Stratified randomization is okay
<https://twitter.com/ChelseaParlett/status/1370798053691514882>
---
.center[
<figure>
<img src="img/07-class/chelsea-first.png" alt="Balance tests and The Good Place" title="Balance tests and The Good Place" width="55%">
</figure>
]
---
.center[
<figure>
<img src="img/07-class/chelsea-second.png" alt="Balance tests and The Good Place" title="Balance tests and The Good Place" width="85%">
</figure>
]
---
.box-2.large[Can you walk through an example of<br>RCTs in class?]
---
layout: false
name: matching-ipw
class: center middle section-title section-title-4 animated fadeIn
# Matching and IPW
---
layout: true
class: middle
---
.box-4.large[Can you talk more about<br>propensity scores and<br>"weirdness" weights?]
---
.box-4.large[Why not just control for confounders<br>instead of doing the whole matching/IPW dance?]
---
.box-4.large[Which should we use?<br>Matching or IPW?]
---
.box-4.large[Can you walk through an example of<br>IPW and matching in class?]