From Torsten.Hothorn at rzmail.uni-erlangen.de  Wed May  7 17:57:58 2003
From: Torsten.Hothorn at rzmail.uni-erlangen.de (Torsten Hothorn)
Date: Wed May  7 16:58:08 2003
Subject: [Rd] contrasts
In-Reply-To: <200305060843.h468hb2b021295@pubhealth.ku.dk>
References: <200305060843.h468hb2b021295@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.51.0305071649330.28422@artemis.imbe.med.uni-erlangen.de>


Hi,

I spent some time now trying to understand how functions for the
computation of contrasts

contr.foo(n, contrasts=TRUE)

passed to model.matrix are called. My problem is
that for the computation of some contrasts one needs `n' to be the number
of observations at each level of the factor of interest and for others the
number of levels is sufficient. For example, `contr.treatment' has code
for handling vector valued `n' (and ?contrasts states that `n' may be a vector).

Where can I find the condition under which `n = nlevel(x)' or `n =
table(x)' or how can I define what I would like to see?

Best,

Torsten


[Rd] contrasts
Torsten Hothorn