0049 (Converting 2 mode data into 1 mode data)
Social Network Analysis Spring 2012 » All SOC180 Problems » 0049 (Converting 2 mode data into 1 mode data)
Q49. Convert this 2mode data into 1mode data
Flavor  Who Likes It 

Chocolate  Abe, Bertha, Cyndra, Dalia 
Vanilla  Abe, Cyndra, Eve, Faisel, Gerd 
Strawberry  Bertha, Cyndra, Hettie, Iolantha 
Pistachio  Cyndra, Dalia, Gerd, Hettie, Iolantha 
This problem requires us to convert a 2 mode affiliation network into 1mode comembership and membershipoverlap networks[1]. We first convert the raw data into a rectangular affiliation matrix


The Person by Person Matrix

The Flavor by Flavor Matrix

Here's the work flow if we want to carry this out "smart":
 Enter affiliation network data in rectangular matrix format in Excel (here it will be a 9 rows by 4 columns matrix — plus labels). Let's call this matrix A.
 Create the square matrices — persons by persons and flavors by flavors — by multiplying the matrix and its inverse
 In matrix multiplication of A*B the number columns of A has to match the number of rows of B
 The result is a matrix with the number of rows of A and the number of columns of B
 Our rectangular matrix has 9 rows and 4 columns. We want to produce a 9x9 persons matrix and a 4x4 flavors matrix.
 The matrix transpose(A) is just A with columns and rows interchanged. It has 4 columns and 9 rows.
 9x9 persons matrix P = 9x4 matrix A TIMES 4x9 matrix transpose(A)
 4x4 flavors matrix F = 4x9 matrix transpose(A) TIMES 9x4 matrix A
 We place these each in its own worksheet starting in cell A1
 We might want to eliminate the entries on the main diagonal to prevent selfedges
 In NodeXL we go to the Import menu and select "From Open Matrix Notebook"
 With these specifications since we DO have vertex names in the first row and first column
And then we can tweak the images — copying vertex names for labels, using Autofill Columns to set edge width to the edge weight column, and playing with colors as we like.
The Person by Person Network 
The Flavor by Flavor Matrix 
Bibliography
1. Borgatti, Stephen P. and Daniel S. Halgin Analyzing Affiliation Networks