I think that the formula language does allow expressions with '/' to
represent nested factors but I can't check right now as there is a fire in
the building where my office is located.  I prefer to simply write nested
factors as

factor1 + factor1:factor2

The fact that not all levels of factor 2 are present with each level of
factor1 is not a problem.  In building the model frame R drops "unused
levels" from any categorical expressions.


On Thu, Feb 28, 2013 at 8:27 AM, PALACIO BLASCO, SARA <s.palacio@ipe.csic.es
> wrote:

> Hi Hugo,
>
> Thanks for your e-mails. The structure of my data is not the one in your
> examples but:
>
> Factor 1: a,b,c
> factor 2: 1,2,3,4,5,6
>
> combination:
> a.1, a.2, b.3, b.4, c.5, c.6
>
> note factor 2 is nested within factor 1, so that not all levels of factor
> 2 are in every level of factor 1.
> Hence I do not have a full factorial or crossed design but a hierarchical
> one.
>
> My question: How can I include such a design in glmer?
>
> Cheers,
>
> Sara
>
> Hugo.Mildenberger@web.de escribió:
>
>
>  On Thu, 28 Feb 2013 14:27:36 +0100
>> "PALACIO BLASCO, SARA" <s.palacio@ipe.csic.es> wrote:
>>
>>  Maybe this is a trivial question but: how can I specify a nested
>>> structured of fixed factors in glmer?
>>>
>>> I still haven't found a way to solve the issues explained in my
>>> previous e-mail.
>>>
>>
>>
>> Sara,
>>
>> may be this fits your needs?
>>
>>  a<-factor(c('a','b','c','d'))
>>> b<-factor(c('1','2'))
>>> interaction(a,b)
>>>
>> [1] a.1 b.2 c.1 d.2
>> Levels: a.1 b.1 c.1 d.1 a.2 b.2 c.2 d.2
>>
>>
>> Best
>>
>
> ______________________________**_________________
> R-sig-mixed-models@r-project.**org <R-sig-mixed-models@r-project.org>mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-sig-mixed-models<https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models>
>

	[[alternative HTML version deleted]]

