vif function for lmer object

2,318 views
Skip to first unread message

Jane

unread,
Nov 26, 2013, 7:56:08 PM11/26/13
to davi...@googlegroups.com
Dear all,

I'm trying to look at multi-collinearity for mixed linear models. I used lmer for the model. The vif function from "car" package deal with only an lm or glm object. I am looking for an equivalent function of VIF which works with lmer objects. 

I searched several R-help lists and stackoverflow, but haven't found anything that could solve the problem.

Does anyone have any ideas?

I would really appreciate!

Jane

Dave Harris

unread,
Nov 26, 2013, 8:01:56 PM11/26/13
to davi...@googlegroups.com
I haven't checked if the code is correct, but someone posted this online. The first function claims to estimate VIF for lmer objects. You may need to make some tweaks if you're using a newer version of lme4. https://github.com/aufrank/R-hacks/blob/master/mer-utils.R

You can also diagnose some issues manually by looking at the covariance among some of your estimates using `vcov` and `VarCorr`.

Hope this helps.

Dave


--
Check out our R resources at http://www.noamross.net/davis-r-users-group.html
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
Visit this group at http://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/groups/opt_out.

Anna Steel

unread,
Nov 27, 2013, 12:28:26 AM11/27/13
to davi...@googlegroups.com
There was a package called AED written by Zuur et al and shared as part of their 2009 book "Mixed effects models and extensions in ecology with R" (blue-purple one with penguins on the cover, also available from our library as an e-book). The package included a function called 'corvif' that helps identify variables with high inflation factors for GLMMs. The authors no longer update AED for new versions of R, but you can download the code at their website  http://www.highstat.com/book2.htm.

I seem to recall I had to make a few modifications to make it run properly, but it worked like a charm after the tweeks. Plus the book gives you guidance on how to properly use the function.

Hope that helps!
Anna

--
Anna Steel, PhD candidate
Biotelemetry Laboratory
Ecology Graduate Group
University of California, Davis
 
Reply all
Reply to author
Forward
0 new messages