0
$\begingroup$

When conducting independence tests among the variables, some exhibit significant correlations, yet the VIF analysis indicates no multicollinearity. Is this common, and what implications does it hold regarding the inclusion of these variables in the model?

> coxph_model <- coxph(Surv(time, death_event) ~ . , data = dataset, x = TRUE)
> coxph_model
Call:
coxph(formula = Surv(time, death_event) ~ ., data = dataset, 
    x = TRUE)

                               coef  exp(coef)   se(coef)      z        p
age                       0.0415451  1.0424201  0.0086897  4.781 1.74e-06
anaemia1                  0.3701085  1.4478917  0.2162295  1.712  0.08696
creatinine_phosphokinase  0.0002041  1.0002041  0.0001010  2.020  0.04335
high_blood_pressure1      0.4727181  1.6043490  0.2154819  2.194  0.02825
serum_creatinine          0.2469241  1.2800819  0.0591050  4.178 2.94e-05
serum_sodium             -0.0680724  0.9341929  0.0208784 -3.260  0.00111

Likelihood ratio test=56.81  on 6 df, p=1.993e-10
n= 299, number of events= 96 
> vif(coxph_model)
                     age                  anaemia creatinine_phosphokinase      high_blood_pressure 
                1.007217                 1.107797                 1.067104                 1.054431 
        serum_creatinine             serum_sodium 
                1.059929                 1.056776 
Warning message:
In vif.default(coxph_model) : No intercept: vifs may not be sensible.
> # Define the variables for ANOVA
> continuous_variabless <- c("age", "creatinine_phosphokinase", "serum_creatinine", "serum_sodium")
> 
> # Loop through each continuous variable and perform ANOVA
> for (continuous_var in continuous_vars) {
+   for (categorical_var in categorical_vars) {
+     # Create a formula for ANOVA
+     formula <- as.formula(paste(continuous_var, "~", categorical_var))
+     
+     # Perform ANOVA
+     anova_result <- Anova(lm(formula, data = dataset))
+     
+     # Print ANOVA results
+     print(paste("ANOVA for", continuous_var, "and", categorical_var))
+     print(anova_result)
+   }
+ }
[1] "ANOVA for creatinine_phosphokinase and anaemia"
Anova Table (Type II tests)

Response: creatinine_phosphokinase
             Sum Sq  Df F value    Pr(>F)    
anaemia    10207179   1  11.213 0.0009168 ***
Residuals 270347475 297
```
$\endgroup$
6
  • 1
    $\begingroup$ Welcome to Cross Validated! Significant correlations with what amount of correlation? There can be a statistically significant correlation of $0.01$ that the VIF will (reasonably) think is not very important. $\endgroup$
    – Dave
    Commented May 7 at 2:06
  • $\begingroup$ One example was the ANOVA for creatinine phosphokinase and anemia. I got a p-value of 0.0009168 while the VIF for both variables is close to 1 $\endgroup$
    – Jake S
    Commented May 7 at 2:14
  • 1
    $\begingroup$ What is the correlation between those variables? $\endgroup$
    – Dave
    Commented May 7 at 2:24
  • $\begingroup$ I think you helped me figure out my problem. I was under the impression that ANOVA was the appropriate method for assessing the relationship between a dichotomous variable and a continuous variable, but that would be the Point Biserial Correlation correct? $\endgroup$
    – Jake S
    Commented May 7 at 3:54
  • 1
    $\begingroup$ Similarly to what Dave said, there is a difference between a significant correlation and a high correlation. We may have enough data to measure a correlation of 0.01 precisely enough to achieve statistical significance, but that is not a high correlation. Multicollinearity and VIF deal with the latter. $\endgroup$ Commented May 7 at 6:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.