# NOT RUN {
## Hald Cement data
data(Hald)
model <- lm(y~X1+X2+X3+X4, data = as.data.frame(Hald))
## all Individual measures
id<-imcdiag(model); id$idiags[,1]
# VIF measure with custom VIF threshold
imcdiag(model, method = "VIF", vif = 5)
# IND1 measure with custom IND1 threshold and correlation matrix
imcdiag(model, method="IND1", ind1=0.01, corr=TRUE)
# CVIF measure with custom CVIF threshold and correlation matrix
imcdiag(model, method = "CVIF", cvif = 5, corr = TRUE)
# Collinearity Diagnostic measures in matrix of 0 or 1
imcdiag(model, all = TRUE)
imcdiag(model, method = "VIF", all = TRUE)
## only VIF values without collinearity detection indication
imcdiag(model, method = "VIF")[[1]][,1]
plot(imcdiag(model, method = "VIF")[[1]][,1]) # vif plot
# }
Run the code above in your browser using DataLab