#rstats question: Why aren't those models the same
lm(y ~ 1+x)
lm(y ~ 1*x)
lm(y ~ 1:x)
?
* is a shorthand for : and + (i.e. both main and interaction terms).
-
-
Thanks
@KirkegaardEmil. In this example the problem is why lm() with 1:x and 1*x returns just the intercept.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.