Skip to content
Prev 32011 / 398506 Next

Multiple comparison and lme (again, sorry)

`asympt = TRUE' must be there for a logistic regression model and
it works with mvtnorm_0.5-12 (on CRAN).
you need to specify the `how.many' argument:

 ## need to specify how.many
R> contrasts(treat,how.many = 3) <- zapsmall(
                                    mginv(contrMat(table(treat),
                                                   type="Tukey")))

R> attr(treat, "contrasts")
         T1-P       T2-P      T2-T1
P  -0.3333333 -0.3333333  0.0000000
T1  0.3333333  0.0000000 -0.3333333
T2  0.0000000  0.3333333  0.3333333

 ## however, this will not work!
R> example.lme<-lme(response~treat, random=~1|subj)
Error in MEEM(object, conLin, control$niterEM) :
        Singularity in backsolve at level 0, block 1

The problem is a basic one: AFAIK, none of the `model.fit' functions deals
with singular design matrices without additional work (have a look at
TukeyHSD for what that means) as induced for example by Tukey contrasts
(I would be happy to be wrong here).

And that is the reason why we can't use `lm.fit' for parameter estimation
for arbitrary contrasts within `multcomp'. The `multcomp' package, as a
workaround, estimates the parameters of a linear model (!) via the
Moore-Penrose inverse.

For all other models, we currently only offer a low-level interface
(`csim{int,test}') which assumes that the
parameters / contrasts and their covariance matrix are there. As long as
those values can be computed via `coef' and `vcov', everything is fine
(and we are currently working on methods for `lm' and `glm' to the
`simint' and `simtest' generics). If not, as it is the case here, there
is no general solution (and I can't answer this particular question).


Best,

Torsten
Message-ID: <Pine.LNX.4.51.0305141255320.26374@artemis.imbe.med.uni-erlangen.de>
In-Reply-To: <200305141004.h4EA1L6w027408@hypatia.math.ethz.ch>