Home » lmer » Recent Articles:

Influence.ME: don’t specify the intercept

June 18, 2009 Influence.ME No Comments

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.

Introducing Influence.ME: Tools for detecting influential data in mixed models

April 29, 2009 Influence.ME No Comments
Introducing Influence.ME: Tools for detecting influential data in mixed models

I’m highly excited to announce that influence.ME is now available. Influence.ME is a new software package for R, providing statistical tools for detecting influential data in mixed models. It has been developed by Rense Nieuwenhuis, Ben Pelzer, and Manfred te Grotenhuis. The basic rationale behind identifying influential data is that when iteratively single units are omitted from the data, models based on these data should not produce substantially different estimates. To standardize the assessment of how influential data is, several measures of influence are commonly used, such as DFBETAS and Cook’s Distance.

… Continue Reading

useR! 2009 acceptance: presenting influence.ME

Logo influence.ME

The organizing committee of the useR! 2009 conference just informed me, that my submission for presenting my extension package influence.ME, has been accepted! Influence.ME is a new R package that I’m currently developing, with the indispensable help of Ben Pelzer and Manfred te Grotenhuis. Although I did not yet introduce influence.ME on this blog, rest assured that I will do so within just a few weeks. Now is time for celebration!
… Continue Reading

R-Sessions 31: Combining lmer output in a single table (UPDATED)

February 5, 2009 R-Project, R-Sessions 1 Comment


There are various ways of getting your output from R to your publication draft. Most of them are highly efficient, but unfortunately I couldn’t find a function that combines the output from several (lmer) models and presents it in a single table. lmer is the mixed effects model function from the lme4 package. So, I wrote a simple function that does exactly that.
… Continue Reading

R-Sessions 16: Multilevel Model Specification (lme4)

August 27, 2008 R-Project, R-Sessions No Comments


Multilevel models, or mixed effects models, can easily be estimated in R. Several packages are available. Here, the lmer() function from the lme4-package is described. The specification of several types of models will be shown, using a fictive example. A detailed description of the specification rules is given. Output of the specified models is given, but not described or interpreted.
Please note that this description is very closely related to the description of the specification of the lme() function of the nlme-package. The results are similar and here exactly the same possibilities are offered.
… Continue Reading

Welcome to Curving Normality

Curving Normality is an academic blog maintained by Rense Nieuwenhuis. He uses this blog to write about the social sciences in general, fascinating journal papers, useful data, interesting books, statistics using R. In addition, his personal academic activities are shared here, as well.