###Multicollinearity

#Examine IV intercorrelations

library(psych)
psych::corr.test(Wk11b2_nomiss[,-3])
## Call:psych::corr.test(x = Wk11b2_nomiss[, -3])
## Correlation matrix
## gender depress ds_cor vo_cor menthlth anxiety
## gender 1.00 0.07 0.04 -0.03 0.08 0.02
## depress 0.07 1.00 -0.23 -0.07 0.41 0.20
## ds_cor 0.04 -0.23 1.00 0.40 -0.17 -0.25
## vo_cor -0.03 -0.07 0.40 1.00 -0.11 -0.23
## menthlth 0.08 0.41 -0.17 -0.11 1.00 0.42
## anxiety 0.02 0.20 -0.25 -0.23 0.42 1.00
## Sample Size
## [1] 146
## Probability values (Entries above the diagonal are adjusted for multiple tests.)
## gender depress ds_cor vo_cor menthlth anxiety
## gender 0.00 1.00 1.00 1.00 1.00 1.00
## depress 0.42 0.00 0.06 1.00 0.00 0.14
## ds_cor 0.64 0.01 0.00 0.00 0.35 0.03
## vo_cor 0.71 0.43 0.00 0.00 1.00 0.06
## menthlth 0.35 0.00 0.04 0.17 0.00 0.00
## anxiety 0.77 0.02 0.00 0.01 0.00 0.00
##
## To see confidence intervals of the correlations, print with the short=FALSE option
### Collinearity diagnostics

library(olsrr)
ols_coll_diag(steptotal2)
## Tolerance and Variance Inflation Factor
## ---------------------------------------
## Variables Tolerance VIF
## 1 gender 0.9862575 1.013934
## 2 depress 0.8013541 1.247888
## 3 ds_cor 0.7756350 1.289266
## 4 vo_cor 0.8146909 1.227459
## 5 menthlth 0.7103546 1.407748
## 6 anxiety 0.7741651 1.291714
##
##
## Eigenvalue and Condition Index
## ------------------------------
## Eigenvalue Condition Index intercept gender depress ds_cor
## 1 5.42865959 1.000000 9.402909e-04 0.0013139820 0.008331192 0.0030535142
## 2 0.73723530 2.713584 9.172339e-04 0.0012112805 0.034506074 0.0181470315
## 3 0.41240067 3.628162 4.761897e-04 0.0005161931 0.599737419 0.0097207865
## 4 0.18935346 5.354386 2.395542e-07 0.0001017232 0.279920150 0.0004334554
## 5 0.13674410 6.300747 2.108339e-02 0.0620275003 0.001185995 0.0338808661
## 6 0.07657498 8.419821 3.058660e-02 0.1237466978 0.071999443 0.8843474661
## 7 0.01903190 16.889048 9.459961e-01 0.8110826232 0.004319728 0.0504168802
## vo_cor menthlth anxiety
## 1 0.004806461 0.006217103 0.007947241
## 2 0.036792566 0.023117842 0.360721105
## 3 0.004683540 0.009850008 0.318728975
## 4 0.057520387 0.845660142 0.262221489
## 5 0.772817051 0.102325880 0.016262665
## 6 0.094788882 0.009185121 0.021954990
## 7 0.028591114 0.003643903 0.012163535