Influence.ME: don’t specify the intercept

[This article was first published on Curving Normality » R-Project, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Just recently, I was contacted by a researcher who wanted to use influence.ME to obtain model estimates from which iteratively some data was deleted. In his case, observations were nested within an area, but there were very unequal numbers of observations in each area.

Unfortunately, he wasn’t able to use the influence.ME package on his models. He kindly sent me his data, so I could figure out what went wrong, and it showed to be a little problem with influence.ME.

The problem was with how the model was specified: the intercept was explicated, next to several (fixed) variables. It turned out, that such a model specification is not compatible with the internal changes made to the mixed model. Therefore, I advise users of influence.ME not to explicitly specify the intercept in their lme4 regression models.

I reproduced the problem with the school23 data, which is available in influence.ME. Compare the two model specifications below: in the first the intercept is specified, in the second it isn’t. The outcomes of both lmer models are identical. However, the first returns a convergence error when used with the estex() function, while the second doesn’t.

The input:
mod <- lmer(math ~ 1 + structure + (1 | school.ID), data=school23) estex.mod <- estex(mod, "school.ID") mod <- lmer(math ~ structure + (1 | school.ID), data=school23) estex.mod <- estex(mod, "school.ID")

The output:
> mod <- lmer(math ~ 1 + structure + (1 | school.ID), data=school23) > estex.mod <- estex(mod, "school.ID") Error in mer_finalize(ans) : Downdated X'X is not positive definite, 3. > > mod <- lmer(math ~ structure + (1 | school.ID), data=school23) > estex.mod <- estex(mod, "school.ID")

I will surely investigate whether this can be resolved in a future update, but for now, simply leave the intercept out of your model specification: lmer will add it for you.


Influence.ME is an R package and provides tools for detecting influential data in mixed effects models. More information can be found here.

To leave a comment for the author, please follow the link and comment on their blog: Curving Normality » R-Project.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)