1

I have a dataframe from an experiment with the stimuli on the columns and responses (in the form of one word) from participants in the rows. The dataframe is filled with counts of how many times that response was given for a stimulus. I looks like this:

S angry happy sad excited frustrated
a 10 1 0 0 5
b 1 0 0 15 0
c 13 0 5 0 0
d 10 0 0 0 6

I wanted to visualize this data with a network where the simuli (nodes) are linked if they have been given the same response, and the links are stronger if that response have been given many times.

I have already created a network from an adjacency matrix with igraph and ggnet with the stimuli as col names and row names, but I loose some info there (which response and how often).

Any ways I could do it??

  • 1
    0 means no response and should be discarded? And provided sample should result with 2 edges, *happy-angry* and *sad-frustrated*, edge weights for both being 2 (count of equal responses, (1,1) for the 1st and (5,5) for 2nd) ? – margusl Jul 01 '23 at 07:18
  • 1
    Can you add the igraph and ggnet code ypu wrote and what you want the network to look like to your question? – user12256545 Jul 01 '23 at 18:25

0 Answers0