So I found out that to remove the (Intercept) term from lm's model one can add -1 to the predictors. I.e. do lm(resp ~ x1 + x2 - 1)

Another way is to add 0, e.g. lm(resp ~ 0 + x1 + x2).

Adding (or setting the (Intercept) term) zero seems more logical than subtracting one, but why is there the method of subtracting one? Why does subtracting one mean that the (Intercept) term disappears?

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to