Skip to content
Prev 303040 / 398506 Next

Simple question about formulae in R!?

Sheesh! Yes.
... and in the case where B is a factor with k levels and x is
continuous, the model ~B:x yields k+1 parameters, which in default
contrasts would be a constant term, x, and k-1 interactions between x
and the corresponding k-1 "contrasts"(which they aren't really) for B.
~B*x would add the k-1 B main effect contrasts.

But to be fair, this can get complicated and model.matrix() and
friends is a very sophisticated piece of software (certainly way
beyond me). This whole discussion, of course, raises the (OT!) issue
of the widespread misuse of linear modeling by those with insufficient
background in linear algebra to understand the points S. Ellison
discusses. I won't go there other than to say I have no clue what to
do about it (and I encounter it in my own practice!).

-- Bert
On Fri, Aug 10, 2012 at 9:16 AM, S Ellison <S.Ellison at lgcgroup.com> wrote: