Skip to content
Prev 43184 / 398513 Next

Re-Post: Combining Factors in model.matrix

On Sat, 24 Jan 2004 paul.boutros at utoronto.ca wrote:

            
You will need to explain to us why the object you list is `the design 
matrix': have *you* a reference for that?  R is doing the conventional 
thing, and I at least have no idea where your example comes from.

You seem to have coded variables t1 and t2 the opposite ways (the
reference level is 2 for t1 and 1 for t2), and your model has the fit at
levels t1=2,t1=1 constrained to pass through the origin.  I don't think R
has a simple syntax for that (although you can fake anything), and I find
it hard to believe that is actually what you want.
Chapter 6 of MASS has the most complete exposition (by Bill Venables) that 
I know of, and the White Book (Chambers & Hastie, 1992) goes well beyind 
the R documentation (which uses it as the reference).