[R-sig-ME] Strange mcmcsamp issue

Jarrett Byrnes jebyrnes at ucdavis.edu
Fri Feb 22 01:43:50 CET 2008

I'm attempting to pull out the simple effects from a mixed model with  
two crossed treatments.  The model structure is such that

a.lmer<-lmer(response ~ trta*trtb+(1|pot))

In the experiment, I have an array of pots.  Each pot has a type of  
treatment A applied to it.  Within the pot, there are two types of  
treatment B that are applied, one on either side.  I am using a mixed  
model as I wanted to account for non-independence within a pot.

There is an interaction between a and b, but I want to look at the 95%  
credible intervals of the simple effects to see which treatment  
combinations overlap 0, are greater than 0, or are less than 0.  While  
mcmcsamp works great on this object I am unclear on how to then  
combine parameter values and error to get this interval.

So, I attempted a model such as the following

a.lmer<-lmer(response ~ trta*trtb+(1|pot))

Which yielded the following error:
  Leading minor of order 15 in downdated X'X is not positive definite

Thinking that this might be an intercept issue, I fit the following  

a.lmer<-lmer(response ~ trta*trtb+0+(1|pot))

This fit just fine.  summary() showed me a table of parameter values  
that seemed about what I would expect, although the correlation of  
fixed effects matrix was populated largely by 0's However,

a.mcmcsamp<-(a.lmer, 1000)
yielded the following error

Error: Omega[[1]] is not positive definite
Error in t(.Call(mer_MCMCsamp, object, saveb, n, trans, verbose,  
deviance)) :
   error in evaluating the argument 'x' in selecting a method for  
function 't'

However, if I try for roughly 30 or fewer replicates, everything works  
just fine.

Even more strange, when I next looked at a.lmer using summary() all of  
the error values for parameters had become 0, and the matrix for  
correlation of fixed effects was filled with NaNs.  This strikes me as  
rather odd.

1) Perhaps this has been fixed in later releases - I'm working off of  
lme4 version 0.99875-9 on R 2.6.2.  Should I try these instead?

2) Or, am I going about this attempt to get simple effect estimates  
all wrong?  Is it possible to use the output from the first model with  
mcmcsamp to get estimates of the simple effects?

Thanks for any advice you might have!

More information about the R-sig-mixed-models mailing list