# dependent variable > y <- as.factor(indvar_FODs$categorical_FOD_FODs) > > # independent variables > x1 <- indvar_FODs$Condition_FODs > x2 <- indvar_FODs$Language_used_FODs > > # model > mod_FODs <- glmer(y ~ x1*x2 + (1|subject_FODs), family=binomial, data=indvar_FODs) boundary (singular) fit: see help('isSingular') > > # print model > mod_FODs Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod'] Family: binomial ( logit ) Formula: y ~ x1 * x2 + (1 | subject_FODs) Data: indvar_FODs AIC BIC logLik deviance df.resid 4634.735 4763.004 -2296.368 4592.735 3300 Random effects: Groups Name Std.Dev. subject_FODs (Intercept) 0 Number of obs: 3321, groups: subject_FODs, 44 Fixed Effects: (Intercept) x1B x1C x1D x2German x2Hungarian x2Italian x2Turkish 0.14379 -0.34739 -0.30841 -0.24915 -0.24915 -0.14379 0.19268 -0.08483 x1B:x2German x1C:x2German x1D:x2German x1B:x2Hungarian x1C:x2Hungarian x1D:x2Hungarian x1B:x2Italian x1C:x2Italian 0.13429 0.41377 0.57765 0.66584 0.41377 0.14379 -0.34576 0.07730 x1D:x2Italian x1B:x2Turkish x1C:x2Turkish x1D:x2Turkish -0.19268 0.24936 0.19876 0.17047 optimizer (Nelder_Mead) convergence code: 0 (OK) ; 0 optimizer warnings; 1 lme4 warnings because there is singularity, write another code including the optimizer to do this analysis
library(lme4) library(optimx) # dependent variable y <- as.factor(indvar_FODs$categorical_FOD_FODs) # independent variables x1 <- indvar_FODs$Condition_FODs x2 <- indvar_FODs$Language_used_FODs # model mod_FODs <- glmer(y ~ x1*x2 + (1|subject_FODs), family=binomial, data=indvar_FODs) # print model mod_FODs