Skip to content

Commit

Permalink
update to match dev gratia
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Nov 23, 2023
1 parent 9b41d5f commit ac92585
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions day-1/belgium-solutions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ new_df <- tibble(year = seq(1981, 1993, length = 100)) %>%
pred_gam <- fitted_values(m_gam2, data = new_df, scale = "response")
plt <- pred_gam %>%
ggplot(aes(x = year, y = fitted)) +
geom_ribbon(aes(ymin = lower, ymax = upper), alpha = 0.2) +
ggplot(aes(x = year, y = .fitted)) +
geom_ribbon(aes(ymin = .lower_ci, ymax = .upper_ci), alpha = 0.2) +
geom_line() +
geom_point(data = belgium, aes(x = year, y = cases))
plt
# compare with the GLM fits
plt + geom_line(data = pdat2, aes(colour = model))
plt + geom_line(data = pdat2, aes(colour = model, y = fitted))
```

0 comments on commit ac92585

Please sign in to comment.