[R-sig-ME] factor elimination for lmer models
bates at stat.wisc.edu
Tue Mar 20 17:19:10 CET 2007
On 3/20/07, Austin Frank <austin.frank at gmail.com> wrote:
> I'll preface this by saying that this question may reveal some
> fundamental misunderstanding on my part. Thanks in advance for
> clarification if there are things that I'm obviously not getting.
> That said...
> The Design library provides a function fastbw that does fast backwards
> elimination of factors in a model. This is a very useful function,
> and I'm wondering what it would take to make it work with lmer or
> lmer2-fitted models.
> The function works on any model, m, where Varcov(m) is defined.
> Varcov is a function from Hmisc that extracts the variance-covariance
> matrix from certain kinds of fitted models. Currently it works for
> lm, glm, and multinom fitted models.
> So, five questions:
> 1) Is there already a way to do automated factor elimination on an
> lmer-fitted model?
Not that I know of.
> 2) Would it be possible to write a function Varcov.lmer to extract the
> variance-covariance matrix from an lmer-fitted model?
I didn't go through the documentation for Varcov, which is part of a
large file related to transcan, in detail but it appears on simple
examples that Varcov produces the same result as vcov and there is a
vcov method for the lmer class.
> 3) Would it be possible to port the fastbw function from the Design
> library so that it would work on lmer models (without relying on
> Varcov from Hmisc)?
It depends on what fastbw does. That name seems to imply that it will
create the results from refitting a model omitting certain terms in
the model specification and it will do so without needing to refit. I
don't think that would be possible for lmer models because when you
omit a term in the fixed-effects specification you will change the
estimates of the variance components. The results from the vcov
method are conditional on the values of the variance components.
> 4) If both 2 and 3 are possible, which is the path of least
> 5) If neither 2 nor 3 is possible (the algorithm used in Design's
> fastbw is unsuitable for lmer models), is there an approach to
> factor elimination that is appropriate for these models?
> If you folks get me started in the right direction, I'd be happy to
> submit a patch to lme4 or languageR.
More information about the R-sig-mixed-models