[R-sig-ME] Interpreting three-way interaction with categorical predictors and binary outcome (GLMER)
Francesco Romano
francescobryanromano at gmail.com
Fri Feb 26 12:28:37 CET 2016
One more question regarding the interpretation of interactions.
I am having difficulty finding information on how to obtain a specific
contrast in a 3-way interaction of three categorical variables, syntax
(levels s and of), animacy (levels +AN -AN and -AN +AN), and group (int,
adv, ns), predicting a binary outcome (correct or inversion).
The anova yielded a significant effect for animacy and an interaction
between syntax:group. Everything else was non-significant. As I am
interested in comparing two cells at a time from the three-way table, I
kept all 3 predictors and their interactions within the model. The best fit
was given by inclusion of random intercepts for participants and items only.
Here is the output of the final model, dummy coded.
> summary(recallmodel4bisB3)
Cov prior : Part.name ~ wishart(df = 3.5, scale = Inf, posterior.scale =
cov, common.scale = TRUE)
: Item ~ wishart(df = 3.5, scale = Inf, posterior.scale = cov,
common.scale = TRUE)
Prior dev : 1.3565
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) ['bglmerMod']
Family: binomial ( logit )
Formula: Correct ~ Syntax * Animacy * Prof.group.2 + (1 | Part.name) +
(1 | Item)
Data: recall
Control: glmerControl(optimizer = "bobyqa")
AIC BIC logLik deviance df.resid
313.3 372.9 -142.6 285.3 509
Scaled residuals:
Min 1Q Median 3Q Max
-1.3517 -0.2926 -0.1802 -0.1137 9.3666
Random effects:
Groups Name Variance Std.Dev.
Part.name (Intercept) 0.8046 0.8970
Item (Intercept) 0.5031 0.7093
Number of obs: 523, groups: Part.name, 42; Item, 16
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.8960 0.6317 -1.418 0.156071
Syntaxs -2.0713 0.9447 -2.193 0.028342
*
Animacy+AN -AN -3.0539 1.2548 -2.434 0.014941
*
Prof.group.2int -2.5594 0.9473 -2.702 0.006898
**
Prof.group.2ns -1.8673 0.7634 -2.446 0.014442
*
Syntaxs:Animacy+AN -AN 1.8642 1.8202 1.024 0.305750
Syntaxs:Prof.group.2int 4.1704 1.1676 3.572 0.000355
***
Syntaxs:Prof.group.2ns 2.4244 1.0483 2.313 0.020736
*
Animacy+AN -AN:Prof.group.2int 3.0067 1.5528 1.936 0.052824
.
Animacy+AN -AN:Prof.group.2ns 1.3245 1.6071 0.824 0.409848
Syntaxs:Animacy+AN -AN:Prof.group.2int -2.2056 2.0550 -1.073 0.283162
Syntaxs:Animacy+AN -AN:Prof.group.2ns -2.3249 2.3108 -1.006 0.314360
--
Now, I am interested in two comparisons:
1. pairwise comparisons between (+AN -AN 's and -AN +AN) as well as (+AN
-AN of and -AN +AN s) for each of the three groups, int, adv, and ns.
2. difference between two groups at a time for the same contrasts.
In the first case, I don't need to compare across groups but within them
and I don't want to keep animacy or syntax constant in these comparisons.
In the second, I am interested in significant differences of the
differences in 1.
The best information I could find on the matter is here but is not specific
to logistic regression. Therefore, I am not 100% sure it applies.
http://talklab.psy.gla.ac.uk/tvw/catpred/
According to the source, in the case of the model above, a dummy coded
syntax:animacy:group interaction will yield a coefficient representing the
following differences:
(s +AN -AN adv)-(of +AN -AN adv) - (s -AN +AN adv) - (of -AN +AN adv)
Any suggestions on how to obtain the necessary contrasts would be greatly
appreciated. I am currently stuck.
Frank Romano Ph.D.
*LinkedIn*
https://it.linkedin.com/pub/francesco-bryan-romano/33/1/162
*Academia.edu*
https://sheffield.academia.edu/FrancescoRomano
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list