If I have a sample of rats in which I want to measure protein levels in several different brain regions, the rats are of two genotypes and both sexes, and I want to take into account that the brain regions come from specific animals, which is the appropriate syntax for modeling this with lme4?
marker ~ genotype * sex * brain.region + (1|animal/brain.region)
marker ~ genotype * sex * brain.region + (animal|brain.region)
marker ~ genotype * sex * brain.region + (1|animal). You can then add random slopes (correlated or uncorrelated) as appropriate for your data, e.g.,marker ~ genotype * sex * brain.region + (brain.region|animal). See Table 2 of the package vignette for an explanation of the syntax. See also http://stats.stackexchange.com/questions/13166/rs-lmer-cheat-sheet – Roland Aug 04 '15 at 16:03