I have two categorical variables X
and Y
that each are multi-label e.g. each x
and y
is a set of labels say $x \subseteq lbls_1$ and $y \subseteq lbls_2$.
I want to get a measure of the correlation between the two variables.
I know that Cramér's V can be used to compute the correlation between two categorical variables that take a single value out of a set, e.g. $x \in lbls_1$ and $y \in lbls_2$. Can this be generalized for multiple labels?
I can compute the correlation for each pair of labels separately i.e. for $l \in lbls_1, m \in lbls_2$ create two binary variables $x_l = 1_{l \in x}$ and $y_m = 1_{m \in y}$ and then compute the correlation between $x_l$ and $y_m$. Is this a good way of doing this or is there a better way?
Edit To give a concrete example - say I have a list of cancer trials each with various properties. Property A is the type of treatment in the trial say (a) surgery (b) medication taken by swallowing (c) medication injected into the skin etc. Each trial can include multiple treatment types. Property B is the stages of cancer. It can be directed at stage 1 cancer or stage 2,3,4. It can also be directed at multiple stages. I have hundreds of such properties and I would like to get the associations between them. This is to help in a machine learning task of reading all these properties from free text.