diff --git a/slides/pdf/04-dags.pdf b/slides/pdf/04-dags.pdf index f0959a7..e4a5130 100644 Binary files a/slides/pdf/04-dags.pdf and b/slides/pdf/04-dags.pdf differ diff --git a/slides/raw/04-dags.html b/slides/raw/04-dags.html index 8cc54a0..114e038 100644 --- a/slides/raw/04-dags.html +++ b/slides/raw/04-dags.html @@ -526,7 +526,7 @@

Your Turn 1 (04-dags-exercises.qmd)Specify a DAG with dagify(). Write your assumption that smoking causes cancer as a formula.

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).

Plot the DAG using ggdag()

-

05:00

+

05:00

Your Turn 1 (02-dags-exercises.qmd)

@@ -582,7 +582,7 @@

ggdag_paths()

Your Turn 2

Call tidy_dagitty() on coffee_cancer_dag to create a tidy DAG, then pass the results to dag_paths(). What’s different about these data?

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.

-

05:00

+

05:00

Your Turn 2

@@ -684,7 +684,7 @@

Your Turn 3

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. multivariable regression, weighting, or matching for the adjustment sets).

Use ggdag_adjustment_set() to visualize the adjustment sets. Add the arguments use_labels = "label" and text = FALSE.

Write an R formula for each adjustment set, as you might if you were fitting a model in lm() or glm()

-

05:00

+

05:00

Your Turn 3

@@ -806,8 +806,7 @@

Your Turn 4

) ) -#TODO: UPDATE LABELS ARGS -ggdag(coffee_cancer_dag_to, use_labels = "label", text = FALSE) +ggdag(coffee_cancer_dag_to, use_labels = "label", text = FALSE)
diff --git a/slides/raw/04-dags.qmd b/slides/raw/04-dags.qmd index 0748bc6..24d1ac5 100644 --- a/slides/raw/04-dags.qmd +++ b/slides/raw/04-dags.qmd @@ -618,7 +618,6 @@ coffee_cancer_dag_to <- dagify( ) ) -#TODO: UPDATE LABELS ARGS ggdag(coffee_cancer_dag_to, use_labels = "label", text = FALSE) ```