Skip to content
Prev 43213 / 398513 Next

Re-Post: Combining Factors in model.matrix

Right, that's how I understood it.
Yes, I mis-spoke.  I thought the columns represent individual factors, with
a
0 = level 1 for this factor
1 = level 2 for this factor
Hence the encoding I gave above would indicate that factor 1 is at level 1
for
the first pair of experiments, but at level 0 for the second pair.
Ahh, I had misunderstood the -1 as explicitly specifying an intercept.
So now:
(Intercept) t12 t22
1           1   0   0
2           1   0   1
3           1   1   0
4           1   1   1

Which is what I had been looking for!

Thank you for your patient help,
Paul