I am new to this. My study has three conditions (between subjects - low coordination, high coordination, high coordination with ostensive cues) and three repetitions of a game (within subjects - Game 1, Game 2, Game 3). The outcome variable is binary (i.e., participant's left the game, they did not leave the game).
I've carried out 3 GLMERs using the following code:
S1_glmer <- glmer(left_game ~ condition + game + condition:game + (1 | participant),
data = S1_data,
family = binomial(link="logit"),control = glmerControl(optimizer = "bobyqa"),
nAGQ = 1)
See all three outputs below
The condition estimates on the bottom two glmers add up, i.e, glmer 2, intercept for high coordination with ostensive cues is 9.1848 - minus -0.9203 for high coordination = 8.2645 which is the intercept for high coordination in glmer 3. But the condition estimates for glmer 1 do not add up to those for glmer 2 or glmer 3. According to the p-values in glmer 1, there is no significant condition difference between low coordination and the other conditions. But in glmer 2 and 3, there are significant condition differences. Can anyone explain what's happening here?
I changed the reference level to find out whether there was a significant difference between the 2nd and 3rd conditions: high coordination and high coordination with ostensive cues.
Now I feel like I can't trust the original results.
Glmer 1) Output when reference level is low coordination, Game 1:
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) [glmerMod]
Family: binomial ( logit )
Formula: left ~ cond + game + cond:game + (1 | participant)
Data: S1_data
Control: glmerControl(optimizer = "bobyqa")
AIC BIC logLik deviance df.resid
176.7 209.8 -78.3 156.7 192
Scaled residuals:
Min 1Q Median 3Q Max
-1.7321 -0.0004 0.0001 0.0101 4.9872
Random effects:
Groups Name Variance Std.Dev.
participant (Intercept) 723.7 26.9
Number of obs: 202, groups: participant, 72
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.2474 1.9877 4.149 3.34e-05 ***
conditionHigh coordination 0.8632 2.2934 0.376 0.70664
conditionHigh coordination with ostensive cues 1.8618 2.7681 0.673 0.50121
gameGame 2 10.6282 2.3868 4.453 8.47e-06 ***
gameGame 3 14.3519 5.8753 2.443 0.01458 *
conditionHigh coordination:gameGame2 1.0957 3.4069 0.322 0.74774
conditionHigh coordination with ostensive cues:gameGame 2 -8.5113 2.8270 -3.011 0.00261 **
conditionHigh coordination:gameGame 3 -2.8912 5.9182 -0.489 0.62518
conditionHigh coordination with ostensive cues:gameGame 3 -10.1465 6.0885 -1.666 0.09561 .
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) cndHgc cHcwoc gamGm2 gamGm3 cHc:G2 ccwoc2 cHc:G3
cndHghcrdnt -0.621
cndHghcrwoc -0.494 0.421
gameGame 2 0.252 0.035 0.050
gameGame 3 0.304 0.002 0.024 0.583
cndHcrdn:G2 0.070 -0.100 -0.043 -0.446 -0.142
cndHcwoc:G2 -0.188 -0.032 -0.086 -0.819 -0.466 0.377
cndHcrdn:G3 -0.159 -0.046 -0.028 -0.431 -0.837 0.280 0.348
cndHcwoc:G3 -0.276 -0.004 -0.040 -0.545 -0.946 0.137 0.533 0.796
Glmer 2) Output when reference level is high coordination with ostensive cues, Game 1:
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) [glmerMod]
Family: binomial ( logit )
Formula: left ~ cond + game + cond:game + (1 | participant)
Data: S1_data
Control: glmerControl(optimizer = "bobyqa")
AIC BIC logLik deviance df.resid
180.1 213.1 -80.0 160.1 192
Scaled residuals:
Min 1Q Median 3Q Max
-1.6992 -0.0009 0.0001 0.0153 4.6034
Random effects:
Groups Name Variance Std.Dev.
participant (Intercept) 425.6 20.63
Number of obs: 202, groups: participant, 72
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 9.1848 2.1924 4.189 2.80e-05 ***
condHigh coordination -0.9203 2.3928 -0.385 0.700510
condLow coordination -16.0097 3.6128 -4.431 9.36e-06 ***
gameGame 2 1.9997 1.5684 1.275 0.202292
gameGame 3 4.0240 1.9118 2.105 0.035304 *
condHigh coordination:gameGame 2 8.4752 3.1819 2.664 0.007732 **
condLow coordination:gameGame 2 12.9762 3.5373 3.668 0.000244 ***
condHigh coordination:gameGame 3 6.1720 3.4743 1.776 0.075656 .
condLow coordination:gameGame 3 13.8269 5.5511 2.491 0.012745 *
Correlation of Fixed Effects:
(Intr) cHcwoc cndLwc gamGm2 gamGm3 ccwoc2 cLc:G2 ccwoc3
cndHghcrwoc -0.483
cndLwcrdntn -0.738 0.251
gameGame 2 0.231 0.060 -0.301
gameGame 3 0.221 0.057 -0.287 0.498
cndHcwoc:G2 -0.178 -0.100 0.237 -0.870 -0.422
cndLcrdn:G2 0.158 -0.037 -0.436 -0.499 -0.113 0.456
cndHcwoc:G3 -0.151 -0.084 0.203 -0.397 -0.835 0.475 0.111
cndLcrdn:G3 0.249 -0.020 -0.457 0.042 -0.260 -0.020 0.485 0.252
Glmer 3) Output when reference level is high coordination, Game 1:
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) [glmerMod]
Family: binomial ( logit )
Formula: left ~ cond + game + cond:game + (1 | participant)
Data: S1_data
Control: glmerControl(optimizer = "bobyqa")
AIC BIC logLik deviance df.resid
180.1 213.1 -80.0 160.1 192
Scaled residuals:
Min 1Q Median 3Q Max
-1.6992 -0.0009 0.0001 0.0153 4.6034
Random effects:
Groups Name Variance Std.Dev.
participant (Intercept) 425.6 20.63
Number of obs: 202, groups: participant, 72
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.2645 1.7992 4.594 4.36e-06 ***
condHigh coordination with ostensive cues 0.9203 2.3926 0.385 0.700490
condLow coordination -15.0893 3.3701 -4.477 7.55e-06 ***
gameGame 2 10.1959 2.8428 3.685 0.000229 ***
gameGame 3 10.4749 3.0173 3.379 0.000727 ***
condHigh coordination with ostensive cues:gameGame 2 4.5010 3.1753 -2.669 0.007605 **
condLow coordination:gameGame 2 -8.4752 3.5680 1.262 0.207126
condHigh coordination with ostensive cues:gameGame 3 -6.1720 3.4707 -1.778 0.075355 .
condLow coordination:gameGame 3 7.6549 5.2865 1.448 0.147617
Correlation of Fixed Effects:
(Intr) cHcwoc cndLwc gamGm2 gamGm3 ccwoc2 cLc:G2 ccwoc3
cndHghcrwoc -0.483
cndLwcrdntn -0.738 0.251
gameGame 2 0.231 0.060 -0.301
gameGame 3 0.221 0.057 -0.287 0.498
cndHcwoc:G2 -0.178 -0.100 0.237 -0.870 -0.422
cndLcrdn:G2 0.158 -0.037 -0.436 -0.499 -0.113 0.456
cndHcwoc:G3 -0.151 -0.084 0.203 -0.397 -0.835 0.475 0.111
cndLcrdn:G3 0.249 -0.020 -0.457 0.042 -0.260 -0.020 0.485 0.252
```
pairs(emmeans(fit3, ~ condition | game, type = "response"))
. This calculates the odds ratios at each level of game. From the phrase "task fatigue over time" I suspect that the third game is the last game played. So it may be most relevant to focus on the final set of odds ratios. Then you'd usepairs(emmeans(fit3, ~ condition | game, at = list(game = "3"), type = "response"))
. $\endgroup$