Learn R Programming

MLRMPA (version 1.0)

vif: Variance Inflation Factor

Description

VIF is to analysis the multicollinearity of the descriptors in feature set.

Usage

vif(y, x, lm)

Arguments

y
the activity values
x
the descriptors dataset
lm
a linear model between x and y

Value

VIF.value
a dataframe contains VIF values for each feature

Details

The VIF of features below 5.0 is acceptable.

References

M. Goodarzi, S. Deshpande, V. Murugesan, S. B. Katti, Y. S. Prabhakar, QSAR Comb. Sci. 2009, 28, 1487-1499.

See Also

lm lmcv

Examples

Run this code
u <- c(5,10,15,20,30,40,60,80,100)
lot1 <- c(118,58,42,35,27,25,23,20,18)
lot2 <- c(69,35,26,21,18,16,13,12,6)
data <- data.frame(cbind(u,lot1,lot2))
lm <- lm(u~.,data=data)
y<-lm$model[,1]
x<-lm$model[,-1]
VIF<-vif(y,x,lm)
print(VIF)

Run the code above in your browser using DataLab