[R-sig-ME] A question about crossed random effect model in lmer

Douglas Bates bates at stat.wisc.edu
Fri Jul 9 18:37:54 CEST 2010


On Fri, Jul 9, 2010 at 11:28 AM, Special Mary <specialmary2009 at yahoo.ca> wrote:
> Hi, I am new to the R programme. I wonder if you can help me with Variance Component analysis. In my data, I have 4 variables: managers’ performance (outcome), managers, exercise (interpersonal, decision-making...), and assessment methods (only two: Method A versus Method B). Each manager completes ALL exercises, and each time the exercise is assessed in both Method A and Method B. I want to examine how much of the variance of the outcome can be contributed to managers, exercise, method, and all their interactions (all 2-way and 3-way).

It would help to know the number of levels in each of these factors.
You mention that there are only two assessment methods, in which case
I would not recommend using random effects for assessment.  Estimating
a variance component from only two levels is difficult.  It is best to
use fixed-effects parameters in such cases.

> I do not believe that managers, exercise, and assessment methods are CROSSED with each other.

I'm not sure why you say that.  Perhaps you didn't intend the "not"
near the beginning of the sentence. You emphasize that each manager
completes all exercises and each exercise is assessed with both
methods.  To me that means that the factors are crossed.

> Assume that managers, exercise, and assessment methods are all regarded as random factors, I do not know how to specify this model in R. Can someone please help me with this? I know how to set it up when the random effects do NOT interact with each other:

> Model1 <- lmer (performance ~ (1|managers) + (1|exercise) + (1|method), data = mtmm)

> However, when it involves interactions among the random effects, then I have no idea how to do it. In addition, I want to assume no correlation/covariance among the three random effects (i.e., variance component structure).

The general way to incorporate an interaction of two random-effects
terms is like

lmer(performance ~ (1|managers) + (1|exercise) + (1|managers:exercise), ...)

but you will need to be careful of the number of levels for each of
those terms.  It is likely that some of the variance component
estimates will be zero because the available data cannot support a
model of too great a complexity.

> Only performance is a continuous variable.
>
> Thanks so much!
> Chester
> PhD Candidate
> Dept of Psychology
> Univ of Western Ontario
>
>
>        [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>




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