[R-sig-ME] mcmcsamp error message...

Petar Milin pmilin at ff.uns.ac.rs
Fri Aug 14 20:15:53 CEST 2009



Douglas Bates wrote:
> On Wed, Aug 12, 2009 at 12:27 PM, Petar Milin<pmilin at ff.uns.ac.rs> wrote:
>> Hello!
>> I am puzzled with an error message that mcmcsamp for models with random
>> correlation parameters is not implemented yet. However, this would be the
>> case only with the model:
>> lmer(rt ~ FACTOR1 + COVARIATE1 + COVARIATE2 + COVARIATE3 +
>> (1+FACTOR1|subject) + (1|item) + (0+COVARIATE3|item), data=dat)
>> And same with:
>> lmer(rt ~ FACTOR1 + COVARIATE1 + COVARIATE2 + COVARIATE3 +
>> (1|subject) + (0+FACTOR1|subject) + (1|item) + (0+COVARIATE3|item),
>> data=dat)
> 
>> If I run just:
>> lmer(rt ~ FACTOR1 + COVARIATE1 + COVARIATE2 + COVARIATE3 +
>> (1|subject) + (1|item) + (0+COVARIATE3|item), data=dat)
>> mcmcsamp ends fine.
> 
>> I guess that the problem is in the fact that subjects were assigned
>> (randomly) to only one level of the FACTOR1. Am I right?
> 
> I'm not sure what you mean by "the problem".  If FACTOR1 is a
> non-trivial factor (i.e. it has more than one level) then the
> random-effects terms (1 + FACTOR1|subject) and (0+FACTOR1|subject)
> generate correlated random effects and currently mcmcsamp does not
> handle models with correlated random effects.
> 
> If, as you say, each subject is assigned to only one level of FACTOR1
> then neither of the terms above make sense.  You can't expect to
> estimate an interaction of FACTOR1 and subject when FACTOR1:subject is
> equivalent to subject.

Sorry, I meant SOME subjects, but not all of them. And FACTOR1 has two 
levels, exactly. Hence, my question could be rephrased: if only 
subsample repeated levels of FACTOR1, could that be treated as a case of 
correlated random effects, in principle? Thus, in future, with the 
implementation solved, that could be handled as a regular/proper case?

>> I think, previously, mcmcsamp handled this kind of nesting, but I might be
>> wrong.

It is weird structure, anyway. (I am just trying to help a colleague.)

Thanks for the answer.
Best,
PM




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