[R-sig-ME] constraining interactions to include a specified variable

Ben Bolker bbolker at gmail.com
Mon May 14 15:01:36 CEST 2012


Chris Habeck <habeck.cw at ...> writes:

> I am trying to constrain interactions within a model to always include a
> particular variable of interest and to limited interaction complexity to
> three-way. The later is straight forward, for example:
> 
> lme(response ~ (a + b + c + d + e + f)^3)
> 
> However, my goal is to constrain all 3-way interactions to always include
> variable "a". Is there efficient code for this problem?

   Would something like response ~ a*(b+c+d+e+f)^2  work for you?

  Ben Bolker



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