model-basics.Rmd: Typos corrected (#558)

This commit is contained in:
Saghir 2017-05-03 13:45:11 +01:00 committed by Hadley Wickham
parent ff7fa15f35
commit 30f223579e
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ mod1 <- lm(y ~ x1 + x2, data = sim3)
mod2 <- lm(y ~ x1 * x2, data = sim3) mod2 <- lm(y ~ x1 * x2, data = sim3)
``` ```
When you add variables with `+`, the model will estimate each effect independent of all the others. It's possible to fit the so-called interaction by using `*`. For example, `y ~ x1 * x2` is translated to `y = a_0 + a_1 * a1 + a_2 * a2 + a_12 * a1 * a2`. Note that whenever you use `*`, both the interaction and the individual components are included in the model. When you add variables with `+`, the model will estimate each effect independent of all the others. It's possible to fit the so-called interaction by using `*`. For example, `y ~ x1 * x2` is translated to `y = a_0 + a_1 * x1 + a_2 * x2 + a_12 * x1 * x2`. Note that whenever you use `*`, both the interaction and the individual components are included in the model.
To visualise these models we need two new tricks: To visualise these models we need two new tricks: