Re: [R] Package for multiple membership model?

From: Peter Dalgaard <>
Date: Wed 04 Jan 2006 - 02:46:52 EST

"Brian Perron" <> 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 ways...)

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
~~~~~~~~~~ - (                  FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Jan 04 03:23:31 2006

This archive was generated by hypermail 2.1.8 : Wed 04 Jan 2006 - 04:51:28 EST