Skip to content

Commit 118f266

Browse files
committed
update
1 parent b67b338 commit 118f266

File tree

10 files changed

+443
-288
lines changed

10 files changed

+443
-288
lines changed

slides/raw/11-tipr.html

Lines changed: 245 additions & 190 deletions
Large diffs are not rendered by default.

slides/raw/11-tipr.qmd

Lines changed: 196 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Tipping Point Sensitivity Analyses"
33
author: "Lucy D'Agostino McGowan"
44
institute: "Wake Forest University"
55
date: "2021-09-01 (updated: `r Sys.Date()`)"
6-
format: "kakashi-revealjs"
6+
format: kakashi-revealjs
77
knitr:
88
opts_chunk:
99
eval: false
@@ -17,177 +17,277 @@ options(
1717
)
1818
```
1919

20+
2021
## Recall: Propensity scores {background-color="#23373B"}
2122

2223
Rosenbaum and Rubin showed in observational studies, conditioning on **propensity scores** can lead to unbiased estimates of the exposure effect
2324

24-
1. There are no unmeasured confounders
25+
::: nonincremental
26+
1. **There are no unmeasured confounders**
2527
2. Every subject has a nonzero probability of receiving either exposure
28+
:::
29+
30+
# Quantifying Unmeasured Confounding
31+
32+
##
33+
34+
![](img/sens.png)
2635

2736
## Quantifying Unmeasured Confounding {background-color="#23373B"}
2837

2938
1. The exposure-outcome
3039
1. The exposure-unmeasured
3140
1. The unmeasured confounder-outcome effect
3241

42+
## Quantifying Unmeasured Confounding
43+
44+
![](img/adjust.png)
45+
46+
[D’Agostino McGowan, L. Sensitivity Analyses for Unmeasured Confounders. Curr Epidemiol Rep 9, 361–375 (2022)](https://doi.org/10.1007/s40471-022-00308-6)
47+
48+
3349
## {background-color="#23373B" .center .large}
3450

3551
### **What will tip our confidence bound to cross zero?**
3652

37-
## Quantifying Unmeasured Confounding
53+
##
3854

39-
::: {.nonincremental}
40-
1. The exposure-outcome
41-
1. The exposure-unmeasured
42-
1. ~~The unmeasured confounder-outcome effect~~
55+
:::: columns
56+
57+
::: column
58+
![](img/tipr-stuff.png)
4359
:::
4460

45-
---
61+
::: column
4662

47-
## Quantifying Unmeasured Confounding
4863

49-
::: {.nonincremental}
50-
1. The exposure-outcome
51-
1. ~~The exposure-unmeasured~~
52-
1. The unmeasured confounder-outcome effect
53-
:::
64+
![](img/logo.png){width=25% fig-align="right"}
5465

55-
## Tipping point
5666

57-
$$\Huge \beta_{UO}(LB_{obs}, \delta)$$
58-
* $\beta_{UO}$: the **unmeasured confounder-outcome effect**
67+
::: small
68+
* `{action}_{effect}_with_{what}`
69+
* `tip_rr_with_continous()`
70+
* `adjust_coef_with_r2()`
71+
:::
5972

60-
## Quantifying Unmeasured Confounding
73+
::: tiny
74+
[D’Agostino McGowan, L., (2022). tipr: An R package for sensitivity analyses for unmeasured confounders. Journal of Open Source Software, 7(77), 4495](https://doi.org/10.21105/joss.04495)
75+
:::
6176

62-
::: {.nonincremental}
63-
1. ~~The exposure-outcome~~
64-
1. ~~The exposure-unmeasured~~
65-
1. The unmeasured confounder-outcome effect
6677
:::
78+
::::
6779

68-
## Tipping point
80+
## {background-color="#23373B" .center .huge}
6981

70-
$$\Huge \beta_{UO}(LB_{obs}, \delta)$$
82+
### **tipr**
7183

72-
* $LB_{obs}$: **limiting bound** - the bound closest to the null
84+
##
7385

74-
## Quantifying Unmeasured Confounding
86+
![](img/metformin.png)
7587

76-
::: {.nonincremental}
77-
1. The exposure-outcome
78-
1. ~~The exposure-unmeasured~~
79-
1. ~~The unmeasured confounder-outcome effect~~
80-
:::
88+
## Question
8189

82-
## Tipping point
90+
![](img/met-cancer.png)
8391

84-
$$\Huge \beta_{UO}(LB_{obs}, \delta)$$
92+
## Analysis
8593

86-
* $\delta$: **standardized mean difference** of the unmeasured confounder between the exposed and unexposed groups
94+
* New-user design
95+
* **Matched** 42,217 new metformin users to 42,217 new sulfonylurea users
96+
* Fit **adjusted Cox proportional hazards model** on the matched cohort
8797

88-
## Quantifying Unmeasured Confounding
98+
## Results
8999

90-
::: {.nonincremental}
91-
1. ~~The exposure-outcome~~
92-
1. The exposure-unmeasured
93-
1. ~~The unmeasured confounder-outcome effect~~
94-
:::
100+
* **Outcome:** Lung Cancer
101+
* **Adjusted Hazard Ratio**: 0.87 (0.79, 0.96)
95102

96-
## Tipping Point
103+
# What if **alcohol consumption** is an unmeasured confounder? {background-color="#23373B"}
97104

98-
$$\Huge \beta_{UO}(LB_{obs}, \delta)=\frac{LB_{obs}}{\delta}$$
105+
# What if heavy alcohol consumption is prevalent among *4%* of Metformin users and *6%* of Sulfonylurea users?
99106

100-
## Tipping Point
107+
::: tiny
108+
Meadows SO, Engel CC, Collins RL, Beckman RL, Cefalu M,
109+
Hawes-Dawson J, et al. 2015 health related behaviors survey:
110+
Substance use among US active-duty service members. RAND; 2018.
111+
:::
101112

102-
$$\Huge \delta(LB_{obs}, \beta_{UO})=\frac{LB_{obs}}{\beta_{UO}}$$
113+
## `tipr` Example
103114

104-
## {background-color="#23373B" .center .huge}
115+
**What if we assume the effect of alcohol consumption on lung cancer after adjusting for other confounders is 2?**
105116

106-
### **tipr**
117+
```{r}
118+
#| eval: false
119+
library(tipr)
120+
adjust_hr_with_binary(
121+
effect_observed = c(0.79, 0.87, 0.96),
122+
exposed_confounder_prev = .04,
123+
unexposed_confounder_prev = .06,
124+
confounder_outcome_effect = 2)
125+
```
107126

108-
## Main function
127+
## `tipr` Example
109128

110-
### `tip_coef()`
129+
**What if we assume the effect of alcohol consumption on lung cancer after adjusting for other confounders is 2?**
111130

112-
* `effect_observed`: observed exposure - outcome effect
131+
```{r}
132+
#| eval: false
133+
#| code-line-numbers: '3'
134+
library(tipr)
135+
adjust_hr_with_binary(
136+
effect_observed = c(0.79, 0.87, 0.96),
137+
exposed_confounder_prev = .04,
138+
unexposed_confounder_prev = .06,
139+
confounder_outcome_effect = 2)
140+
```
113141

114-
## Quantifying Unmeasured Confounding
142+
## Results
115143

116-
::: {.nonincremental}
117-
1. The exposure-outcome
118-
1. ~~The exposure-unmeasured~~
119-
1. ~~The unmeasured confounder-outcome effect~~
144+
::: nonincremental
145+
* **Outcome:** Lung Cancer
146+
* **Adjusted Hazard Ratio**: 0.87 (0.79, 0.96)
120147
:::
121148

122-
## Main function
149+
## `tipr` Example
123150

124-
### `tip_coef()`
125-
* `exposure_confounder_effect`: scaled mean difference between the unmeasured confounder in the exposed and unexposed population
151+
**What if we assume the effect of alcohol consumption on lung cancer after adjusting for other confounders is 2?**
126152

127-
## Quantifying Unmeasured Confounding
153+
```{r}
154+
#| eval: false
155+
#| code-line-numbers: '4,5'
156+
library(tipr)
157+
adjust_hr_with_binary(
158+
effect_observed = c(0.79, 0.87, 0.96),
159+
exposed_confounder_prev = .04,
160+
unexposed_confounder_prev = .06,
161+
confounder_outcome_effect = 2)
162+
```
128163

129-
::: {.nonincremental}
130-
1. ~~The exposure-outcome~~
131-
1. The exposure-unmeasured
132-
1. ~~The unmeasured confounder-outcome effect~~
164+
# What if heavy alcohol consumption is prevalent among *4%* of Metformin users and *6%* of Sulfonylurea users?
165+
166+
::: tiny
167+
Meadows SO, Engel CC, Collins RL, Beckman RL, Cefalu M,
168+
Hawes-Dawson J, et al. 2015 health related behaviors survey:
169+
Substance use among US active-duty service members. RAND; 2018.
133170
:::
134171

135-
## Main function
172+
## `tipr` Example
173+
174+
*What if we assume the effect of alcohol consumption on lung cancer after adjusting for other confounders is 2?*
136175

137-
### `tip_coef()`
138-
* `confounder_outcome_effect`: relationship between the unmeasured confounder and outcome
176+
```{r}
177+
#| eval: false
178+
#| code-line-numbers: '6'
179+
library(tipr)
180+
adjust_hr_with_binary(
181+
effect_observed = c(0.79, 0.87, 0.96),
182+
exposed_confounder_prev = .04,
183+
unexposed_confounder_prev = .06,
184+
confounder_outcome_effect = 2)
185+
```
139186

140-
## Quantifying Unmeasured Confounding
187+
## `tipr` Example
141188

142-
::: {.nonincremental}
143-
1. ~~The exposure-outcome~~
144-
1. ~~The exposure-unmeasured~~
145-
1. The unmeasured confounder-outcome effect
146-
:::
189+
```{r}
190+
#| echo: false
191+
#| eval: true
192+
library(tipr)
193+
adjust_hr_with_binary(
194+
effect_observed = c(0.79, 0.87, 0.96),
195+
exposed_confounder_prev = .04,
196+
unexposed_confounder_prev = .06,
197+
confounder_outcome_effect = 2,
198+
verbose = FALSE)
199+
```
147200

148-
## Main function
201+
# “If heavy alcohol consumption differed between groups, with *4%* prevalence among metformin users and *6%* among sulfonylureas users, and had an HR of *2* with lung cancer incidence the updated adjusted effect of metformin on lung cancer incidence would be an HR of *0.89 (95% CI: 0.81–0.98)*. Should an unmeasured confounder like this exist, our effect of metformin on lung cancer incidence would be attenuated and fall much closer to the null. {.tiny}
149202

150-
### `tip_coef()`
203+
## `tipr` Example
151204

152-
::: {.nonincremental}
153-
* `effect_observed`
154-
:::
205+
```{r}
206+
#| code-line-numbers: "|6"
207+
#| eval: true
208+
library(tipr)
209+
sens <- adjust_hr_with_binary(
210+
effect_observed = 0.96,
211+
exposed_confounder_prev = .04,
212+
unexposed_confounder_prev = .06,
213+
confounder_outcome_effect = seq(1.1, 3.5, by = 0.1))
214+
```
155215

156-
## Main function
216+
## `tipr` Example
157217

158-
### `tip_coef()`: **specify** one, it will **estimate** the other
218+
```{r}
219+
#| eval: true
220+
library(ggplot2)
221+
ggplot(sens, aes(x = confounder_outcome_effect, y = hr_adjusted)) +
222+
geom_point() +
223+
geom_hline(yintercept = 1, lty = 2)
224+
```
159225

160-
::: {.nonincremental}
161-
* `exposure_confounder_effect`
162-
* `confounder_outcome_effect`
163-
:::
226+
## `tipr` Example
164227

165-
## Example
228+
```{r}
229+
#| code-line-numbers: "|2"
230+
library(tipr)
231+
tip_hr_with_binary(
232+
effect_observed = 0.96,
233+
exposed_confounder_prev = .04,
234+
unexposed_confounder_prev = .06)
235+
```
166236

167-
*Our causal effect estimate: **3.5 kg (95% CI 2.4 kg, 4.4 kg)***
237+
## `tipr` Example
168238

169239
```{r}
240+
#| echo: false
170241
#| eval: true
171-
#| output-location: fragment
172242
library(tipr)
173-
tip_coef(
174-
effect_observed = 2.4,
175-
exposure_confounder_effect = 0.3
176-
)
243+
tip_hr_with_binary(
244+
effect_observed = 0.96,
245+
exposed_confounder_prev = .04,
246+
unexposed_confounder_prev = .06)
177247
```
178248

179-
## Example
249+
# “If heavy alcohol consumption differed between groups, with *4%* prevalence among metformin users and *6%* among sulfonylureas users, it would need to have an association with lung cancer incidence of *3.27 to tip this analysis* at the 5% level, rendering it inconclusive. This effect is larger than the understood association between lung cancer and alcohol consumption." {.tiny}
250+
251+
## *What is known about the unmeasured confounder?*
252+
253+
:::: {.columns}
180254

181-
* The observed effect (2.4, 4.4) *WOULD* be tipped by 1 unmeasured confounder
182-
with the following specifications:
255+
::: small
256+
::: center
257+
::: {.column width=30%}
258+
### Both exposure and outcome relationship is known
183259

184-
* estimated standardized mean difference between the unmeasured confounder
185-
in the exposed population and unexposed population: *0.3*
260+
* `adjust_*` functions
261+
262+
:::
263+
264+
::: {.column width=30%}
265+
### Only one of the exposure/outcome relationships is known
266+
267+
* `adjust_*` functions in an array
268+
* `tip_*` functions
269+
:::
186270

187-
* estimated association between the unmeasured confounder and the outcome: *8*
271+
::: {.column width=30%}
272+
273+
### Nothing is known
274+
* `adjust_*` functions in an array
275+
* `tip_*` functions in an array
276+
* `tip_coef_with_r2()` (measured confounders)
277+
* Robustness value `r_value()` & E-values `e_value()`
278+
279+
:::
280+
281+
:::
282+
:::
283+
::::
188284

189285
## *Your turn*
190286

191-
`r countdown::countdown(minutes = 5)`
287+
```{r}
288+
#| eval: true
289+
#| echo: false
290+
countdown::countdown(minutes = 5)
291+
```
192292

193293
### Use the `tip_coef()` function to conduct a sensitivity analysis for the estimate from your previous exercises.
118 KB
Loading

slides/raw/11-tipr_files/libs/revealjs/dist/theme/quarto.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

slides/raw/img/adjust.png

373 KB
Loading

slides/raw/img/logo.png

88.4 KB
Loading

slides/raw/img/met-cancer.png

42.8 KB
Loading

slides/raw/img/metformin.png

188 KB
Loading

slides/raw/img/sens.png

891 KB
Loading

slides/raw/img/tipr-stuff.png

232 KB
Loading

0 commit comments

Comments
 (0)