Ok, well thanks for considering it. For now I will catch these errors
manually using:
randomEffects <- ranef(myModel);
  for(i in 1:length(randomEffects)) {
     if(any(duplicated(names(randomEffects[[i]])))) stop("There is a
duplicate random term in the model!");
}






2009/8/21 Douglas Bates <bates@stat.wisc.edu>

> On Wed, Aug 19, 2009 at 2:08 PM, Jeroen Ooms<jeroenooms@gmail.com> wrote:
> > I was running into a problem in parsing lme4 output, and it turned out
> > that it was my own mistake (of course :) However, I think it was a
> > mistate that could have been detected. I accidentally inserted a
> > duplicate random effect term into the model. For example a user could
> > try:
> >
> > (fm2 <- lmer(Reaction ~ Days + (1|Subject) + (Days|Subject), sleepstudy))
> >
> > This does not result in an error, lme4 will fit twice a random
> > intercept for the Subject group. I cannot think of a situation in
> > which this would be useful. Would it be an idea to throw an error in
> > this situation?
>
> > It can easily be detected by inspecting ranef(fm2),
> > and noticing the (intercept) term exists twice in the $Subject group.
>
> I can see the desirability of doing this but "easily" may be a bit of
> an overstatement here.  It would definitely add a lot of code to the
> functions that parse the random effects terms and generate the model
> matrices, etc.  I can add it to the list of feature requests but I
> doubt I will get to it soon.
>
> > _______________________________________________
> > R-sig-mixed-models@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
>

	[[alternative HTML version deleted]]


