1

Similar to a previous poster (Extracting slopes for cases from a mixed effects model (lme4)), I am interested in extracting slopes for individual cases (individuals) using a mixed-effects model (lme4 package). I am running a generalized linear mixed-effects model using a binomial distribution, predicting a binary outcome based on a single continuous predictor. I have used the function coef to extract individual differences using the method recommended in the previous post, i.e. coef(model)$Subject and am noticing that the estimates I get do not always seem to align with my data itself. For example, for one subject their mean level of the predictor variable for the case where DV = 1 is -0.227 and when DV = 0, the mean level of the predictor is equal to -0.04. I would expect, then, that this subject would have a negative coefficient since the odds of the outcome being 1 should be lower when the level of the predictor is more positive. However, this subject actually has a positive coefficient (2.20). A number of subjects in my dataset seem to show this inconsistency.

I am wondering if anyone can provide an explanation or advice as to why the individual subject coefficients from a binomial GLMM might not always be consistent with the mean value of the predictor variable for a given subject for each possible outcome (0 or 1). I am wondering if I have misspecified my model or whether I am just not conceptually understanding the interpretation of the coefficient, which I assumed reflects the change to the log-odds of outcome = 1 associated with a 1-unit increase in the predictor.

Here is my model specification: mod1 <- glmer(Y ~ X.scaled + (X.scaled | ID), data=x,family=binomial,na.action="na.omit",glmerControl(optimizer="optimx",optCtrl=list(method=c("nlminb","bobyqa"))))

I would appreciate any advice on this matter!

0 Answers0