[R] Formula with no intercept

Gang Chen gangchen6 at gmail.com
Mon Apr 14 23:38:14 CEST 2008


I'm trying to analyze a model with two variables, one is Group with
two levels (male and female), and other is Time with four levels (T1,
T2, T3 and T4). And for the convenience of post-hoc testing I wanted
to consider a model with no intercept for factor Time, so I tried
formula

Group*(Time-1)

However this seems to give me the following terms in the model

GroupMale, GroupFemale, TimeT2, TimeT3, TimeT4, GroupMale:TimeT2,
GroupMale:TimeT3, GroupMale:TimeT4, GroupFemale:TimeT2,
GroupFemale:TimeT3, GroupFemale:TimeT4

which is not exactly what I wanted. Also it seems (Group-1)*Time and
(Group-1)*(Time-1) also give me exactly the same set of terms as
Group*(Time-1).

So I have some conceptual trouble understanding this. And how could I
create a model with terms including all the levels of factor Time?

Thanks,
Gang



More information about the R-help mailing list