Our example person Azra has assigned (open-ended categories of her own choosing) to a fixed set of 35 items, recorded as logical values (TRUE, FALSE).
We have summarised this data matrix into a co-occurence matrix of items x items, where each cell counts the number of categories that are assigned to both items of the item-pair in question.
We interpret these counts as a measure of categorical similarity between items, and consequently set the diagonal to the maximum possible number of categories, 18 in Azra's case.
We then divide all cells by that maximum to scaled our cells to 1.
(We also need to do this because there are other people than Azra who have less then 18 categories in total, so we want to make them comparable).
Loosely speaking, we assume that our cells in this (scaled) co-occurence matrix can be interpreted as percentages of similarity, where 1 on the diagonal is – naturally – the maximum: item, say but-how with but-how obviously is completely similar.
Here's Azra (sorry):
Azra <- structure(c(1, 0.0555555555555556, 0.111111111111111, 0.222222222222222,
0.166666666666667, 0, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.166666666666667, 0.166666666666667, 0.222222222222222, 0.333333333333333,
0.111111111111111, 0.166666666666667, 0.166666666666667, 0.277777777777778,
0.166666666666667, 0.222222222222222, 0.222222222222222, 0.111111111111111,
0.111111111111111, 0.166666666666667, 0.333333333333333, 0.111111111111111,
0.222222222222222, 0.111111111111111, 0.222222222222222, 0.0555555555555556,
0.166666666666667, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 1,
0.0555555555555556, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.222222222222222, 0.0555555555555556,
0.111111111111111, 0, 0.111111111111111, 0.111111111111111, 0,
0, 0.111111111111111, 0.222222222222222, 0.111111111111111, 0.166666666666667,
0.222222222222222, 0.166666666666667, 0.0555555555555556, 0,
0.111111111111111, 0.111111111111111, 0.166666666666667, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 1, 0.111111111111111, 0.277777777777778,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.0555555555555556,
0, 0.0555555555555556, 0.166666666666667, 0.166666666666667,
0.0555555555555556, 0, 0.166666666666667, 0.166666666666667,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.222222222222222,
0.166666666666667, 0.166666666666667, 0.222222222222222, 0.111111111111111,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0, 0.111111111111111, 0.0555555555555556, 0, 0.0555555555555556,
0.111111111111111, 0.222222222222222, 0.166666666666667, 0.111111111111111,
1, 0.166666666666667, 0.0555555555555556, 0.0555555555555556,
0.166666666666667, 0, 0.166666666666667, 0.111111111111111, 0.111111111111111,
0.333333333333333, 0.111111111111111, 0.166666666666667, 0.0555555555555556,
0.277777777777778, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.277777777777778,
0.222222222222222, 0.277777777777778, 0, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.111111111111111, 0, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.166666666666667, 0.166666666666667, 0.277777777777778,
0.166666666666667, 1, 0.166666666666667, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0, 0.0555555555555556, 0.222222222222222,
0.333333333333333, 0.0555555555555556, 0, 0.222222222222222,
0.333333333333333, 0.166666666666667, 0.222222222222222, 0.111111111111111,
0.333333333333333, 0.222222222222222, 0.277777777777778, 0.388888888888889,
0.222222222222222, 0.333333333333333, 0.111111111111111, 0.111111111111111,
0.222222222222222, 0, 0.222222222222222, 0.111111111111111, 0,
0.111111111111111, 0.111111111111111, 0, 0.166666666666667, 0.0555555555555556,
0.0555555555555556, 0.166666666666667, 1, 0, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 0,
0.0555555555555556, 0.0555555555555556, 0, 0, 0.0555555555555556,
0.111111111111111, 0.0555555555555556, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.0555555555555556, 0, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0.0555555555555556, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0,
1, 0, 0, 0, 0, 0.111111111111111, 0.111111111111111, 0, 0, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0, 0.111111111111111, 0.111111111111111, 0,
0.111111111111111, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0, 0.0555555555555556, 0.0555555555555556, 0, 0.0555555555555556,
0, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.166666666666667, 0.0555555555555556, 0.111111111111111, 0,
1, 0.0555555555555556, 0.166666666666667, 0.166666666666667,
0, 0.166666666666667, 0.111111111111111, 0.166666666666667, 0,
0.166666666666667, 0, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0.0555555555555556, 0.166666666666667, 0.222222222222222,
0.166666666666667, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0.166666666666667, 0.111111111111111, 0.0555555555555556, 0.166666666666667,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.0555555555555556,
0.0555555555555556, 0, 0.0555555555555556, 0.0555555555555556,
0, 0.0555555555555556, 1, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 0,
0.0555555555555556, 0, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0, 0.111111111111111,
0, 0, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.166666666666667, 0.166666666666667,
0.111111111111111, 0, 0.166666666666667, 0, 0.0555555555555556,
0, 0.166666666666667, 0.0555555555555556, 1, 0.166666666666667,
0.0555555555555556, 0.166666666666667, 0.111111111111111, 0.222222222222222,
0, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0.111111111111111, 0, 0.111111111111111, 0, 0.166666666666667,
0.166666666666667, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0, 0.222222222222222, 0.0555555555555556, 0.0555555555555556,
0.166666666666667, 0.0555555555555556, 0.0555555555555556, 0.166666666666667,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0, 0.166666666666667, 0.111111111111111,
0.166666666666667, 1, 0.0555555555555556, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.0555555555555556, 0.166666666666667,
0, 0.111111111111111, 0.166666666666667, 0, 0.111111111111111,
0.0555555555555556, 0.166666666666667, 0.166666666666667, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0, 0.166666666666667, 0.111111111111111,
0.111111111111111, 0.166666666666667, 0.0555555555555556, 0.111111111111111,
0.222222222222222, 0.0555555555555556, 0.166666666666667, 0.111111111111111,
0.222222222222222, 0, 0.111111111111111, 0, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 1, 0.222222222222222,
0.0555555555555556, 0.0555555555555556, 0.222222222222222, 0.166666666666667,
0.166666666666667, 0.111111111111111, 0.111111111111111, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.277777777777778, 0.0555555555555556,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0,
0.0555555555555556, 0.111111111111111, 0.333333333333333, 0.222222222222222,
0.166666666666667, 0.333333333333333, 0.333333333333333, 0.111111111111111,
0.111111111111111, 0.166666666666667, 0.0555555555555556, 0.166666666666667,
0.166666666666667, 0.222222222222222, 1, 0.111111111111111, 0.166666666666667,
0.166666666666667, 0.388888888888889, 0.222222222222222, 0.222222222222222,
0.222222222222222, 0.222222222222222, 0.222222222222222, 0.277777777777778,
0.444444444444444, 0.277777777777778, 0.388888888888889, 0.111111111111111,
0.222222222222222, 0.166666666666667, 0.166666666666667, 0.222222222222222,
0.111111111111111, 0.111111111111111, 0.166666666666667, 0.0555555555555556,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0.166666666666667, 0.0555555555555556,
0.111111111111111, 1, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0.111111111111111, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0, 0.111111111111111, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.166666666666667, 0.166666666666667, 0.111111111111111,
0, 0.166666666666667, 0, 0.0555555555555556, 0, 0.166666666666667,
0.0555555555555556, 0.222222222222222, 0.166666666666667, 0.0555555555555556,
0.166666666666667, 0.111111111111111, 1, 0, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0,
0.111111111111111, 0, 0.166666666666667, 0.166666666666667, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0, 0.222222222222222,
0.0555555555555556, 0.0555555555555556, 0.166666666666667, 0.0555555555555556,
0.0555555555555556, 0.166666666666667, 0, 0.166666666666667,
0.0555555555555556, 0.222222222222222, 0, 0.111111111111111,
0, 0.111111111111111, 0, 0.0555555555555556, 0.222222222222222,
0.166666666666667, 0.0555555555555556, 0, 1, 0.222222222222222,
0.166666666666667, 0.166666666666667, 0.111111111111111, 0.166666666666667,
0.111111111111111, 0.222222222222222, 0.222222222222222, 0.0555555555555556,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0, 0.111111111111111, 0.111111111111111, 0, 0.111111111111111,
0.166666666666667, 0.277777777777778, 0.111111111111111, 0.166666666666667,
0.277777777777778, 0.333333333333333, 0.0555555555555556, 0.111111111111111,
0.166666666666667, 0.0555555555555556, 0.111111111111111, 0.166666666666667,
0.166666666666667, 0.388888888888889, 0.111111111111111, 0.111111111111111,
0.222222222222222, 1, 0.111111111111111, 0.333333333333333, 0.222222222222222,
0.222222222222222, 0.166666666666667, 0.277777777777778, 0.333333333333333,
0.277777777777778, 0.333333333333333, 0.111111111111111, 0.222222222222222,
0.166666666666667, 0.111111111111111, 0.222222222222222, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0.0555555555555556, 0.166666666666667,
0.111111111111111, 0.0555555555555556, 0.166666666666667, 0.166666666666667,
0.0555555555555556, 0.111111111111111, 0, 0.0555555555555556,
0.0555555555555556, 0, 0.166666666666667, 0.222222222222222,
0.0555555555555556, 0.0555555555555556, 0.166666666666667, 0.111111111111111,
1, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.166666666666667, 0.222222222222222, 0.0555555555555556,
0.166666666666667, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0,
0.166666666666667, 0.111111111111111, 0.222222222222222, 0, 0.111111111111111,
0.166666666666667, 0.222222222222222, 0, 0.111111111111111, 0.111111111111111,
0, 0.111111111111111, 0.111111111111111, 0.111111111111111, 0.222222222222222,
0.0555555555555556, 0.111111111111111, 0.166666666666667, 0.333333333333333,
0.111111111111111, 1, 0.166666666666667, 0.166666666666667, 0,
0.111111111111111, 0.222222222222222, 0.111111111111111, 0.222222222222222,
0.0555555555555556, 0.222222222222222, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0, 0.222222222222222, 0, 0.111111111111111, 0.166666666666667,
0.111111111111111, 0, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0.166666666666667, 0.111111111111111,
0.222222222222222, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.222222222222222, 0.0555555555555556, 0.166666666666667, 1,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.222222222222222,
0.111111111111111, 0.166666666666667, 0.0555555555555556, 0.166666666666667,
0.0555555555555556, 0.111111111111111, 0.0555555555555556, 0.0555555555555556,
0.111111111111111, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0.111111111111111, 0.222222222222222, 0.166666666666667, 0.333333333333333,
0.0555555555555556, 0.111111111111111, 0.0555555555555556, 0,
0, 0, 0.166666666666667, 0.222222222222222, 0, 0, 0.166666666666667,
0.222222222222222, 0.111111111111111, 0.166666666666667, 0.0555555555555556,
1, 0.166666666666667, 0.222222222222222, 0.222222222222222, 0.166666666666667,
0.222222222222222, 0.0555555555555556, 0.111111111111111, 0.166666666666667,
0, 0.166666666666667, 0.0555555555555556, 0, 0.0555555555555556,
0.0555555555555556, 0.111111111111111, 0.222222222222222, 0.166666666666667,
0.166666666666667, 0.222222222222222, 0.111111111111111, 0, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.166666666666667,
0.222222222222222, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.166666666666667, 0.0555555555555556, 0, 0.0555555555555556,
0.166666666666667, 1, 0.166666666666667, 0.222222222222222, 0.222222222222222,
0.111111111111111, 0.111111111111111, 0, 0.111111111111111, 0.111111111111111,
0.222222222222222, 0.111111111111111, 0.0555555555555556, 0,
0.166666666666667, 0.166666666666667, 0.111111111111111, 0.166666666666667,
0.166666666666667, 0.277777777777778, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0, 0.0555555555555556,
0.166666666666667, 0.277777777777778, 0.0555555555555556, 0,
0.222222222222222, 0.277777777777778, 0.166666666666667, 0.111111111111111,
0.111111111111111, 0.222222222222222, 0.166666666666667, 1, 0.222222222222222,
0.111111111111111, 0.222222222222222, 0.111111111111111, 0.111111111111111,
0.166666666666667, 0, 0.222222222222222, 0.111111111111111, 0,
0.111111111111111, 0.111111111111111, 0.333333333333333, 0.166666666666667,
0.222222222222222, 0.277777777777778, 0.388888888888889, 0.166666666666667,
0.111111111111111, 0.166666666666667, 0.0555555555555556, 0.166666666666667,
0.166666666666667, 0.277777777777778, 0.444444444444444, 0.111111111111111,
0.166666666666667, 0.222222222222222, 0.333333333333333, 0.222222222222222,
0.222222222222222, 0.222222222222222, 0.222222222222222, 0.222222222222222,
0.222222222222222, 1, 0.277777777777778, 0.388888888888889, 0.111111111111111,
0.222222222222222, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0.111111111111111, 0.111111111111111, 0.166666666666667, 0.111111111111111,
0.111111111111111, 0.222222222222222, 0.111111111111111, 0.222222222222222,
0.222222222222222, 0.166666666666667, 0, 0.222222222222222, 0.0555555555555556,
0.166666666666667, 0.166666666666667, 0.0555555555555556, 0.277777777777778,
0.111111111111111, 0.166666666666667, 0.0555555555555556, 0.277777777777778,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.166666666666667,
0.222222222222222, 0.111111111111111, 0.277777777777778, 1, 0.277777777777778,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.166666666666667,
0.166666666666667, 0.0555555555555556, 0.166666666666667, 0.111111111111111,
0.111111111111111, 0.222222222222222, 0.166666666666667, 0.111111111111111,
0.277777777777778, 0.333333333333333, 0.166666666666667, 0.111111111111111,
0.166666666666667, 0, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.388888888888889, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0.333333333333333, 0.166666666666667, 0.222222222222222, 0.166666666666667,
0.222222222222222, 0.111111111111111, 0.222222222222222, 0.388888888888889,
0.277777777777778, 1, 0.0555555555555556, 0.222222222222222,
0.222222222222222, 0.111111111111111, 0.166666666666667, 0.0555555555555556,
0.111111111111111, 0.166666666666667, 0, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0.0555555555555556, 0.0555555555555556,
1, 0.0555555555555556, 0, 0.0555555555555556, 0.166666666666667,
0.166666666666667, 0.0555555555555556, 0, 0.111111111111111,
0.222222222222222, 0, 0.0555555555555556, 0.166666666666667,
0.111111111111111, 0, 0.111111111111111, 0.111111111111111, 0,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.222222222222222,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.222222222222222,
0.111111111111111, 0.222222222222222, 0.166666666666667, 0.111111111111111,
0, 0.111111111111111, 0.222222222222222, 0.111111111111111, 0.222222222222222,
0.0555555555555556, 1, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0.166666666666667, 0.222222222222222, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0, 0, 0, 0.0555555555555556, 0.166666666666667,
0, 0, 0.0555555555555556, 0.166666666666667, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.166666666666667, 0.111111111111111,
0.166666666666667, 0.166666666666667, 0.111111111111111, 0.222222222222222,
0, 0.0555555555555556, 1, 0, 0.111111111111111, 0, 0, 0.0555555555555556,
0, 0.166666666666667, 0.111111111111111, 0, 0.166666666666667,
0, 0.0555555555555556, 0, 0.166666666666667, 0.0555555555555556,
0.222222222222222, 0.166666666666667, 0.0555555555555556, 0.166666666666667,
0.111111111111111, 0.222222222222222, 0, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0.111111111111111, 0, 0.111111111111111, 0,
0.166666666666667, 0.166666666666667, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0, 1, 0.0555555555555556, 0.0555555555555556,
0.166666666666667, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0.166666666666667, 0.111111111111111, 0.111111111111111, 0.222222222222222,
0.111111111111111, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.222222222222222,
0.111111111111111, 0.0555555555555556, 0.111111111111111, 0.222222222222222,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.166666666666667,
0.222222222222222, 0.222222222222222, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 1, 0.166666666666667, 0.0555555555555556,
0, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.0555555555555556,
0.111111111111111, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0.111111111111111, 0.111111111111111, 0.0555555555555556, 0.0555555555555556,
0.166666666666667, 0.0555555555555556, 0, 0.0555555555555556,
0.166666666666667, 1, 0.0555555555555556, 0, 0.111111111111111,
0.111111111111111, 0.0555555555555556, 0, 0.111111111111111,
0, 0.0555555555555556, 0, 0.166666666666667, 0.0555555555555556,
0.166666666666667, 0.166666666666667, 0, 0.111111111111111, 0.111111111111111,
0.166666666666667, 0, 0.111111111111111, 0, 0.111111111111111,
0.111111111111111, 0, 0.0555555555555556, 0, 0.111111111111111,
0.166666666666667, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0, 0.166666666666667, 0.0555555555555556, 0.0555555555555556,
1, 0.0555555555555556, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.0555555555555556,
0.0555555555555556, 0.0555555555555556, 0.0555555555555556, 0.166666666666667,
0.0555555555555556, 0.0555555555555556, 0.111111111111111, 0.111111111111111,
0.166666666666667, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0, 0.111111111111111, 0.166666666666667, 0.111111111111111, 0.166666666666667,
0, 0.111111111111111, 0.0555555555555556, 0.0555555555555556,
0, 0, 0.0555555555555556, 1, 0.0555555555555556, 0.0555555555555556,
0.0555555555555556, 0.111111111111111, 0.0555555555555556, 0.111111111111111,
0.0555555555555556, 0, 0.0555555555555556, 0.166666666666667,
0.0555555555555556, 0.111111111111111, 0.111111111111111, 0.0555555555555556,
0.166666666666667, 0.0555555555555556, 0.166666666666667, 0.0555555555555556,
0.111111111111111, 0, 0.0555555555555556, 0.0555555555555556,
0.166666666666667, 0.111111111111111, 0.111111111111111, 0.111111111111111,
0, 0.111111111111111, 0, 0, 0.0555555555555556, 0.111111111111111,
0.111111111111111, 0.0555555555555556, 0.0555555555555556, 1), .Dim = c(35L,
35L), .Dimnames = structure(list(items = c("but-how", "encyclopedia",
"alien", "language-of-bees", "bad-hen", "correspondence", "bamboozable",
"inventions", "gray-hair", "i-we", "the-same", "the-better",
"cockatoo", "caravan", "comma", "headturner", "crocodile", "countries",
"level", "morning", "idiom", "lullaby", "riddle", "eating-grandpa",
"easter-bunny", "alphabet-of-swearing", "guilt", "trouble", "eating-animals",
"random-poetry", "comparatively", "one-letter", "resistance",
"conjugation", "censored"), items = c("but-how", "encyclopedia",
"alien", "language-of-bees", "bad-hen", "correspondence", "bamboozable",
"inventions", "gray-hair", "i-we", "the-same", "the-better",
"cockatoo", "caravan", "comma", "headturner", "crocodile", "countries",
"level", "morning", "idiom", "lullaby", "riddle", "eating-grandpa",
"easter-bunny", "alphabet-of-swearing", "guilt", "trouble", "eating-animals",
"random-poetry", "comparatively", "one-letter", "resistance",
"conjugation", "censored")), .Names = c("items", "items")))
A plot is easily made, but not very informative for us, because it's overwhelming, so we need some kind of summry.
library(ggplot2)
ggplot(data = melt(Azra, varnames = c("x", "y")), mapping = aes(x = x, y = y, fill = value, )) + geom_raster() + scale_fill_continuous(low = "white", high = "steelblue") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
We want to be able to see which items Azra thought were categorically similar, and if so, what her dimensions (or clusters?) of similarity are.
What would be an appropriate, and informative method to summarise this kind of data?
Specifically, we'd like to be able to use something akin to Horn's Parallel Analysis (from a PCA context) to decide just how many retainable dimensions there are in Azras similarity matrix.
Notes:
- We've looked at Multidimensional Scaling (MDS), but that seems to require the number of dimensions as an input, though to us, the number of dimensions on which
Azrasees similarity is an empirical question. - We've looked at Hierarchical Clustering Methods and respective dendrogram plots, but that seems to sit awkwardly with the fact that similarity is a multidimensional phenomenon; item
censoredmight share category A withbut-how, but category B withlanguage-of-beesetc. - We've looked at Principal Components Analysis (PCA) – mostly because we know it well, so everything starts looking like a nail ... – but that doesn't work with a similarity matrix, and even with a (converted) distance matrix only under some conditions about which we're not sure. (We tried anyway, see below).
Here's our rough, hacky and probably just plain wrong/dumb way to do this: It doesn't give us any indication of how many dimensions we should be retaining.
We first make a distance matrix as per the cosine theorem (?!):
distances <- sqrt(1-Azra)
We then plug that into a (classical?) MDS and plot the result:
md_scaled <- cmdscale(d = distances)
md_scaled <- as.data.frame(md_scaled)
ggplot(data = md_scaled, mapping = aes(x = V1, y = V2, label = rownames(md_scaled))) + geom_text()






Would you say treating it just as a correlation matrix is defensible? That would be fantastic!
– maxheld Aug 18 '16 at 13:40Azra-defined) categories co-occur on some item pair, the more alike they are in her mind.eating-grandpa/bad-hen, for example, share 7 categories (scaled 0.388), butone-letter/conjugationshare 0 (scaled 0) categories, so we're assuming she finds the former more similar than the latter.Is that a defensible, or at least plausible jump from co-occurence to similarity?
– maxheld Aug 18 '16 at 14:05TRUEandFALSE. Of these we have one for each participant (here,Azra, but some ~70 overall). Crucially, people have different numbers of categories, and – because they're open ended – the categories are incomparable between people, hence the need for the co-occurence matrix (or array, one matrix for each person). – maxheld Aug 18 '16 at 14:48Do you think we could use PCA then? (Values would still have to be somehow forced between 1 and -1, right?)
– maxheld Aug 18 '16 at 14:51TRUEs.What would you put on the diagonal?
– maxheld Aug 18 '16 at 15:47