Learn R Programming

soc.ca (version 0.8.1)

get.category.relations: Get and calculate the relationships and oppositions between each pair of categories

Description

Use this function to calculate PEM pem.table values, chisq, distance and coordinates for each pair of categories in either an indicator matrix or the categories from an soc.mca result object. These relationship are useful for both diagnostics, analysis, interpretation and plotting. For plotting combine with add.category.relations to build your plot.

Usage

get.category.relations(
  r,
  ind = r$indicator.matrix.active,
  dim = c(1, 2),
  rel = t(combn(colnames(ind), 2))
)

Value

a tibble

Arguments

r

an soc.mca result object

ind

an indicator matrix, see indicator

dim

a numeric vector with the dimensions for the coordinates. This is only sent to extract_mod.

rel

a matrix with pairs of categories

Examples

Run this code
example(soc.mca)
get.category.relations(result)

Run the code above in your browser using DataLab