R, Cramer V and alternatives

Viewed 827

I'm trying to understand Cramer V and if it fits my data (after CHI squared returns a significant association between variables) and also looking for alternatives (I've heard a Spearman correlation might be better in some cases..?)

1st example: I have a yes/no response from users and there are 2 conditions (2x2 matrix)

library(rcompanion)
x <- matrix(c(144,120,66,90), nrow = 2)
colnames(x) <- c("No", "Yes")
rownames(x) <- c("Cond1", "Cond2")
cramerV(x, conf = 95)

2nd example: similar but the options for the answers are 3 (so a 3x2 matrix).

library(rcompanion)
x <- matrix(c(57,27,87,93,66,90), nrow = 2)
colnames(x) <- c("NA", "No", "Yes")
rownames(x) <- c("Cond1", "Cond2")
cramerV(x, conf = 95)

is this the correct implementation of the Cramer V? I'm struggling to understand what the p-value is actually telling me. how does a single p-value represent how strong is the association between all those values? are there better alternatives? thanks

1 Answers

General information:

  1. Cramer's V gives us information about the statistical relationship between two or more nominally scaled variables (e.g. eye color: green, blue, brown)
  2. When determining Cramer's V, the chi-square value (X²) is standardized. This enables us to compare relationships between variables using Cramer’s V. (Similar to Pearson contingency coefficient that is also a standardized measure of correlation based on chi-square (X²).

Your example 1: Here we want to assess the association of condition(cond1/cond2) and answer (yes/no)

We need the chi-square value to calculate Cramer’s V, therefore we first determine chi-square value and then convert into a value for Cramer’s V.

We get Cramer V 0.1183

Interpretation: Cramer's V is always between 0 and 1. 0 means no association 1 means complete/very strong association

Rule of thumb: Cramer's V

  • 0 - 0.2 -> weak association
  • 0.2 - 0.6 -> middle association
  • 0.6 - 1 -> strong association

In this example with a Cramer V of 0.12 there is a weak association between condition and answer.

Note: As we use nominal scaled variables we can assess the strength of the association but not the direction!

Same interpretation for example 2. It does not matter how many nominal scaled variables you assess. The association here is 0.19 -> weak.

In your examples you can use Carmer's V to assess the strength of association.

Related