forked from child-growth/causes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-DAGs.Rmd
332 lines (275 loc) · 14.6 KB
/
01-DAGs.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# Directed Acyclic Diagrams (DAGs) {#dags}
---
output:
pdf_document:
keep_tex: yes
fontfamily: mathpazo
fontsize: 9pt
---
\raggedright
```{r setup_mort, include=FALSE}
library(knitr)
knitr::opts_chunk$set(echo = TRUE)
source(paste0(here::here(), "/0-config.R"))
```
## Overview
__Purpose: __ For each exposure, we used the directed acyclic graph (DAG) framework to identify potential confounders from the broader set of exposures used in the analysis. We did not adjust for characteristics that were assumed to be intermediate on the causal path between any exposure and the outcome, because while controlling for mediators may help adjust for unmeasured confounders in some conditions, it can also lead to collider bias. As DAG's were hand-drawn and are complex for the large number of exposures, we show an example DAG here and then list all potential considered for each exposure in a table below.
__Interpretation: __ The DAG below shows the set of adjusted-for exposures and unadjusted-for exposures for the estimated association between maternal weight and child growth faltering. Grey variables are on the causal pathway and are not adjusted for, while blue variables were considered potential confounders and adjusted for. Note collinear variables like maternal BMI are shown as on the causal pathway in this DAG, which may not be biologically accurate, but they were not adjusted for so are included with the potential mediators.
__Implications: __ Given the exposures measured in each study, we attempted to maximally adjust for confounding without adjusting for mediators on the casual pathway, which would remove part of the effect of the exposure on the outcome. Confounders were not measured in every cohort, so there could be residual confounding in cohort-specific estimates, and actual DAGs will look different across cohort-specific estimates for each study.
## Simplified example DAG:
```{r, echo = FALSE, message=FALSE, warning=FALSE}
# file.copy(from="~/ki-longitudinal-manuscripts/figures/dags/",
# to=paste0(here::here(), "/figures/dags/"), overwrite=TRUE, recursive=TRUE)
include_graphics(paste0(here::here(),"/figures/dags/dags/cc-example-dag.png"))
```
## DAG used: Association between maternal weight and child growth faltering
```{r, echo = FALSE, message=FALSE, warning=FALSE}
# file.copy(from="~/ki-longitudinal-manuscripts/figures/dags/",
# to=paste0(here::here(), "/figures/dags/"), overwrite=TRUE, recursive=TRUE)
include_graphics(paste0(here::here(),"/figures/dags/dags/mwtkg.png"))
```
## Table of Adjustment Covariates
```{r, echo = FALSE, message=F}
adjustment_sets <- list(
gagebrth=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
sga=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
birthwt=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
birthlen=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
# vagbrth=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
# "W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
# "hdlvry",
# "single",
# "W_nrooms","W_nhh","W_nchldlt5",
# "brthmon","W_parity",
# "trth2o","cleanck","impfloor","impsan","safeh20"),
hdlvry=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
mage=c("arm","W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"trth2o","cleanck","impfloor","impsan","safeh20"),
fage=c("arm","W_mage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon",
"trth2o","cleanck","impfloor","impsan","safeh20"),
mhtcm=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_fhtcm",
"single",
"W_nrooms",
"trth2o","cleanck","impfloor","impsan","safeh20"),
mwtkg=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
mbmi=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
single=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"W_nrooms","W_nhh","W_nchldlt5",
"trth2o","cleanck","impfloor","impsan","safeh20"),
fhtcm=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi",
"single",
"W_nrooms",
"trth2o","cleanck","impfloor","impsan","safeh20"),
nrooms=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nhh","W_nchldlt5",
"W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
nhh=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms",
"W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
nchldlt5=c("arm", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms",
"W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
hhwealth_quart=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs",
"W_gagebrth","W_birthwt","W_birthlen",
"single","W_nhh","W_nchldlt5",
"W_parity"),
parity=c("arm","W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"single",
"W_nrooms",
"trth2o","cleanck","impfloor","impsan","safeh20"),
meducyrs=c("arm", "W_mage", "W_fage", "feducyrs", "hhwealth_quart",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"W_gagebrth","W_birthwt","W_birthlen",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"trth2o","cleanck","impfloor","impsan","safeh20"),
feducyrs=c("arm", "W_mage", "W_fage", "meducyrs", "hhwealth_quart",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"W_gagebrth","W_birthwt","W_birthlen",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"trth2o","cleanck","impfloor","impsan","safeh20"),
hfoodsec=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart",
"vagbrth","hdlvry",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
anywast06=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"month","brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
pers_wast=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"month","brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
trth2o=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"cleanck","impfloor","impsan","safeh20"),
cleanck=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"W_parity",
"trth2o","impfloor","impsan","safeh20"),
impfloor=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"W_parity",
"trth2o","cleanck","impsan","safeh20"),
impsan=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"W_parity",
"trth2o","cleanck","impfloor","safeh20"),
safeh20=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"W_parity",
"trth2o","cleanck","impfloor","impsan"),
perdiar6=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"W_gagebrth","W_birthwt","W_birthlen",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"month","brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
perdiar24=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"W_gagebrth","W_birthwt","W_birthlen",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"month","brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
predexfd6= c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"W_gagebrth","W_birthwt","W_birthlen",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"month","brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20"),
earlybf=c("arm","sex", "W_mage", "W_fage", "meducyrs", "feducyrs", "hhwealth_quart", "hfoodsec",
"W_mhtcm","W_mwtkg","W_bmi", "W_fhtcm",
"vagbrth","hdlvry",
"W_gagebrth","W_birthwt","W_birthlen",
"single",
"W_nrooms","W_nhh","W_nchldlt5",
"brthmon","W_parity",
"trth2o","cleanck","impfloor","impsan","safeh20")
)
var_names = names(adjustment_sets)
cov_df = do.call(rbind, Map(data.frame, Exposure=var_names, "Potential adjustment covariates"=adjustment_sets, check.names=FALSE))
cov_df$`Potential adjustment covariates` = gsub('W_', '', cov_df$`Potential adjustment covariates`)
cov_df[cov_df == 'gagebrth'] <- 'Gestational age at birth'
cov_df[cov_df == 'sga'] <- 'Small for gestational age'
cov_df[cov_df == 'birthwt'] <- 'Birthweight (kg)'
cov_df[cov_df == 'birthlen'] <- 'Birth length (cm)'
cov_df[cov_df == 'vagbrth'] <- 'Vaginal birth'
cov_df[cov_df == 'hdlvry'] <- 'Child delivered at home'
cov_df[cov_df == 'mage'] <- "Mother's age"
cov_df[cov_df == 'fage'] <- "Father's age"
cov_df[cov_df == 'mhtcm'] <- "Mother's height"
cov_df[cov_df == 'mwtkg'] <- "Mother's weight"
cov_df[cov_df == 'mbmi'] <- "Mother's BMI"
cov_df[cov_df == 'month'] <- "Month of measurement"
cov_df[cov_df == 'single'] <- 'Single parent'
cov_df[cov_df == 'fhtcm'] <- "Father's height"
cov_df[cov_df == 'nrooms'] <- "# of rooms in HH"
cov_df[cov_df == 'nhh'] <- "# of people in HH"
cov_df[cov_df == 'nchldlt5'] <- '# of children <5 in HH'
cov_df[cov_df == 'hhwealth_quart'] <- 'HH wealth'
cov_df[cov_df == 'parity'] <- "Birth order"
cov_df[cov_df == 'meducyrs'] <- "Mother's education"
cov_df[cov_df == 'feducyrs'] <- "Father's education"
cov_df[cov_df == 'hfoodsec'] <- "HH food security"
cov_df[cov_df == 'anywast06'] <- "Any wasting <6 mo."
cov_df[cov_df == 'pers_wast'] <- "Persistent wasting <6 mo."
cov_df[cov_df == 'trth2o'] <- "Treats drinking water"
cov_df[cov_df == 'cleanck'] <- "Clean cooking fuel usage"
cov_df[cov_df == 'impfloor'] <- "Improved floor"
cov_df[cov_df == 'impsan'] <- "Improved sanitation"
cov_df[cov_df == 'safeh20'] <- "Safe water source"
cov_df[cov_df == 'perdiar6'] <- "Diarrhea <6 mo. (% days)"
cov_df[cov_df == 'perdiar24'] <- "Diarrhea <24 mo. (% days)"
cov_df[cov_df == 'predexfd6'] <- "Excl/Pred breastfed <6mo."
cov_df[cov_df == 'earlybf'] <- "Breastfed hour after birth"
cov_df[cov_df == 'sex'] <- "Child sex"
cov_df[cov_df == 'arm'] <- "Treatment arm"
cov_df[cov_df == 'brthmon'] <- "Month of Birth"
cov_df[cov_df == 'bmi'] <- "BMI"
df = aggregate(`Potential adjustment covariates` ~ Exposure, cov_df, list)
kable(df)
```