Sorry I made a mistake for the variables in the model: fm0.lmer <- lmer(Y ~ time+x1+x2 + (1|ID), data = dfr, family = binomial) fm.lmer <- stepAIC(fm0.lmer,scope = list(upper = ~ time*x1*x2, lower = ~1,trace = FALSE)) I obtain the following error: Error in terms.default(object) : no terms component I would be very grateful for any suggestion, Bernard, --------------------------------- [[alternative HTML version deleted]]