0

I am fitting a general linear model using glmer from lme4 on data with a binary outcome (0 and 1). This is choice trial data with approximately 140 choices per participant. The model I run is as follows:

library(lme4)
m1 <- glmer(stay ~ prevpoints * same * prevrewdiff * Age_c + (1| participant), data = my_Data, family = binomial)

Stay and same are binomial, where stay takes values 0 or 1 and same takes values -1 and 1. Prevpoints and prevrewdiff are continuous between 0 and 1. Age_c is a centered age variable that is continuous between -2.07 and +1.88.

Below is the summary from the model:

>summary(m1)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: stay ~ prevpoints * same * prevrewdiff * Age_c + (1 | subnr)
   Data: Stay_kids_P6_age

     AIC      BIC   logLik deviance df.resid 
 12919.4  13041.0  -6442.7  12885.4     9439 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.2668 -1.0186  0.6574  0.9415  1.6634 

Random effects:
 Groups Name        Variance Std.Dev.
 subnr  (Intercept) 0.1138   0.3373  
Number of obs: 9456, groups:  subnr, 85

Fixed effects:
                                   Estimate Std. Error z value Pr(>|z|)    
(Intercept)                       -0.111493   0.081965  -1.360  0.17375    
prevpoints                         0.464269   0.130130   3.568  0.00036 ***
same                               0.074867   0.072461   1.033  0.30151    
prevrewdiff                        0.073866   0.157075   0.470  0.63817    
Age_c                              0.008594   0.050718   0.169  0.86545    
prevpoints:same                   -0.066014   0.128513  -0.514  0.60748    
prevpoints:prevrewdiff            -0.134402   0.259995  -0.517  0.60520    
same:prevrewdiff                  -0.039067   0.156090  -0.250  0.80237    
prevpoints:Age_c                   0.046862   0.081110   0.578  0.56343    
same:Age_c                        -0.005506   0.044802  -0.123  0.90219    
prevrewdiff:Age_c                 -0.231429   0.098529  -2.349  0.01883 *  
prevpoints:same:prevrewdiff        0.120424   0.258361   0.466  0.64114    
prevpoints:same:Age_c             -0.011628   0.080023  -0.145  0.88447    
prevpoints:prevrewdiff:Age_c       0.249957   0.163381   1.530  0.12604    
same:prevrewdiff:Age_c            -0.041121   0.097907  -0.420  0.67449    
prevpoints:same:prevrewdiff:Age_c  0.166707   0.162442   1.026  0.30477    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

So it seems that prevpoints and prevrewdiff*age are the only significant effects.

While, when I run anova(m1) I see:

anova(m1)
Analysis of Variance Table
                                  npar  Sum Sq Mean Sq F value
prevpoints                           1 30.7102 30.7102 30.7102
same                                 1  5.4894  5.4894  5.4894
prevrewdiff                          1  0.0171  0.0171  0.0171
Age_c                                1  0.0092  0.0092  0.0092
prevpoints:same                      1  0.0222  0.0222  0.0222
prevpoints:prevrewdiff               1  0.3641  0.3641  0.3641
same:prevrewdiff                     1  0.0280  0.0280  0.0280
prevpoints:Age_c                     1 10.3298 10.3298 10.3298
same:Age_c                           1  0.0784  0.0784  0.0784
prevrewdiff:Age_c                    1  3.8111  3.8111  3.8111
prevpoints:same:prevrewdiff          1  0.2806  0.2806  0.2806
prevpoints:same:Age_c                1  1.6501  1.6501  1.6501
prevpoints:prevrewdiff:Age_c         1  2.3021  2.3021  2.3021
same:prevrewdiff:Age_c               1  0.6115  0.6115  0.6115
prevpoints:same:prevrewdiff:Age_c    1  1.0601  1.0601  1.0601

Where there is a large F value for prevpoints * Age_c.

In sum I have two questions:

  1. Previously, I don't remember models run with the lme4 package to give p-values, and I've read discussions online about how the p-values should ideally not be used. However, now they seem to be given by default. Has this changed recently and should p-values now be more trusted as output?
  2. I don't understand why the F-value is so large when I run the anova, but that this then does not translate to a significant estimate for the prevpoints*Age_c estimate. Would anybody know what's going on here?
  • 1
    I think you will find the information you need in the linked thread. Please read it. If it isn't what you want / you still have a question afterwards, come back here & edit your question to state what you learned & what you still need to know. Then we can provide the information you need without just duplicating material elsewhere that already didn't help you. – gung - Reinstate Monica Jun 07 '21 at 17:08

0 Answers0