Minor tweaks

This commit is contained in:
hadley 2016-05-26 09:43:22 -05:00
parent d101d7e62a
commit a9eb6566db
1 changed files with 5 additions and 0 deletions

View File

@ -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()`.
<https://cran.rstudio.com/web/packages/condvis/>
### Exercises
1. In the use of `rlm` with `poly()`, the model didn't converge. Carefully
@ -545,3 +549,4 @@ delays %>%
geom_smooth(se = F)
```