Lab 2: QAP, CSS & Structural Equivalence

Re-Analyzing Friend & Advice Networks from Krackhardt (1987)

Student Name Here

2017-11-02

Introduction

This lab will examine how to measure individuals’ perceived structure of social networks (cognitive social structures or CSS) and how to analyze these perceptions, drawing on notions of structural equivalence and quadratic assignment procedure discussed in class.

We will be using the Krackhardt’s Advice and Friendship data sets. 1 This is the data set reported in Krackhardt, D. (1987) “Cognitive Social Structures,” Social Networks, 9: 109—34. Reading that paper before carrying out the analysis is strongly recommended. The 21 respondents are managers in a company.

There are four sections to this lab below: CSS analysis, visualization, structural equivalence, and differences and correlation. We are not looking for an essay response to every question, but you should succinctly convey that you understand how to interpret and make inferences based on the outputs from these analyses.

This assignment is designed to use the sna package in the R statistical programming language.2 See Butts, Carter T., sna: Tools for Social Network Analysis, R package version 2.4.; see also ?? sna for documentation and Butts, Carter T. (2008). “Social Network Analysis with sna.” Journal of Statistical Software, 24(6). You are provided the RData file. krackhardt_css_data.RData

Our visualization for this exercise will be done using ggnet2,3 Moritz Marbach and Francois Briatte, with help from Heike Hoffmann, Pedro Jordano and Ming-Yu Liu; see ?? ggnet2. a visualization package which applies the visualization framework developed in ggplot2, an up-and-coming visualization framework created by RStudio that is well on its way to being recognized as the professional standard in R visualization.4 See ?? ggplot2, and the tidyverse website.

Before You Start:

Because you will not be collecting data in this lab, feel free to knit early and often to see how your responses are being formatted! Please do your best to maintain the formatting provided by this assignment. It makes grading significantly easier when answers are easy to read.

Download all the files for this lab and save them in the same folder. Open the CSS_Lab.R file in RStudio (File > Open). After the R script is loaded in the editor, set the working directory so that R knows where to find the RData file you are going to load (Session > Set Working Directory > To Source File Location).

The data file krackhardt_css_data.RData consists of two CSS data objects:

advice_nets: respondents’ perceptions about their own and others’ advice ties within the organization

friendship_nets: respondents’ perceptions about their own and others’ friendship ties within the organization

I. CSS Analysis and Extraction (20 pts)

We’ll begin by viewing an example response matrix. Notice that this is a binary sociomatrix.

Advice Matrix Table

V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21
1 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0
2 1 0 1 1 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1
3 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1
4 1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1
5 1 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1
6 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1
7 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1
8 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1
9 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 1 1 1 1 0
10 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 1 0
11 1 1 1 0 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0
12 0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 0 0 1
13 1 1 0 0 1 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1
14 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 1
15 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0
16 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0
17 1 1 1 0 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1
18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 1 1
20 0 1 0 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 0 0
21 0 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 1 1 0 0 0

The advice_nets and friendship_nets objects are R lists that each contain 21 networks, one for each respondent’s perception about what the advice and friendship networks look like. Let’s view the characteristics of a sample friendship network. We’ll visualize the ties within that network in the next Part.

Individual Respondent Network of manager 10

V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21
V1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
V2 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
V4 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
V5 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0
V6 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V7 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1
V8 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V9 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
V10 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V11 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0
V12 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V13 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
V14 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V15 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
V16 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V17 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
V18 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
V19 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
V20 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
V21 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Next, we’ll aggregate the individual observations of each actor within the network into a single network. There are multiple ways to do so. Each presents a different manner of combining the 21 responses into a single aggregated network. These include four locally aggregated structures (LAS) and one consensus aggregated structure. First, we calculate the four LAS: row, column, intersection, and union.

Friendship, Column.

Friendship, Column Matrix

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
2 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
4 1 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1
6 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
7 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
8 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
12 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
16 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1
18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
20 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Friendship, Row.

Friendship, Row Matrix

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0
2 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
6 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 1 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 1
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0
16 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0

Analysis

Conceptually, how do these two networks differ from one another? What are the pros and cons of using this method?

Row and column aggregation method take the response of each respondent and construct them into a network matrix. They are all self-reports. Column means who comes to the respondent. I.e. if I were manager one, column method would tell who comes to me for friendship. Row means who do I go to for friendship. I.e. If I were manager one, row method would tell who I go to for friendship." The pros is that it is easy to implement. However, the cons is that a lot of information is thrown out.

Friendship, Intersection.

Friendship Intersection

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
16 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Analysis

What information does the ‘intersection’ method capture? What are the pros and cons of using this method?

A tie/connection is established only when both agree that a tie is there. For example, in a 21 by 21 by 21 matrix such as this, if I were manager 1, and I say that I am friend with manager 2 and if this information is also repeated in manager 2’s response, then a tie is formed and it will be marked as one for the network. The pros is that unlike column or row, it considers the agreement between two person therefore, a more objective measure of friendship. However, again, since there are 21 ratings of the same connection and we are only using 2 out of the 21 ratings, there are information that is not being used.

Friendship, Union.

Friendship Union

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0
2 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0
4 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1
6 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
7 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
8 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0
9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
10 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 1 1 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 0 1
12 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0
16 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1
18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
20 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 0 1 0 0 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0

Anaylsis

What kind of information does the union method capture? What are the pros and cons of using this method?

Unlike intersection, union method would consider a connection if either of the two person says that there is a connection. This method is good because sometimes, a person might forgot about his or her earlier interaction with another person but the other person remembers. Therefore, it may help to capture information that is forgotten by the respondents. However, again there are information not taken into consideration. What if cognitively speaking, a person does not consider another as friend? For example, A might be pretending to be B’s friend. So the B may report A as friend but to A, B is not his or her friend. Such cases will still be considered as a friendship tie but it is not true.

Friendship, Median.

Friendship Median

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
18 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Analysis

What kind of information does the median measure capture? What are the pros and cons of using this method?

It shows that 50% of the people (or 21 managers) report that there is a friend. This is a measure based on consensus which is the pro. However, what happens when there is a secret friendship/alliance? For example an affair or a secret alliance between two people who seemed to be enemies to other people? This is the cons.

Finally, we’ll also load the data for our advice network for later analysis.

ad_column <- consensus(advice_nets, mode="digraph", diag=FALSE, method="OR.col")
ad_row    <- consensus(advice_nets, mode="digraph", diag=FALSE, method="OR.row")
ad_intersection <- consensus(advice_nets, mode="digraph", diag=FALSE, method="LAS.intersection")
ad_union  <- consensus(advice_nets, mode="digraph", diag=FALSE, method="LAS.union")
ad_median <- consensus(advice_nets, mode="digraph", diag=FALSE, method="central.graph")

II. Visualization (25 pts)

Define Network Structure

First, we’re going to define the position of the nodes on the network so that it is easier to compare edges across graphs.

Base Graph Structure

Base Graph Structure

Plot Two Aggregated Friendship Networks

Using our initial node placement as a template, we will now visualize the ties for aggregated networks.

# If you pass ggnet2 the mode value of a matrix, it will use the first two vectors to position the nodes on their x and y axes. Thus, if we call baseLayout throughout the rest of the visualizations, the nodes will remain in place but the edges drawn between the visualizations will change. 
ggnet2(fr_union_net, mode = baseLayout, label = TRUE,  arrow.size = 8, edge.color="red", arrow.gap = 0.03) + theme(panel.background = element_rect(fill = "#fffff8"))
Friendship, Union.

Friendship, Union.

Analysis

Describe what this network shows in your own words.

This network shows the union network, which I explained in the previous question. it shows that there is a giant component with node 18 as the isolate and node 10 as connected to 7 only.

Friendship, Row.

Friendship, Row.

Analysis

Describe what this network shows in your own words.

Since this is a visualization of the row aggregated network matrix, this graph shows the self-perception of who I am with friend with who else. If I were manager 1, the tie that happen between me and 4 is who I believe to be my friend.

What are the relevant similiarities and differences between the two networks? What do they mean?

The similarity between this and the previous network (union), is that whatever captured here in this (row network) is captuered in the union network because union takes into account both the row and the column. Therefore, as can be seen on the row graph, the link between manager 20 and 15 and 20 with 3 are gone in the row graph possibly because 20 doesnt think 15 and 3 are his or her friend. However, in the column network, 15 and 3 might think that they are 20’s friend.

Plot Two Aggregated Advice Networks

Choose two of the aggregated advice networks calculated above to visualize.

# Feel free to edit this portion of the code if you would like to plot different aggregated measures.
# Plot the ad_intersection network.
ad_intersect_net <- igraph::graph.adjacency(ad_intersection) # make an igraph network object from the advice intersection adjacency matrix

ggnet2(fr_union_net, mode = baseLayout, label = TRUE,  arrow.size = 8, edge.color="pink", arrow.gap = 0.03) + theme(panel.background = element_rect(fill = "#fffff8")) # plots the advice intersection network
Advice, Intersection.

Advice, Intersection.

Analysis

Describe what this network shows in your own words.

This network shows the intersection of the advice newtork. More specifically, if A think he or she seeks advice from B and if B perceives A to seek advice from B, there will be a link from A to B. Again, there is a giant component and 18 is an isolate.

Advice, Median.

Advice, Median.

Analysis

Describe what this network shows in your own words.

This network shows the median advice network. It calculats the median of manager A’s value of the connection (in this case advice) between A and B and B’s value of the connection.

What are the relevant similiarities and differences between the two networks? What do they mean?

The similarity is that both takes into account not only the self-reported connection between A and B but also other people’s perception. The difference is that intersection only takes into account the perception of the parties involved but median takes into account other people’s perceptions in the network.

Plot Two Individual Self-Report Networks

Next, we’ll plot two of the individual self-report networks. Choose two respondents (by number, 1—21) from either advice_nets or friendship_nets, or visualize both of a single respondent’s self-reports.

Respondent Networks

Respondent Network 1.

Respondent Network 1.

Respondent Network 2.

Respondent Network 2.

Analysis

What respondents did you choose to visualize? Why?

I chose V14 and V18 because in the previous graphs, they were always highly centralized and highly isolated respectively. For V14, who is highly centralized, I wanted to see how his or her perception is similar to the actual/more consensual version of the network. In class, we learn that a highly centralized person is on the core and is more able to see the whole picture of the network. After visualizing 11, I see that it is quite different from the consensual network Whereas, the story is the same for V18 who is on the periphery. What do their networks show? Can you draw any conclusions about each actor’s role in the network?

V14 shows that V17 seems to be highly connected to a lot of people, but he or she in fact is not. This shows that people are likely to have perception of the whole network that is quite different from the consensual one. As for V18 who is isolated. I feel that he or she might not be a real “loner”. When I visualized other people’s network, say 2 or 21 or 15, they show friendship connections to 18. It might be because 18 is a new member of the organization and thus not socialized into the social network yet. Therefore, this is another aspect where a CSS network might be highly biased.

Plot the Intersection of the FR_Union and Ad_Union Networks

Finally, we’re going to plot the intersection of two networks.

Intersection of Friendship, Union, and Advice, Union.

Intersection of Friendship, Union, and Advice, Union.

Analysis

What does this network show? Why might this visualization be useful?

This shows an intersection of the union of the friendship and advise network. This visualization is extremely useful because it is a better measure of centrality. A person might be central not only because he or she can give or take advice but because this person is also treated as others’ friend. As shown in the previous analysis, a CSS network might be highly biased. By combining different networks, we are better able to construct a more objective view of the network.

III. Structural Equivalence (25 pts)

In this section, we will compute the structural equivalence among the actors using the locally aggregated structure (LAS). Based upon the exploratory visualizations you created in Part II, choose one LAS structure for both the AD and FR relation type to compute structural equivalence (e.g. ad_union and fr_union).

Analysis

Outline your rationale for choosing your networks.

I will choose ad_union and fr_union. I’m interested in using them because i feel that they are a more objective measure of the network.

Structural Equivalence Matrices

Now, we’ll generate the matrices used to evaluate structural equivalence. Note that we’ll be using the Euclidean distance method.5 Hint: the way you interpret results using the Pearson correlation method and the Euclidean distance method are inverse. You should review the readings or slides from class to make sure you understand how to interpret results.

Advice SEM

Advice SEM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 NA 3.61 4.47 4.12 4.12 4.58 3.74 4.58 5.00 4.36 4.24 4.12 4.90 4.12 4.69 4.12 4.80 3.74 4.47 4.24 3.74
2 3.61 NA 3.61 4.24 3.74 4.24 3.87 4.00 4.00 3.74 3.87 3.74 3.87 3.16 3.87 3.46 3.74 4.12 3.61 4.12 4.36
3 4.47 3.61 NA 4.58 3.00 3.32 3.74 4.12 3.87 3.87 3.16 3.61 3.46 3.87 3.46 3.87 3.32 4.90 3.16 4.47 4.00
4 4.12 4.24 4.58 NA 4.47 3.74 4.80 3.16 4.24 3.46 4.36 3.74 4.12 4.69 3.61 2.83 4.24 4.80 4.36 4.58 4.36
5 4.12 3.74 3.00 4.47 NA 4.24 3.00 4.00 4.00 4.24 3.61 4.47 3.61 3.46 3.87 4.00 4.00 4.12 3.32 4.58 3.87
6 4.58 4.24 3.32 3.74 4.24 NA 4.12 4.00 4.00 3.74 3.87 2.83 3.87 4.24 4.12 4.00 3.16 5.20 4.36 4.80 3.87
7 3.74 3.87 3.74 4.80 3.00 4.12 NA 4.12 4.12 4.36 3.74 4.12 3.46 3.32 4.00 4.36 3.87 4.24 3.74 4.69 4.00
8 4.58 4.00 4.12 3.16 4.00 4.00 4.12 NA 4.69 3.16 4.12 3.16 3.87 4.47 3.87 2.83 3.74 5.00 4.12 4.80 4.80
9 5.00 4.00 3.87 4.24 4.00 4.00 4.12 4.69 NA 4.00 3.87 4.00 2.65 3.74 3.61 4.00 3.74 5.00 3.61 4.12 4.36
10 4.36 3.74 3.87 3.46 4.24 3.74 4.36 3.16 4.00 NA 3.00 3.74 3.32 4.47 3.61 2.83 4.00 5.00 4.12 4.36 4.58
11 4.24 3.87 3.16 4.36 3.61 3.87 3.74 4.12 3.87 3.00 NA 4.12 3.16 3.87 3.46 3.61 3.32 4.69 4.00 4.24 4.24
12 4.12 3.74 3.61 3.74 4.47 2.83 4.12 3.16 4.00 3.74 4.12 NA 3.87 4.24 3.87 3.16 3.46 5.39 4.12 4.58 4.36
13 4.90 3.87 3.46 4.12 3.61 3.87 3.46 3.87 2.65 3.32 3.16 3.87 NA 3.61 3.16 3.61 3.87 5.10 3.16 4.69 4.69
14 4.12 3.16 3.87 4.69 3.46 4.24 3.32 4.47 3.74 4.47 3.87 4.24 3.61 NA 3.32 4.24 3.74 3.87 3.00 3.87 4.36
15 4.69 3.87 3.46 3.61 3.87 4.12 4.00 3.87 3.61 3.61 3.46 3.87 3.16 3.32 NA 3.00 3.87 4.90 2.83 4.00 4.47
16 4.12 3.46 3.87 2.83 4.00 4.00 4.36 2.83 4.00 2.83 3.61 3.16 3.61 4.24 3.00 NA 4.24 5.20 3.87 4.58 4.80
17 4.80 3.74 3.32 4.24 4.00 3.16 3.87 3.74 3.74 4.00 3.32 3.46 3.87 3.74 3.87 4.24 NA 5.00 3.87 4.36 4.12
18 3.74 4.12 4.90 4.80 4.12 5.20 4.24 5.00 5.00 5.00 4.69 5.39 5.10 3.87 4.90 5.20 5.00 NA 4.47 3.74 4.24
19 4.47 3.61 3.16 4.36 3.32 4.36 3.74 4.12 3.61 4.12 4.00 4.12 3.16 3.00 2.83 3.87 3.87 4.47 NA 4.00 4.69
20 4.24 4.12 4.47 4.58 4.58 4.80 4.69 4.80 4.12 4.36 4.24 4.58 4.69 3.87 4.00 4.58 4.36 3.74 4.00 NA 4.00
21 3.74 4.36 4.00 4.36 3.87 3.87 4.00 4.80 4.36 4.58 4.24 4.36 4.69 4.36 4.47 4.80 4.12 4.24 4.69 4.00 NA
# Fri endship SEM

Friendship SEM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 NA 3.46 4.00 2.24 4.00 3.16 3.74 2.83 3.32 3.46 4.00 3.32 3.16 4.36 3.87 2.65 3.46 3.32 4.24 3.61 3.87
2 3.46 NA 4.24 3.61 3.74 2.83 3.16 3.46 3.61 3.46 4.24 3.00 3.16 4.12 4.12 3.00 3.46 3.61 4.47 3.87 3.32
3 4.00 4.24 NA 3.87 2.00 3.46 3.74 3.16 2.24 2.83 3.74 3.87 2.83 2.65 2.24 3.00 3.16 2.65 2.83 2.65 4.12
4 2.24 3.61 3.87 NA 3.87 3.32 3.32 2.65 3.16 3.00 3.61 2.83 3.00 4.24 3.46 2.45 3.00 2.83 4.12 3.16 4.00
5 4.00 3.74 2.00 3.87 NA 3.16 3.46 3.16 2.65 3.16 3.46 3.61 3.16 2.65 2.65 3.32 2.83 3.00 2.83 3.32 3.87
6 3.16 2.83 3.46 3.32 3.16 NA 2.00 3.46 2.65 2.45 4.00 3.00 2.83 3.61 3.32 2.65 2.00 2.65 4.00 3.00 2.65
7 3.74 3.16 3.74 3.32 3.46 2.00 NA 3.74 3.00 2.45 4.00 3.32 2.83 3.87 3.32 3.00 2.45 2.65 4.24 3.00 3.32
8 2.83 3.46 3.16 2.65 3.16 3.46 3.74 NA 2.65 3.16 3.46 3.00 2.83 3.61 3.32 2.24 3.46 3.00 3.74 3.32 4.12
9 3.32 3.61 2.24 3.16 2.65 2.65 3.00 2.65 NA 1.73 3.61 3.16 1.73 2.83 2.00 2.00 2.65 1.41 3.00 2.00 3.74
10 3.46 3.46 2.83 3.00 3.16 2.45 2.45 3.16 1.73 NA 4.00 3.00 2.00 3.32 2.24 2.24 2.45 1.00 3.46 1.73 3.61
11 4.00 4.24 3.74 3.61 3.46 4.00 4.00 3.46 3.61 4.00 NA 4.12 4.00 3.61 3.87 3.61 3.74 3.87 3.46 3.87 4.12
12 3.32 3.00 3.87 2.83 3.61 3.00 3.32 3.00 3.16 3.00 4.12 NA 3.00 4.00 3.46 2.83 2.65 2.83 4.36 3.16 3.74
13 3.16 3.16 2.83 3.00 3.16 2.83 2.83 2.83 1.73 2.00 4.00 3.00 NA 3.32 2.65 2.24 2.83 1.73 3.46 2.24 3.61
14 4.36 4.12 2.65 4.24 2.65 3.61 3.87 3.61 2.83 3.32 3.61 4.00 3.32 NA 2.83 3.46 3.32 3.16 2.24 2.83 3.74
15 3.87 4.12 2.24 3.46 2.65 3.32 3.32 3.32 2.00 2.24 3.87 3.46 2.65 2.83 NA 2.83 2.65 2.00 3.00 2.00 4.00
16 2.65 3.00 3.00 2.45 3.32 2.65 3.00 2.24 2.00 2.24 3.61 2.83 2.24 3.46 2.83 NA 2.65 2.00 3.61 2.45 3.74
17 3.46 3.46 3.16 3.00 2.83 2.00 2.45 3.46 2.65 2.45 3.74 2.65 2.83 3.32 2.65 2.65 NA 2.24 3.74 2.65 3.00
18 3.32 3.61 2.65 2.83 3.00 2.65 2.65 3.00 1.41 1.00 3.87 2.83 1.73 3.16 2.00 2.00 2.24 NA 3.32 1.41 3.74
19 4.24 4.47 2.83 4.12 2.83 4.00 4.24 3.74 3.00 3.46 3.46 4.36 3.46 2.24 3.00 3.61 3.74 3.32 NA 3.00 4.12
20 3.61 3.87 2.65 3.16 3.32 3.00 3.00 3.32 2.00 1.73 3.87 3.16 2.24 2.83 2.00 2.45 2.65 1.41 3.00 NA 4.00
21 3.87 3.32 4.12 4.00 3.87 2.65 3.32 4.12 3.74 3.61 4.12 3.74 3.61 3.74 4.00 3.74 3.00 3.74 4.12 4.00 NA

Take a moment to compare the structural equivalence matrices (SEM) for the advice and friendship networks that you analyzed. You might want to refer to previous visualizations. Notice that it’s challenging to decode this information visually in matrix form, even for a relatively small network. We’ll search the matrix programmatically to understand more about it.

Next, we will identify the two nodes with the highest and lowest SEM Euclidean distance in each matrix as well as the mean value of distance across both networks.

Friendship SEM Summary Statitistics

## [1] "Friendship SEM"
##    row col
## 18  18  10
## 10  10  18
## [1] "Min. Value:"
## [1] 1
##    row col
## 19  19   2
## 2    2  19
## [1] "Max Value:"
## [1] 4.472136
## [1] "Mean Value:"
## [1] 3.162995

Advice SEM Summary Statistics

## [1] "Advice SEM"
##    row col
## 13  13   9
## 9    9  13
## [1] "Min. Value:"
## [1] 2.645751
##    row col
## 18  18  12
## 12  12  18
## [1] "Max. Value:"
## [1] 5.385165
## [1] "Mean Value:"
## [1] 3.999986

Analysis

How do you interpret high and low values in this matrix, calculated using Euclidean distance?

Since structural equivalence refers to the extent to which two nodes are connected to the same others, or in other words, how structurally similar two nodes are. Euclidean distance increases as the number of neighbors that differ between the two increases. Thus the number should be interpreted as equivalent if they are closer to 0 and less equivalent if the number is bigger.

Which network has the smallest minimum distance between nodes? Why might that be? You may want to refer to your earlier visualizations for more insight into the network.

The friendship network has the smallest minimum distance between the notes. This can be seen from the mean value of 3.16. In a friendship network, friendship ties might be highly visible. For example, if I were friend with manager 21, I will always be seen hanging out with him or her. Other people will be able to tell that we are friends. Thus, the perceived network might be more similar, i.e. structurally equivalent.

Which network has the greatest maximum distance between nodes? Why might that be?

The advice network has the biggest distance between nodes. This is inferred from the mean value of 4.00, which is much higher than the value for friendship network. This is because people usually seek advice in private, sometimes even secretly. It will be harder for people to tell whether two people are seeking advice so the structural equivalence will be higher.

Which network exhibits more structural equivalence?

The friendship network demonstrates more structural equivalence since the average Euclidean distance in this network is smaller than the advice network.

IV. Differences and Correlation (30 pts)

Advice Networks

Now we will perform the QAP analysis on the advice networks by looping over every network in the list of networks and compare it against the median network we created in Part I. Let’s take a look at one of those values.

## 
## QAP Test Results
## 
## Estimated p-values:
##  p(f(perm) >= f(d)): 0 
##  p(f(perm) <= f(d)): 1 
## 
## Test Diagnostics:
##  Test Value (f(d)): 0.280373 
##  Replications: 1000 
##  Distribution Summary:
##      Min:     -0.1880115 
##      1stQ:    -0.04389317 
##      Med:     0.004146261 
##      Mean:    -0.0004174856 
##      3rdQ:    0.04017584 
##      Max:     0.2203237

The summary of the QAP test includes a number of values:

Estimated p-values: These estimate the probability of observing the test statistic (graph correlation in this instance) value. Qaptest will show both the probability of observing a value higher than or lower than the value observed. If the correlation is substantially higher than zero, these values will often be 1 and 0. This means that, during the QAP process no value was observed that was higher (or potentially lower) than the observed value. To confirm this, look at the Min/Max values in the distribution summary (see below).

Test value: This is the observed correlation between the two graphs.

Distribution summary: This summarizes the distribution of values calculated during the QAP process.

Look over the results that R printed to the console. Each result should begin with the respondent’s index number. Below, we’ll summarize the results of the correlation between the consensus network and each of our 21 respondents.

1 0.28
2 0.52
3 0.49
4 0.69
5 0.49
6 0.49
7 0.56
8 0.54
9 0.53
10 0.55
11 0.45
12 0.47
13 0.62
14 0.49
15 0.58
16 0.70
17 0.47
18 0.39
19 0.49
20 0.46
21 0.48

Analysis

Examining the results from above, which respondent’s perceptions were the most/least “accurate” when compared to the median response (assuming the consensus is the ground truth)?6 Hint: look for the strongest correlation between the respondent’s network and the median network.

Respondent 16’s perception is the most accurate when compared to the median response. Whereas respondent 1’s perception is the least accurate compared to the median response.

QAP Plot, Advice

Let’s plot the QAP distribution for our advice networks.

Advice QAP

Advice QAP

Based on the results of the QAP test, is the most accurate observer’s correlation with the consensus network significant or spurious? How does the graph above help you make that determination? Where would you draw a vertical line?

The most accurate observer’s correlation with the consensus network is significant because the peak falls below zero. I will draw a vertical line cutting through the peak of the graph and since the vertical line will fall below zero, I can conclude that the most accurate observer’s correlation is significant. More technically speaking, since this is a permutation test, where we are permutating the response variables 1000 times (reps=1000) and comparing the correlation with the permutations, if more random permutations are similar to the actual observed network, shows that the observed network is closer to random.

Friendship Networks

We will repeat this process for friendship networks. Take a look at your console output to answer the following question.

1 0.36
2 0.43
3 0.27
4 0.39
5 0.61
6 0.33
7 0.51
8 0.24
9 0.50
10 0.23
11 0.36
12 0.17
13 0.40
14 0.40
15 0.51
16 0.32
17 0.07
18 0.44
19 0.45
20 0.48
21 0.25
Friendship QAP

Friendship QAP

Analysis

Are the results for the friendship network very similar or different from those you saw in the advice networks? Give some possible reasons why individuals have more precise representations of one kind of relation structure than another kind of relation structure.

The results for the friendship network is very different from those that I saw in the advice networks (as can be seen from the qap graph and the correlations). Also from the correlations table of each respondent, manager 5 has the highest correlation whereas manager 17 has the smallest correlations. This is different from the friendship network where manager 5 and 17 are very close to the average on their correlations. The reason why the two networks are different is because in a company, people might be friends with their peers and seek or give advice from people not in the same level as them. Thus, this prevents them from having similar perception of how the social network looks like.

Considering Centrality

Next, we will investigate the correlation between various centrality measures and the union consensus network.

## Correlation with Degree Centrality: 0.214675
## Correlation with Betweennesss Centrality: 0.1479718
## Correlation with Closeness Centrality: 0.3286186
## Correlation with Eigenvector Centrality: 0.08114582

Analysis

Which centrality score of individuals in the consensus network are most highly correlated with their accuracy in predicting the consensus network? Based on the readings, suggest a rationale why individuals’ embeddedness or patterning of ties might result in different perceptions.

Closeness centrality score most highly correlate with the individuals’ accuracy in predicting the consensus network. Since sloseness centrality is defined as “a measure of the degree to which an individual is near all other individuals in a network”, if a person is close to all other individuals, he or she might be more able to observe the ties of the entire network.

Identifying Most and Least Similar Respondent Viewpoints

Next, we’ll run the QAP test on the individual advice/friendship networks. Take a look at your console output to answer this question.

## Proportion of draws which were >= observed value: 0
## Proportion of draws which were <= observed value: 1

Analysis

Which individual sees the two networks as the most similar? Which sees them as the least similar?

Individual 18 sees the network as the least similar because he or she has test statistics of 0.03. Whereas individual 16 sees the two networks as the most similar because he or she has test statistics of 0.47.

Submitting the Lab (5 pts)

After knitting your file to RPubs, copy the URL and paste it into the comment field of the Lab 2 Assignment on Canvas. Save this .Rmd file and submit it in the file portion of your Canvas assignment. Make sure to review your file and its formatting. Run spell check (built into RStudio) and proofread your answers before submitting.