Skip to content

Commit eab6538

Browse files
remove todo
1 parent 4398644 commit eab6538

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

slides/pdf/04-dags.pdf

-668 Bytes
Binary file not shown.

slides/raw/04-dags.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ <h2><em>Your Turn 1</em> (<strong><code>04-dags-exercises.qmd</code></strong>)</
526526
<h3 id="specify-a-dag-with-dagify.-write-your-assumption-that-smoking-causes-cancer-as-a-formula.">Specify a DAG with <code>dagify()</code>. Write your assumption that <code>smoking</code> causes <code>cancer</code> as a formula.</h3>
527527
<h3 id="were-going-to-assume-that-coffee-does-not-cause-cancer-so-theres-no-formula-for-that.-but-we-still-need-to-declare-our-causal-question.-specify-coffee-as-the-exposure-and-cancer-as-the-outcome-both-in-quotations-marks.">We’re going to assume that coffee does not cause cancer, so there’s no formula for that. But we still need to declare our causal question. Specify “coffee” as the exposure and “cancer” as the outcome (both in quotations marks).</h3>
528528
<h3 id="plot-the-dag-using-ggdag">Plot the DAG using <code>ggdag()</code></h3>
529-
<p></p><div class="countdown" id="timer_d8e1985f" data-update-every="1" tabindex="0" style="right:0;bottom:0;"> <div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div> <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> </div><p></p>
529+
<p></p><div class="countdown" id="timer_5c113c64" data-update-every="1" tabindex="0" style="right:0;bottom:0;"> <div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div> <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> </div><p></p>
530530
</section>
531531
<section id="your-turn-1-02-dags-exercises.qmd" class="slide level2">
532532
<h2><em>Your Turn 1</em> (<code>02-dags-exercises.qmd</code>)</h2>
@@ -582,7 +582,7 @@ <h2><code>ggdag_paths()</code></h2>
582582
<h2><em>Your Turn 2</em></h2>
583583
<h3 id="call-tidy_dagitty-on-coffee_cancer_dag-to-create-a-tidy-dag-then-pass-the-results-to-dag_paths.-whats-different-about-these-data">Call <code>tidy_dagitty()</code> on <code>coffee_cancer_dag</code> to create a tidy DAG, then pass the results to <code>dag_paths()</code>. What’s different about these data?</h3>
584584
<h3 id="plot-the-open-paths-with-ggdag_paths.-just-give-it-coffee_cancer_dag-rather-than-using-dag_paths-the-quick-plot-function-will-do-that-for-you.-remember-since-we-assume-there-is-no-causal-path-from-coffee-to-lung-cancer-any-open-paths-must-be-confounding-pathways.">Plot the open paths with <code>ggdag_paths()</code>. (Just give it <code>coffee_cancer_dag</code> rather than using <code>dag_paths()</code>; the quick plot function will do that for you.) Remember, since we assume there is <em>no</em> causal path from coffee to lung cancer, any open paths must be confounding pathways.</h3>
585-
<p></p><div class="countdown" id="timer_3aa2cb8e" data-update-every="1" tabindex="0" style="right:0;bottom:0;"> <div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div> <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> </div><p></p>
585+
<p></p><div class="countdown" id="timer_ab4805eb" data-update-every="1" tabindex="0" style="right:0;bottom:0;"> <div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div> <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> </div><p></p>
586586
</section>
587587
<section id="your-turn-2-1" class="slide level2">
588588
<h2><em>Your Turn 2</em></h2>
@@ -684,7 +684,7 @@ <h2><em>Your Turn 3</em></h2>
684684
<h3 id="now-that-we-know-the-open-confounding-pathways-sometimes-called-backdoor-paths-we-need-to-know-how-to-close-them-first-well-ask-ggdag-for-adjustment-sets-then-we-would-need-to-do-something-in-our-analysis-to-account-for-at-least-one-adjustment-set-e.g.-multivariable-regression-weighting-or-matching-for-the-adjustment-sets.">Now that we know the open, confounding pathways (sometimes called “backdoor paths”), we need to know how to close them! First, we’ll ask {ggdag} for adjustment sets, then we would need to do something in our analysis to account for at least one adjustment set (e.g.&nbsp;multivariable regression, weighting, or matching for the adjustment sets).</h3>
685685
<h3 id="use-ggdag_adjustment_set-to-visualize-the-adjustment-sets.-add-the-arguments-use_labels-label-and-text-false.">Use <code>ggdag_adjustment_set()</code> to visualize the adjustment sets. Add the arguments <code>use_labels = "label"</code> and <code>text = FALSE</code>.</h3>
686686
<h3 id="write-an-r-formula-for-each-adjustment-set-as-you-might-if-you-were-fitting-a-model-in-lm-or-glm">Write an R formula for each adjustment set, as you might if you were fitting a model in <code>lm()</code> or <code>glm()</code></h3>
687-
<p></p><div class="countdown" id="timer_f2b83c54" data-update-every="1" tabindex="0" style="right:0;bottom:0;"> <div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div> <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> </div><p></p>
687+
<p></p><div class="countdown" id="timer_65bf0cf1" data-update-every="1" tabindex="0" style="right:0;bottom:0;"> <div class="countdown-controls"><button class="countdown-bump-down"></button><button class="countdown-bump-up">+</button></div> <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> </div><p></p>
688688
</section>
689689
<section id="your-turn-3-1" class="slide level2">
690690
<h2><em>Your Turn 3</em></h2>
@@ -806,8 +806,7 @@ <h2><em>Your Turn 4</em></h2>
806806
<span id="cb18-13"><a href="#cb18-13"></a> )</span>
807807
<span id="cb18-14"><a href="#cb18-14"></a>)</span>
808808
<span id="cb18-15"><a href="#cb18-15"></a></span>
809-
<span id="cb18-16"><a href="#cb18-16"></a><span class="co">#TODO: UPDATE LABELS ARGS</span></span>
810-
<span id="cb18-17"><a href="#cb18-17"></a><span class="fu">ggdag</span>(coffee_cancer_dag_to, <span class="at">use_labels =</span> <span class="st">"label"</span>, <span class="at">text =</span> <span class="cn">FALSE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
809+
<span id="cb18-16"><a href="#cb18-16"></a><span class="fu">ggdag</span>(coffee_cancer_dag_to, <span class="at">use_labels =</span> <span class="st">"label"</span>, <span class="at">text =</span> <span class="cn">FALSE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
811810
</div>
812811

813812
</section>

slides/raw/04-dags.qmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ coffee_cancer_dag_to <- dagify(
618618
)
619619
)
620620
621-
#TODO: UPDATE LABELS ARGS
622621
ggdag(coffee_cancer_dag_to, use_labels = "label", text = FALSE)
623622
```
624623

0 commit comments

Comments
 (0)