diff --git a/model-vis.Rmd b/model-vis.Rmd index 759a7e8..7e83d59 100644 --- a/model-vis.Rmd +++ b/model-vis.Rmd @@ -321,6 +321,8 @@ grid %>% ## Generating prediction grids +Now that you're learned the basics of generating prediction grids with `expand()`, we need to go into a few more details to cover other types of data you might come across. In each of the following sections, I'll explore in more detail one type of data along with the expansion and visualisation techniques you'll need to understand it. + ### Continuous variables When you have a continuous variable in the model, rather than using the unique values that you've seen, it's often more useful to generate an evenly spaced grid. One convenient way to do this is with `modelr::seq_range()` which takes a continuous variable, calculates its range, and then generates an evenly spaced points between the minimum and maximum. @@ -507,6 +509,8 @@ To help avoid this problem, it's good practice to include "nearby" observed data One way to do this is to use `condvis::visualweight()`. + + ### Exercises 1. In the use of `rlm` with `poly()`, the model didn't converge. Carefully @@ -545,3 +549,4 @@ delays %>% geom_smooth(se = F) ``` +