Skip to content

Commit 21de0bd

Browse files
committed
2 parents fffc975 + 3fe6ce6 commit 21de0bd

28 files changed

+59
-37
lines changed

exercises/01-whole-game-exercises.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ smk_wt_dag <- dagify(
112112
"smokeintensity" = "smoking\nintensity",
113113
"smokeyrs" = "yrs of\nsmoking"
114114
)
115-
) %>% tidy_dagitty(laout = "star")
115+
) %>% tidy_dagitty(layout = "star")
116116
117117
smk_wt_dag
118118
```

exercises/06-pscores-weighting-exercises.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ library(broom)
1010
library(touringplans)
1111
```
1212

13-
We are interested in examining the relationship between whether there were "Extra Magic Hours" in the morning (the **expsoure**) and the average wait time for the Seven Dwarfs Mine Train the same day between 9am and 10am (the **outcome**).
13+
We are interested in examining the relationship between whether there were "Extra Magic Hours" in the morning (the **exposure**) and the average wait time for the Seven Dwarfs Mine Train the same day between 9am and 10am (the **outcome**).
1414

1515
Below is the propensity score model you created in the previous exercise.
1616

exercises/07-pscores-diagnostics-exercises.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ library(touringplans)
1212
library(ggecdf)
1313
```
1414

15-
We are interested in examining the relationship between whether there were "Extra Magic Hours" in the morning (the **expsoure**) and the average wait time for the Seven Dwarfs Mine Train the same day between 9am and 10am (the **outcome**).
15+
We are interested in examining the relationship between whether there were "Extra Magic Hours" in the morning (the **exposure**) and the average wait time for the Seven Dwarfs Mine Train the same day between 9am and 10am (the **outcome**).
1616

1717
Below is the propensity score model and weights you created in the previous exercise.
1818

exercises/09-continuous-exposures.Rmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ In the touringplans data set, we have information about the posted waiting times
1717
library(ggdag)
1818
1919
coord_dag <- list(
20-
x = c(Season = -1, close = -1, weather = -2, extra = 0, x = 1, y = 2),
21-
y = c(Season = -1, close = 1, weather = 0.25, extra = 0, x = 0, y = 0)
20+
x = c(wdw_ticket_season = -1, close = -1, weather_wdwhigh = -2, extra_magic_morning = 0, avg_spostmin = 1, avg_sactmin = 2),
21+
y = c(wdw_ticket_season = -1, close = 1, weather_wdwhigh = 0.25, extra_magic_morning = 0, avg_spostmin = 0, avg_sactmin = 0)
2222
)
2323
2424
labels <- c(
25-
extra = "Extra Magic Morning",
26-
x = "Average posted wait ",
27-
y = "Average actual wait",
28-
Season = "Ticket Season",
29-
weather = "Historic high temperature",
25+
avg_sactmin = "Average actual wait",
26+
avg_spostmin = "Average posted wait ",
27+
extra_magic_morning = "Extra Magic Morning",
28+
wdw_ticket_season = "Ticket Season",
29+
weather_wdwhigh = "Historic high temperature",
3030
close = "Time park closed"
3131
)
3232
3333
wait_time_dag <- dagify(
34-
y ~ x + close + Season + weather + extra,
35-
x ~ weather + close + Season + extra,
34+
avg_sactmin ~ avg_spostmin + close + wdw_ticket_season + weather_wdwhigh + extra_magic_morning,
35+
avg_spostmin ~ weather_wdwhigh + close + wdw_ticket_season + extra_magic_morning,
3636
coords = coord_dag,
3737
labels = labels
3838
)

exercises/10-g-computation-exercises.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ predicted_no <- standardized_model %>%
5858
Finally, we'll get the mean differences between the values.
5959

6060
1. Bind `predicted_yes` and `predicted_no` using `bind_cols()`
61-
2. Summarize the predicted values to create three new variables: `mean_yes`, `mean_no`, and `difference`. The first two should be the means of `mean_yes` and `mean_no`. `difference` should be `mean_yes` minus `mean_no`.
61+
2. Summarize the predicted values to create three new variables: `mean_yes`, `mean_no`, and `difference`. The first two should be the means of `yes_extra_hours` and `no_extra_hours`. `difference` should be `mean_yes` minus `mean_no`.
6262

6363
```{r}
6464
_______ %>%

exercises/11-tipr.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ output: html_document
88
library(tipr)
99
```
1010

11-
We are interested in examining the relationship between whether there were "Extra Magic Hours" in the morning (the **expsoure**) and the average wait time for the Seven Dwarfs Mine Train the same day between 9am and 10am (the **outcome**.
11+
We are interested in examining the relationship between whether there were "Extra Magic Hours" in the morning (the **exposure**) and the average wait time for the Seven Dwarfs Mine Train the same day between 9am and 10am (the **outcome**).
1212

1313
## Your turn
1414

exercises/12-whole-game-2-exercises.Rmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ library(tidyverse)
88
library(broom)
99
library(rsample)
1010
library(ggdag)
11-
library(causaldata)
1211
library(tipr)
12+
library(tidysmd)
13+
library(ggecdf)
1314
```
1415

1516
## Whole Game 2: Malaria and Mosquito Nets

slides/pdf/00-intro.pdf

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)