The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

wilna (1) [Avatar] Offline
#1
Hi, I want to do a collinearity test, thus I want to test my predictor var (e.g species density) against 19 environmental variables and see which variables are collinear.
robert.kabacoff (170) [Avatar] Offline
#2
Re: Collinearity
You can evaluate multicolinearity with the vif() function in the car package.

Let's say that you are predicting Y from X1, X2, X3, X4, and X5.

fit <- lm(Y ~ X1+X2+X3+X4+X5, data=mydata)

library(car)
vif(fit)

If the sqare root of the VIF for any variable is greater than 2, you probably have a multicolinearity issue.

sqrt(vif(fit)) > 2

See page 198 of the book for more details.

Hope this helps.

Rob