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?

______________________________________________ mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

Reply via email to