[R-sig-ME] Under what conditions does it make sense to fit random intercepts for an interaction, but not the main effects?

D. Rizopoulos d@r|zopou|o@ @end|ng |rom er@@mu@mc@n|
Thu Jul 11 07:07:47 CEST 2019

I think this has to do with what is the definition of your grouping variable. In your example with factor A and factor B, say that A is the subject and B the eye of the subject. The specification

(1 | A) + (1 | A:B)

says that measurements within the subject are correlated because they share the same random effect (1 | A), and measurements within the same eye of the same subject are even more correlated because they share the extra random effect (1 | A:B).

But lets say that you wanted to assume that only measurements within the same eye are correlated, but measurements on the same subject but from different eyes would be uncorrelated. Then I think you would only need the (1 | A:B) term.


- - - - - -
Dimitris Rizopoulos
Professor of Biostatistics
Erasmus University Medical Center
The Netherlands

From: Robert Long <longrob604 using gmail.com<mailto:longrob604 using gmail.com>>
Date: Wednesday, 10 Jul 2019, 9:31 PM
To: R-mixed models mailing list <r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>>
Subject: [R-sig-ME] Under what conditions does it make sense to fit random intercepts for an interaction, but not the main effects?

I am actually re-posting an old question from Cross Validated that I am
interested in, but has not received any answers:

I am aware that when specifying the random structure for one factor (B)
nested within another factor (A), we can use:

(1|A) + (1|A:B)

I am trying to understand section 2.3.1 in the online book chapter 2 by
Douglas Bates: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flme4.r-forge.r-project.org%2Fbook%2FCh2.pdf&data=02%7C01%7Cd.rizopoulos%40erasmusmc.nl%7Ca4269991564645e1ec7208d7056d40af%7C526638ba6af34b0fa532a1a511f4ac80%7C0%7C1%7C636983839105430563&sdata=CVZnCWSuNSTLvRan0xvraRmXLX6qSL%2FPELUWPVg0GRc%3D&reserved=0
which is using the InstEval dataset, which is an evaluation of lecturers by
students at the Swiss Federal Institute for Technology�Zurich (ETH�Zurich):

> str(InstEval)
'data.frame': 73421 obs. of 7 variables:
$ s : Factor w/ 2972 levels "1","2","3","4",..: 1 1 1 1 2 2 3 3 3 ..
$ d : Factor w/ 1128 levels "1","6","7","8",..: 525 560 832 1068 6..
$ studage: Ord.factor w/ 4 levels "2"<"4"<"6"<"8": 1 1 1 1 1 1 1 1 1 1 ..
$ lectage: Ord.factor w/ 6 levels "1"<"2"<"3"<"4"<..: 2 1 2 2 1 1 1 1 1..
$ service: Factor w/ 2 levels "0","1": 1 2 1 2 1 1 2 1 1 1 ...
$ dept : Factor w/ 14 levels "15","5","10",..: 14 5 14 12 2 2 13 3 3 ..
$ y : int 5 2 5 3 2 4 4 5 5 4 ...
Factor s designates the student and d the instructor. The dept factor is
the department for the course and service indicates whether the course was
a service course taught to students from other departments. Thus these data
are partially crossed.

The model fitted in the text is:

fm4 <- lmer(y ~ 1 + (1|s) + (1|d) + (1|dept:service), InstEval, REML=0)

My question is: why is the interaction fitted as a random intercept without
(or instead of) the main effect also being fitted in this case, and in
general: when would we fit random effects for an interaction but not for
either of the main effects ? These are not nested factors, so I guess that
has something to do with it, but why is dept not specified as a random
intercept instead ? The text goes on to say

We could pursue other mixed-effects models here, such as using the dept
factor and not the dept:service interaction to define random effects, but
we will revisit these data in the next chapter and follow up on some of
these variations there.

However, as far as I know, there is no Chapter 3 !!!!

        [[alternative HTML version deleted]]

R-sig-mixed-models using r-project.org mailing list

	[[alternative HTML version deleted]]

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