[R] Package for multiple membership model?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Jan 3 16:46:52 CET 2006

"Brian Perron" <beperron at wustl.edu> writes:

> Hello all:  
> I am interested in computing what the multilevel modeling literature
> calls a multiple membership model. More specifically, I am working
> with a data set involving clients and providers. The clients are the
> lower-level units who are nested within providers (higher-level).
> However, this is not nesting in the usual sense, as clients can
> belong to multple providers, which I understand makes this a
> "multiple membership model." Right now, I would like to keep this
> simple, using only a continuous dependent variable, but would like
> to also extend this to a repeated measures design. This doesn't seem
> to be possible with the lme package. Is there something else I could
> consider? Thanks, Brian

You could take a look at the lmer() function in the lme4/Matrix
packages - see the Rnews 2005/1 article. One potential problem is that
for repeated measurements, it is not (currently?) as strong on
correlation structure as lme().

You can actually deal with crossed random effects in lme() too, it
just gets a little more complicated, involving things like

as1 <- lme(logDens~sample*dilut, data=Assay,

as2 <- lme(logDens~sample*dilut, data=Assay,

as3 <- lme(logDens~sample*dilut, data=Assay,

which all fit the same model (but get the DF wrong in three different

This is slightly different from your example because the crossed
factors are nested in "Block", but you can always fake a nesting using

one <- rep(1, length(logDens)) #or whatever 
lme(...., random=list(one=~....))

   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907

More information about the R-help mailing list