Skip to content

Commit edbd737

Browse files
committed
update2
1 parent 2eea1c1 commit edbd737

File tree

2 files changed

+113
-1
lines changed

2 files changed

+113
-1
lines changed

slides/raw/11-tipr.html

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,69 @@ <h3 id="nothing-is-known">Nothing is known</h3>
670670
</div>
671671
</div>
672672
</div>
673+
</div>
674+
</section>
675+
<section id="disney-data" class="slide level2">
676+
<h2>Disney Data</h2>
677+
<h3 id="tip_coef"><code>tip_coef()</code></h3>
678+
<ul>
679+
<li class="fragment"><code>effect_observed</code>: observed exposure - outcome effect <strong>4.45 minutes (95% CI: 0.17, 8.37)</strong></li>
680+
</ul>
681+
</section>
682+
<section id="disney-data-1" class="slide level2">
683+
<h2>Disney Data</h2>
684+
<h3 id="tip_coef-1"><code>tip_coef()</code></h3>
685+
<ul>
686+
<li class="fragment"><code>exposure_confounder_effect</code>: scaled mean difference between the unmeasured confounder in the exposed and unexposed population</li>
687+
</ul>
688+
</section>
689+
<section id="disney-data-2" class="slide level2">
690+
<h2>Disney Data</h2>
691+
<h3 id="tip_coef-2"><code>tip_coef()</code></h3>
692+
<ul>
693+
<li class="fragment"><code>confounder_outcome_effect</code>: relationship between the unmeasured confounder and outcome</li>
694+
</ul>
695+
</section>
696+
<section id="disney-data-3" class="slide level2">
697+
<h2>Disney Data</h2>
698+
<h3 id="tip_coef-specify-one-it-will-estimate-the-other"><code>tip_coef()</code>: <strong>specify</strong> one, it will <strong>estimate</strong> the other</h3>
699+
<div>
700+
<ul>
701+
<li><code>exposure_confounder_effect</code></li>
702+
<li><code>confounder_outcome_effect</code></li>
703+
</ul>
704+
</div>
705+
</section>
706+
<section id="disney-data-4" class="slide level2">
707+
<h2>Disney Data</h2>
708+
<p><em>Our causal effect estimate: <strong>4.45 minutes (95% CI: 0.17, 8.37)</strong></em></p>
709+
<div class="small">
710+
<div class="cell" data-layout-align="center">
711+
<div class="cell-output cell-output-stdout">
712+
<pre><code># A tibble: 1 × 4
713+
effect_observed exposure_confounder_effect confounder_outcome_effect
714+
&lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;
715+
1 0.17 0.1 1.7
716+
# ℹ 1 more variable: n_unmeasured_confounders &lt;dbl&gt;</code></pre>
717+
</div>
718+
</div>
719+
</div>
720+
<div class="cell" data-layout-align="center">
721+
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1"></a><span class="fu">library</span>(tipr)</span>
722+
<span id="cb11-2"><a href="#cb11-2"></a><span class="fu">tip_coef</span>(</span>
723+
<span id="cb11-3"><a href="#cb11-3"></a> <span class="at">effect_observed =</span> <span class="fl">0.17</span>,</span>
724+
<span id="cb11-4"><a href="#cb11-4"></a> <span class="at">exposure_confounder_effect =</span> <span class="fl">0.1</span></span>
725+
<span id="cb11-5"><a href="#cb11-5"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
726+
</div>
727+
<div class="cell fragment" data-layout-align="center">
728+
673729
</div>
674730
</section>
675731
<section id="your-turn" class="slide level2">
676732
<h2><em>Your turn</em></h2>
677733
<div class="cell" data-layout-align="center">
678734
<div class="cell-output-display">
679-
<div class="countdown" id="timer_ea0c8eb2" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
735+
<div class="countdown" id="timer_091bf475" data-update-every="1" tabindex="0" style="right:0;bottom:0;">
680736
<div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div>
681737
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
682738
</div>

slides/raw/11-tipr.qmd

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,62 @@ tip_hr_with_binary(
288288
:::
289289
::::
290290

291+
## Disney Data
292+
293+
### `tip_coef()`
294+
295+
* `effect_observed`: observed exposure - outcome effect **4.45 minutes (95% CI: 0.17, 8.37)**
296+
297+
## Disney Data
298+
299+
### `tip_coef()`
300+
* `exposure_confounder_effect`: scaled mean difference between the unmeasured confounder in the exposed and unexposed population
301+
302+
303+
304+
## Disney Data
305+
306+
### `tip_coef()`
307+
* `confounder_outcome_effect`: relationship between the unmeasured confounder and outcome
308+
309+
310+
## Disney Data
311+
312+
### `tip_coef()`: **specify** one, it will **estimate** the other
313+
314+
::: {.nonincremental}
315+
* `exposure_confounder_effect`
316+
* `confounder_outcome_effect`
317+
:::
318+
319+
## Disney Data
320+
321+
*Our causal effect estimate: **4.45 minutes (95% CI: 0.17, 8.37)***
322+
323+
::: small
324+
```{r}
325+
#| eval: true
326+
#| echo: false
327+
#| output-location: fragment
328+
library(tipr)
329+
tip_coef(
330+
effect_observed = 0.17,
331+
exposure_confounder_effect = 0.1,
332+
verbose = FALSE
333+
)
334+
```
335+
:::
336+
337+
```{r}
338+
#| eval: false
339+
#| output-location: fragment
340+
library(tipr)
341+
tip_coef(
342+
effect_observed = 0.17,
343+
exposure_confounder_effect = 0.1
344+
)
345+
```
346+
291347
## *Your turn*
292348

293349
```{r}

0 commit comments

Comments
 (0)