Hi!
I'm trying to count occurrences of a pair of values for two categorical variables element1 and element2 regardless the order.
I'd like to count the number of occurrences of (A;B) and (B;A), that is 2*(A;B) + 1*(B;A) = 3.
Similarly, for the pair (B;C), I would like the sum of (B;C) pairs and (C;B) pairs, that is 1+2 = 3.
SSC's groups counts (A;B) and (B;A) separately.
Thanks a lot in advance!
Thierry Geiger
I'm trying to count occurrences of a pair of values for two categorical variables element1 and element2 regardless the order.
element1 | element2 |
A | B |
B | A |
C | A |
A | C |
A | C |
A | B |
B | C |
C | B |
C | B |
Similarly, for the pair (B;C), I would like the sum of (B;C) pairs and (C;B) pairs, that is 1+2 = 3.
SSC's groups counts (A;B) and (B;A) separately.
Thanks a lot in advance!
Thierry Geiger
Comment