### Example 1
plot(-2:20, -2:20, type = "n", xlab="Coefficient of Variation",
ylab="Variance Inflation Factor")
abline(h=10, col="red", lwd=3, lty=2)
abline(h=0, col="black", lwd=1)
abline(v=0.1002506, col="red", lwd=3, lty=3)
#abline(v=0, col="red", lwd=1)
text(-1.25, 2, "A", pos=3, col="blue")
text(-1.25, 12, "B", pos=3, col="blue")
text(10, 12, "C", pos=3, col="blue")
text(10, 2, "D", pos=3, col="blue")
### Example 2
library(multiColl)
set.seed(2025)
obs = 100
cte = rep(1, obs)
x2 = rnorm(obs, 5, 0.01)
x3 = rnorm(obs, 5, 10)
x4 = x3 + rnorm(obs, 5, 1)
x5 = rnorm(obs, -1, 30)
x = cbind(cte, x2, x3, x4, x5)
cv_vif_plot(cv_vif(x))
cv_vif_plot(cv_vif(x), limit=0) # notes the effect of the 'limit' argument
### Example 3
### Graphical representation is not possible
head(SLM2, n=5)
x = SLM2[,2:3]
cv_vif_plot(cv_vif(x))
### Example 4
### Computationally singular system
head(soil, n=5)
x = soil[,-16]
cv_vif_plot(cv_vif(x))
Run the code above in your browser using DataLab