[R-sig-ME] equality constraints in lmer/lme4
David Winsemius
dwinsemius at comcast.net
Mon Oct 21 21:46:19 CEST 2013
On Oct 21, 2013, at 10:44 AM, Greg Snow wrote:
> If X1 and X2 are both numeric variables then
>
> Outcome ~ I( X1 + X2 ) + (1|Subject)
Would that be:
Outcome ~ I( (X1 + X2)/2 ) + (1|Subject) # ?
--
David.
>
> 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
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
David Winsemius
Alameda, CA, USA
More information about the R-sig-mixed-models
mailing list