Skip to content

Commit

Permalink
remove todo
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmbarrett committed Sep 2, 2023
1 parent 4398644 commit eab6538
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Binary file modified slides/pdf/04-dags.pdf
Binary file not shown.
9 changes: 4 additions & 5 deletions slides/raw/04-dags.html
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ <h2><em>Your Turn 1</em> (<strong><code>04-dags-exercises.qmd</code></strong>)</
<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>
<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>
<h3 id="plot-the-dag-using-ggdag">Plot the DAG using <code>ggdag()</code></h3>
<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>
<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>
</section>
<section id="your-turn-1-02-dags-exercises.qmd" class="slide level2">
<h2><em>Your Turn 1</em> (<code>02-dags-exercises.qmd</code>)</h2>
Expand Down Expand Up @@ -582,7 +582,7 @@ <h2><code>ggdag_paths()</code></h2>
<h2><em>Your Turn 2</em></h2>
<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>
<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>
<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>
<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>
</section>
<section id="your-turn-2-1" class="slide level2">
<h2><em>Your Turn 2</em></h2>
Expand Down Expand Up @@ -684,7 +684,7 @@ <h2><em>Your Turn 3</em></h2>
<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>
<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>
<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>
<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>
<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>
</section>
<section id="your-turn-3-1" class="slide level2">
<h2><em>Your Turn 3</em></h2>
Expand Down Expand Up @@ -806,8 +806,7 @@ <h2><em>Your Turn 4</em></h2>
<span id="cb18-13"><a href="#cb18-13"></a> )</span>
<span id="cb18-14"><a href="#cb18-14"></a>)</span>
<span id="cb18-15"><a href="#cb18-15"></a></span>
<span id="cb18-16"><a href="#cb18-16"></a><span class="co">#TODO: UPDATE LABELS ARGS</span></span>
<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>
<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>
</div>

</section>
Expand Down
1 change: 0 additions & 1 deletion slides/raw/04-dags.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ coffee_cancer_dag_to <- dagify(
)
)
#TODO: UPDATE LABELS ARGS
ggdag(coffee_cancer_dag_to, use_labels = "label", text = FALSE)
```

Expand Down

0 comments on commit eab6538

Please sign in to comment.