# R - checking colinearity of 3 categorial and 1 continuous variables

I have the following variables which are expected to influence the dependent variable kg waste:

turnover (continuous), restaurant type (either D or I), operation (either P or N), owner (either M or F).

To analyse the effect of these variables on kg waste I would like to investigate first the collinearity between these variables prior to running a model. However, this is where I run into problems.. pairwise scatterplots do not tell me a lot and when I run this code:

cor.test(df$$restauranttype,df$$turnover,method="spearman")

I get this error message:

'x' must be a numeric vector

How do I explore collinearity of continuous and categorical independent variables?

What model would you suggest using?

• I guess I need to perform chi-square test to detect multicolinearity?
– Afke
May 10 '19 at 11:35
• Please take a look at this answer (stats.stackexchange.com/a/285725/82122). Unfortunately, collinearity for categorical variables is not well defined (So variance inflation factor (VIF) in a regression equation would not make much sens). A chi-square test would make more sense in this case. May 10 '19 at 21:58