I have a medical dataset with features age, bmi, sex, gender, # of children, region, charges, smoker. Here smoker, gender, sex and region are categorical variables and others are numerical features. How do I check for collinearity between these in my dataset?
You could just regress against any given variable.
You could also generate a matrix of correlation metrics. Depending on the variable type, you would need a different metric. Here are some common ones:
- Numeric-Numeric: Pearson's Correlation Coefficient
- For rank correlation, you can use Spearman's Rank Correlation Coefficient
- Nominal-Nominal: Cramér's V
- For two categories, this is equivalent to the Pearson Phi Coefficient
- Numeric-Nominal: t-test for 2 variables or ANOVA for more than 2
- You can also just regress against them. For example, logistic regression between age and sex could suffice.