Minimum instead of maximum (#453)

This commit is contained in:
Julian During 2016-10-03 21:34:57 +02:00 committed by Hadley Wickham
parent 5ea91ca7ef
commit c989bae1a6
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ sim1_mod <- lm(y ~ x, data = sim1)
coef(sim1_mod)
```
These are exactly the same values we got with `optim()`! Behind the scenes `lm()` doesn't use `optim()` but instead takes advantage of the mathematical structure of linear models. Using some connections between geometry, calculus, and linear algebra, `lm()` actually finds the closest model by (effectively) inverting a matrix. This approach is both faster, and guarantees that there is a global maximum.
These are exactly the same values we got with `optim()`! Behind the scenes `lm()` doesn't use `optim()` but instead takes advantage of the mathematical structure of linear models. Using some connections between geometry, calculus, and linear algebra, `lm()` actually finds the closest model by (effectively) inverting a matrix. This approach is both faster, and guarantees that there is a global minimum.
### Exercises