Skip to content
Prev 697 / 20628 Next

Regarding mcmcsamp in the most recent alpha release

The first thing to notice is that the estimated correlation of the
random effects is -1.000 which, as Simon indicates, calls into
question the model that you are fitting.  Also, does Trial vary within
Patient?  You can only fit a random Trial:Patient interaction if Trial
varies within Patient.

You only have 10 different Patients so it is unlikely that you will be
able to estimate many variance parameters for the random effects. It
may not be obvious but the model that you have fit is somewhat
complicated.  I would start with simpler models.  First fit a model
with the random effect term (1|Patient).  The next model to attempt to
fit is (1|Patient/Trial), which is what I think that Simon meant to
write.  This provides a random effect for Patient and a random effect
for the Patient:Trial interaction.  It is easier to fit this model
than to fit the other version of a "random interaction" which is
(1+Trial|Patient).

Compare the AIC for those models with the AIC for the model that you
fit.  (To be more confident of the results you should fit all three
models with method = "ML")

That error message can occur even when the model is well-defined.  It
can be caused by the MCMC sampler getting stuck in regions with low,
but very flat, posterior probability. I have seen it on samples like

mcmcsamp(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy), 10000)

but it is a low probability event for such models and I haven't found
a seed where I can reproduce the problem repeatably.
On Sat, Mar 29, 2008 at 8:21 AM, Simon Blomberg <s.blomberg1 at uq.edu.au> wrote: