[R-sig-ME] Random Nesting & interactions with MCMCglmm

Robin Jeffries rjeffries at ucla.edu
Thu May 12 19:35:08 CEST 2011


Hello,

I have an interesting setup to my data, and I'm looking for a little
assistance building the random effects syntax up correctly.

I have repeated measurements on Products, which are nested within
Versions. Versions can show up on multiple Stations.

Currently we are looking at a set up that has time nested within
Station and Version, and a random intercept for the Station x Version
interaction [created as a new variable on the data frame as
m$stat.vrs <- with(m,factor(Station:Version))   ]

The random~ portion of the MCMCglmm syntax is set up as:

us(1 + cos1.time + sin1.time):Station +
us(1 + cos1.time + sin1.time):Version +
idh(1):stat.vrs


Now we would like to incorporate a random intercept for the Products.
I recall reading that lmer recognizes the nesting structure from the
data, therefore does not need to have it explicitly defined in the
random statement. I'm assuming/hoping MCMCglmm does the same? If
that's the case, then I should only have to add the random intercept
for Product.

idh(1):Product +
us(1 + cos1.time + sin1.time):Station +
us(1 + cos1.time + sin1.time):Version +
idh(1):stat.vrs


Suggestions, clarifications, corrections or comments?


Robin Jeffries
MS, DrPH Candidate
Department of Biostatistics
UCLA
530-633-STAT(7828)




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