[R-sig-ME] New to LMER with 2 (easy?) questions...
HStevens at muohio.edu
Fri May 22 11:33:31 CEST 2009
Turns out that regardless how they are coded,
... (1|site) + (1|site:block) and
give the same model even though Ben is right that USUALLY SITE:BLOCK
would return a block 72 in each site. I checked str(model) and also
looked at the outputs and it turns out that lmer must quietly drop
used levels in random effects. HOWEVER, if you code BLOCKs
non-uniquely and then rwrite
... (1|SITE) + (1|BLOCK)
then you get crossed random effects.
On Thu, May 21, 2009 at 7:46 PM, Ben Bolker <bolker at ufl.edu> wrote:
> what I meant was, that if your blocks within sites were labeled
> uniquely as 1,...,n*N you should specify your (block "within" site)
> effect as (1|BLOCK), whereas if they were labeled 1,..,n,1,..,n,1,..,n
> ... you should specify it as (1|SITE:BLOCK) as Rolf did. If your
> blocks are labeled uniquely and you specify (1|SITE:BLOCK) then you
> end up with a lot of empty SITE:BLOCK combinations (because e.g.
> block 72 only occurs in site 14, but your model includes terms for
> block 72 in every site).
> I hope that's now clear and that I'm right, but please correct
> me if necessary!
> Hank Stevens wrote:
>> Did you mean it like this? I was under the impression it was the other
>> way around ... .
>> On Wed, 2009-05-20 at 23:12 -0400, Ben Bolker wrote:
>>> The only thing I would check for is that your BLOCK numbers
>>> are truly "nested" within SITE, i.e. that your blocks are numbered
>>> 1..n within each site, not 1:(n*N) (where n = # blocks per site,
>>> N = # of sites). What are n and N? A common cause of low estimated
>>> block variance is low replication ...
> Ben Bolker
> Associate professor, Biology Dep't, Univ. of Florida
> bolker at ufl.edu / www.zoology.ufl.edu/bolker
> GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc
E pluribus unum
More information about the R-sig-mixed-models