[R-sig-ME] equality constraints in lmer/lme4

Greg Snow 538280 at gmail.com
Mon Oct 21 19:44:05 CEST 2013


If X1 and X2 are both numeric variables then

Outcome ~ I( X1 + X2 ) + (1|Subject)

should give you what you need.

If both are categorical, then you need to create a set of variables
that represent the combination (make sure that you understand what
that combination represents).

On Sun, Oct 20, 2013 at 7:52 PM, Jean-Philippe Laurenceau
<jlaurenceau at psych.udel.edu> wrote:
> Dear R-sig-ME list--
>
> When specifying the following lmer model, I get intercept fixed and random effects, a fixed effect for the X1 predictor, and a fixed effect for the X2 predictor.
>
> fm <- lmer ( Outcome ~ X1 + X2 + ( 1 | Subject ), data = mydata)
>
> My question: is there a way to ask lme4 to re-estimate this model but set an equality constraint on the effects of X1 and X2, such that their estimates would be equal to each other?
>
> Thanks for your time, J-P
>
> Jean-Philippe Laurenceau, Ph.D.
> Department of Psychology
> University of Delaware
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



-- 
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com



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