| evalMulticol | R Documentation |
Evaluating multicollinearity using variance inflation factor
evalMulticol(mod, threshold = 2)
mod |
a lm or a glm object |
calculation based on vif (package car) - threshold of 2 proposed in R in action R.I. Kabacoff (p.200)
dataframe
JuG
Fox, J. and Monette, G. (1992) Generalized collinearity diagnostics. JASA, 87, 178–183.
Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.
data(mtcars)
mod <- lm(mpg~ .,data=mtcars)
evalMulticol(mod)
nIndep <- 6
mu<-runif(nIndep+1,2,7)
sigma<-rep(2, nIndep+1)
sample.size<-100
dataInd<-as.data.frame(mapply(function(x,y){rnorm(x,y,n=sample.size)},x=mu,y=sigma))
colnames(dataInd) <- c('y', paste("X",1:nIndep,sep=''))
mod2 <- lm(y~ ., data= dataInd)
evalMulticol(mod2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.