RCA

Author

Giuseppe A. Veltri

RCA (Relational Class Analysis) and CCA (Correlational Class Analysis)

RCA and CCA are graph partitioning methods based on the assumption that individuals are related one another to the extent to which they construct meaning in a similar way. Both methods are specifically designed to address the challenge of finding relational structures within and between observations. As Goldberg (2011) states, existing methods are mainly concerned with addressing one dimension, either between variables (such as factor analysis) or between individuals (like cluster analysis). “But to account for shared understandings requires that we simultaneously examine the relationships between variables and individuals” (Goldberg, 2011:1404).

As an example, we can think about the American political panorama.

A democratic and a republican will probably have very different, maybe oppositional ideas on specific politics and policies. Nevertheless, they might agree on the fact that the debate is structured in a similar way, a continuum with two extremes, the democratic and republican parties. RCA and CCA do not seek for similar opinions, but similar ways to construct the understanding of a certain issue.

For this reasons, groups individuated by RCA and CCA may contain individuals with oppositional attitudes, but that nevertheless recognize a similar relation of closeness and oppositions between the items that constitute this realm of social action.

Relationality

RCA computes relationality for each pair of observations in the dataset, resulting in a complete, undirected graph. Statistically insignificant edges are removed and significant ones are transformed in their absolute value. Using a partition/ maximization algorithm RCA divides the graph in groups of schematically similar respondents.

To beNer understand the idea of relaMonality, that stands at the core of RCA method, I report Goldberg’s example, where he uses RCA to analyze Americans’ musical taste preferences using data from the Cultural Module of 1993 General Social Survey (1993). Here respondents were asked to rate their preferences for 17 musical genres on a five-point ordinal scale. Golberg illustrates how shared understandings can be imagined by using a diagram, that is reported in figure 1 as recreated by Boutyline (2017).

  • It is possible to see that respondent A likes Pop, Blues, Rock; strongly likes Classical music and Opera and is indifferent to Bluegrass and Country. The pattern of responses is A=[4, 4, 4, 5, 5, 3, 3]. Respondent B, on the other hand, dislikes pop, blues, and rock, is indifferent toward classical and opera, and strongly dislikes bluegrass and country: The pattern of responses is B= [2, 2, 2, 3, 3, 1, 1].

  • The pattern showed by respondent B is equal to the one showed by respondent A, excepts for an overall downwards shift. Respondent C, on the other hand, shows a pattern that is almost a mirror of A and B ones. B. Nevertheless, since RCA doesn’t look for the same musical tastes but for similar way of understanding, in this case, the musical panorama to be structured in a certain way, it is possible to show that respondents C follows the same logic of respondents A and B.

  • Respondent C pattern of response is C= [3, 3, 3, 1, 1, 5, 5]. Boutyline (2017) finds tat respondents C pattern follow the same relative pattern of A and B, “except all tastes are vertically shifted, inverted, and amplified: C = 2 ∗(−1) ∗ A + 11, or equivalently, C = 2 ∗ (−1) ∗ B + 7.” (Boutyline, 2017:356). Respondent D, finally, present a different pattern and no series of shifts, multiplication or inversions can transform it in the one exhibited by A, B or C.

  • It is possible to conclude that that respondents A, B, and C follow the same logic of musical tastes, whereas respondent D does not. This can be captured by a single algebraic statement: two respondents follow exactly the same schema if and only if there exists a linear transformation that can produce one vector of responses from the other one or, more formally, if there exist such constants b and k ≠ 0 that Y = kX + b.

RCA in R Code

When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

library(RCA)
Loading required package: igraph

Attaching package: 'igraph'
The following objects are masked from 'package:stats':

    decompose, spectrum
The following object is masked from 'package:base':

    union
Loading required package: gplots

Attaching package: 'gplots'
The following object is masked from 'package:stats':

    lowess

You can add options to executable code like this

set.seed <- 2
matrix <- round(matrix(runif(100, min = 0, max = 6),
ncol = 5))
rca <- RCA(matrix)
rca <- RCA(matrix, max = rep(6, 5), min = rep(0, 5))
rca <- RCA(matrix, max = 6, min = 0)
rca <- RCA(matrix, num = 10000, alpha = 0.1)
summary(rca)
           Length Class  Mode   
membership  20    -none- numeric
modules      6    -none- list   
R          400    -none- numeric
print(rca)
RCA found 6 relational classes. Sizes: 7 1 5 3 3 1 
rca$membership
 [1] 1 1 4 1 3 2 5 3 4 3 1 1 1 1 3 5 3 4 5 6
rca$modules[[1]]$matrix
     [,1] [,2] [,3] [,4] [,5]
[1,]    4    4    6    4    2
[2,]    4    6    6    1    1
[3,]    5    3    6    2    2
[4,]    4    2    6    1    4
[5,]    2    3    1    4    1
[6,]    0    2    2    4    3
[7,]    4    1    3    5    6
rca$R
           [,1]       [,2]       [,3]       [,4]       [,5] [,6]       [,7]
 [1,] 0.0000000  0.5424371  0.7291038  0.6757704  0.0000000    0  0.0000000
 [2,] 0.5424371  0.0000000  0.0000000  0.4757704  0.0000000    0  0.0000000
 [3,] 0.7291038  0.0000000  0.0000000  0.0000000  0.0000000    0 -0.6108962
 [4,] 0.6757704  0.4757704  0.0000000  0.0000000  0.0000000    0  0.0000000
 [5,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.0000000
 [6,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.0000000
 [7,] 0.0000000  0.0000000 -0.6108962  0.0000000  0.0000000    0  0.0000000
 [8,] 0.0000000  0.0000000  0.0000000  0.0000000  0.6624371    0  0.0000000
 [9,] 0.0000000  0.0000000 -0.5908962  0.0000000  0.0000000    0  0.0000000
[10,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.0000000
[11,] 0.0000000  0.0000000  0.0000000  0.5424371  0.0000000    0  0.0000000
[12,] 0.0000000  0.0000000  0.0000000 -0.4908962  0.0000000    0  0.0000000
[13,] 0.0000000  0.0000000  0.0000000 -0.5842296  0.0000000    0  0.0000000
[14,] 0.0000000 -0.5775629  0.0000000  0.0000000  0.0000000    0  0.0000000
[15,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.0000000
[16,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.5424371
[17,] 0.0000000  0.0000000  0.0000000  0.0000000 -0.7175629    0  0.0000000
[18,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.0000000
[19,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.6757704
[20,] 0.0000000  0.0000000  0.0000000  0.0000000  0.0000000    0  0.0000000
            [,8]       [,9]     [,10]      [,11]      [,12]      [,13]
 [1,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
 [2,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
 [3,]  0.0000000 -0.5908962 0.0000000  0.0000000  0.0000000  0.0000000
 [4,]  0.0000000  0.0000000 0.0000000  0.5424371 -0.4908962 -0.5842296
 [5,]  0.6624371  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
 [6,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
 [7,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
 [8,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
 [9,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
[10,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
[11,]  0.0000000  0.0000000 0.0000000  0.0000000 -0.8242296  0.0000000
[12,]  0.0000000  0.0000000 0.0000000 -0.8242296  0.0000000  0.0000000
[13,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
[14,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
[15,] -0.6108962  0.0000000 0.0000000  0.0000000  0.0000000  0.5157704
[16,]  0.0000000  0.0000000 0.0000000  0.0000000  0.5424371  0.0000000
[17,] -0.6842296  0.0000000 0.6224371  0.0000000  0.0000000  0.0000000
[18,]  0.0000000 -0.5775629 0.0000000  0.0000000  0.0000000  0.0000000
[19,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.0000000
[20,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000  0.5957704
           [,14]      [,15]     [,16]      [,17]      [,18]     [,19]     [,20]
 [1,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
 [2,] -0.5775629  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
 [3,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
 [4,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
 [5,]  0.0000000  0.0000000 0.0000000 -0.7175629  0.0000000 0.0000000 0.0000000
 [6,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
 [7,]  0.0000000  0.0000000 0.5424371  0.0000000  0.0000000 0.6757704 0.0000000
 [8,]  0.0000000 -0.6108962 0.0000000 -0.6842296  0.0000000 0.0000000 0.0000000
 [9,]  0.0000000  0.0000000 0.0000000  0.0000000 -0.5775629 0.0000000 0.0000000
[10,]  0.0000000  0.0000000 0.0000000  0.6224371  0.0000000 0.0000000 0.0000000
[11,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
[12,]  0.0000000  0.0000000 0.5424371  0.0000000  0.0000000 0.0000000 0.0000000
[13,]  0.0000000  0.5157704 0.0000000  0.0000000  0.0000000 0.0000000 0.5957704
[14,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
[15,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
[16,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.7691038 0.0000000
[17,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
[18,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
[19,]  0.0000000  0.0000000 0.7691038  0.0000000  0.0000000 0.0000000 0.0000000
[20,]  0.0000000  0.0000000 0.0000000  0.0000000  0.0000000 0.0000000 0.0000000
plot(rca, module = 1)

plot(rca, module = 1, colorblind = TRUE,
heat_labels = TRUE)

plot(rca, module = 1, heatmap = FALSE)

plot(rca, module = 1, heatmap = FALSE,
layout = layout.circle, edge_color = "red",
vertex_color = "gray", vertex_frame_color = "red",
vertex_size = 30, vertex_label_color= "red",
vertex_label_cex = 1, margin = 0.2)

References

  1. Goldberg, A. (2011). Mapping shared understandings using relational class analysis: The case of the cultural omnivore reexamined. American Journal of Sociology, 116(5), 1397–1436.

  2. Boutyline, A. (2017). Improving the Measurement of Shared Cultural Schemas with Correlational Class Analysis: Theory and Method. Sociological Science, 4, 353–393. https://doi.org/10.15195/v4.a15