Ray Jones
24/05/2015
Did you feel good about your Regression Models project ?
Remember, all you had to do was model mpg in mtcars
But… you felt you could have done better ?
You saw other results and thought “If only I'd tried …?”
You asked yourself “Where did it all go wrong ?”
Where it went wrong was - you didn't have this shiny app !
But now you do !
data(mtcars)
par(mar=c(4,4,2,2))
plot(1/mtcars$hp, mtcars$mpg)
abline(lm(mpg ~ I(1/hp), data=mtcars))
… and possible combinations with up to 9 other variables !
… if you feel up to a challenge:
For a 1 predictor model try: mpg ~ I( disp-1.0 )
For a 2 predictor model try: mpg ~ I( wt-0.5 ) + I( hp-0.5 )
Then see if you can beat them …
…. good luck !