Skip to content

Commit 1d2ffeb

Browse files
committed
fix 08 exercise
1 parent 8b6d8f8 commit 1d2ffeb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

exercises/08-pscores-diagnostics-exercises.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ Below is the propensity score model and weights you created in the previous exer
1919

2020
```{r}
2121
seven_dwarfs <- seven_dwarfs_train_2018 |>
22-
filter(hour == 9)
22+
filter(wait_hour == 9)
2323
2424
propensity_model <- glm(
25-
extra_magic_morning ~ wdw_ticket_season + close + weather_wdwhigh,
25+
park_extra_magic_morning ~ day_ticket_season + park_close + day_temperature_high,
2626
data = seven_dwarfs,
2727
family = binomial()
2828
)
2929
3030
seven_dwarfs_ps <- propensity_model |>
3131
augment(type.predict = "response", data = seven_dwarfs) |>
32-
mutate(w_ate = wt_ate(.fitted, extra_magic_morning))
32+
mutate(w_ate = wt_ate(.fitted, park_extra_magic_morning))
3333
```
3434

3535
## Your Turn 1
@@ -41,7 +41,7 @@ Calculate the standardized mean differences with and without weights
4141
```{r}
4242
#| eval: false
4343
smds <- seven_dwarfs_ps |>
44-
mutate(close = as.numeric(close)) |>
44+
mutate(park_close = as.numeric(park_close)) |>
4545
tidy_smd(
4646
.vars = ____,
4747
.group = ____,
@@ -62,7 +62,7 @@ ggplot(
6262

6363
## Your Turn 2
6464

65-
Create an unweighted ECDF for `weather_wdwhigh` by whether or not the day had Extra Magic Hours.
65+
Create an unweighted ECDF for `day_temperature_high` by whether or not the day had Extra Magic Hours.
6666

6767
```{r}
6868
#| eval: false
@@ -77,7 +77,7 @@ ggplot(seven_dwarfs_ps, aes(x = ____, group = ____, color = factor(____))) +
7777
ylab("Proportion <= x")
7878
```
7979

80-
Create an weighted ECDF for `weather_wdwhigh` by whether or not the day had Extra Magic Hours.
80+
Create an weighted ECDF for `day_temperature_high` by whether or not the day had Extra Magic Hours.
8181

8282
```{r}
8383
#| eval: false

0 commit comments

Comments
 (0)