[R-lang] Simple effects in mixed logit models

Roger van-Gompel r.p.g.vangompel at dundee.ac.uk
Mon Dec 21 07:35:40 PST 2009


Hi Florian,
 
Thank you very much, your syntax is much simpler.  
 
The correlation between my two independent variables (language and
prime) is very low (after treatment coding):
 
> cor(L2prim$LangSwe, L2prim$PrimePP) 
[1] 0.00292528
 
Does this make sense?  Given that there is no correlation, I can
perhaps just report the analyses with treatment coding.  But you said
that it should be around .33, and somehow it’s much lower.  I guess I
still don’t understand what you meant.
 
I have done the model comparisons as you suggest.  When I use the
following model:
primanaleng=lmer(score ~LangEng+LangEng:PrimePP + (1|PID) + (1|ITEM),
data=L2prim, family = "binomial")
I appear to get both simple effects (simple effect of prime on English
LangEng0:PrimePP2, and simple effect on Swedish LangEng1:PrimePP2).  See
APPENDIX 1.
 
I then compare this model with:
primanalengnoint=lmer(score ~LangEng+PrimePP + (1|PID) + (1|ITEM),
data=L2prim, family = "binomial")
 
The comparison shows that the models don’t significantly differ
(APPENDIX 2).  So I think I should conclude that the model with the
simple effects is no better than without.
 
My question is: The model with the simple effects contains BOTH simple
effects (effect of prime on English, and effect on Swedish).  But I’d
like to know whether ONE of the simple effects is significant/improves
the model (e.g., effect of prime on English only).  How do I get this
with a model comparison?
 
I have to admit that I don’t quite understand why treatment coding
results in an analysis of simple effects.  I am sure you are right, but
it’s difficult for me to conceptualise.
 
Thanks for all your help.

 
Roger
 
 
APPENDIX 1
 
primanaleng=lmer(score ~LangEng+LangEng:PrimePP + (1|PID) + (1|ITEM),
data=L2prim, family = "binomial")
summary(primanalengnoint)
 
Generalized linear mixed model fit by the Laplace approximation 
Formula: score ~ LangEng + LangEng:PrimePP + (1 | PID) + (1 | ITEM) 
   Data: L2prim 
   AIC   BIC logLik deviance
 650.5 677.2 -319.2    638.5
Random effects:
 Groups Name        Variance Std.Dev.
 ITEM   (Intercept) 1.9705   1.4038  
 PID    (Intercept) 2.2791   1.5097  
Number of obs: 632, groups: ITEM, 40; PID, 32
 
Fixed effects:
                  Estimate Std. Error z value Pr(>|z|)   
(Intercept)        -0.5915     0.4153  -1.424  0.15437   
LangEng2           -0.1875     0.3022  -0.621  0.53486   
LangEng0:PrimePP2  -0.9496     0.3095  -3.068  0.00215 **
LangEng1:PrimePP2  -0.5252     0.3100  -1.694  0.09026 . 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 
Correlation of Fixed Effects:
            (Intr) LngEn2 LE0:PP
LangEng2    -0.363              
LngEn0:PPP2 -0.354  0.507       
LngEn1:PPP2 -0.008 -0.477  0.012
 
 
APPENDIX 2
 
Data: L2prim
Models:
primanalengnoint: score ~ LangEng + PrimePP + (1 | PID) + (1 | ITEM)
primanaleng: score ~ LangEng + LangEng:PrimePP + (1 | PID) + (1 |
ITEM)
                 Df    AIC    BIC  logLik  Chisq Chi Df Pr(>Chisq)
primanalengnoint  5 649.33 671.57 -319.66                         
primanaleng       6 650.46 677.15 -319.23 0.8714      1     0.3506
 
The University of Dundee is a registered Scottish charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.ucsd.edu/pipermail/r-lang/attachments/20091221/7c613017/attachment.htm>


More information about the R-lang mailing list