Lab 2: QAP, CSS & Structural Equivalence

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

Jue Wu

2017-11-01

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

V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V20 V21
V1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0
V2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1
V3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
V4 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0
V5 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0
V6 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0
V7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V8 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
V9 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0
V10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V11 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
V12 1 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0
V13 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
V14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V15 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
V16 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V17 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
V18 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
V19 0 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0
V20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V21 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 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

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? The row LAS network captures each individual’s response on “who do you friend with?”; the direction is from the sender to the receiver and it is from the sender’s perspective. Similarly, the column LAS network captures each individual’s response on “who friends with you?”; the direction is from the receiver to the sender and it is from the receiver’s perspective. The advantage of using this method is that it can reduce the enormous three-dimensional data in CSS into two-dimensional data, therefore it is easier for analysis. The disadvantage is that it’s possible that A thinks he is a friend of B but B does not think so, therefore only looking at one of these networks will not give us a good understanding of the relationship. # 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? The intersection method captures a relationship tie when bothe the sender and the receiver think the tie exists. It doesn’t matter whether other people think. The advantage is this allows us to tell whether the sender and the receiver both think the relaitonship exists. The disvantage is that because it only captures relational ties that are reported by both the sender and the receiver, this will ignore a lot of information that is not agreed by both but might still be useful. As we see here, there are lots of 0s. # 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? The union method captures ties that either the sender or the receiver think exist. The advantage is that it captures some of the one-way relation that is not captured in the consensus method, and those might be interesting to look at and give us some information in terms of how frienship network forms. The disadvantage is that a relational tie can exist in this case if one of the sender or receiver does not think they are friends, therefore it is hard for us to tell the accuracy. # 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? The median measure captures relational ties based on the median of all the actor’s perception of a relational tie. Since the friendship network is binary, an 1 in the median network means that at least half of the respondents think the tie exists. The advantage is it takes information from all the respondents and captures whether most people think they are friends. The disadvantage is that a friendship tie can exist even if neither sender nor receiver thinks it exists but most people in the network do. 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. Actors 1, 2, 5, 6, 11, 14, 19, 21 seem to be very popular in the network. Interestingly, a lot of the relational ties are only one-way in the union network. This means that some people think they are friends with someone but “his friends” don’t think so. For example, actors 15, 11, 21, 17 think they are friends with actor 14; but 14 doesn’t think so.
Friendship, Row.

Friendship, Row.

Analysis

Describe what this network shows in your own words. This LAS network shows each respondent’s answer to the questions “who do you friend with”. In other words, the network shows us whether one think he or she friends with someone from each respondent’s own perspective. Actor 11 thinks he friends with a lot of people, but only actor 3 thinks so among who actor 11 thinks are his friends. Several people think they are friends with actor 2, but actor 2 thinks he or she is only friend of actors 7 and 21. Both actors 18 and 20 think they friend with no one. What are the relevant similiarities and differences between the two networks? What do they mean? Actors 1, 2, 5, 6, 11, 14, 19, 21 appear to be the most popular ones in both networks. They have most links in both. However, some actors have fewer links in the row LAS than in the union measure. For instance, actor 20 has two links in the union measure but has no link at all in the row LAS network. This means that actor 20 doesn’t think he friends with anybody, but actor 15 thinks he makes friends with actor 20 and actor 3 thinks actor 20 comes to him for friendship. Similarly, actor 13 has three ties in the union measure, but he or she has only one tie in the row LAS network. This suggests that actors 4 and 7 don’t think they are friends with actor 13, but actor 13 thinks actors 4 and 7 come to make friends with him. # 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 <- 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 that a lot of people go to actor 2, 14, 19, 21 for advice from both the sender’s and the receiver’s perspectives. Among those who go to actor 2 for advice, actor 2 also goes to several of them for advice. This suggests the reciprocity of advice network. Actor 11 goes to a lot of people for advice, while among them only actors 5 and 8 go to actor 11 for advice. Also, actor 18 thinks he is isolated—he never goes to someone else for advice and nobody comes to him for advice.
Advice, Median.

Advice, Median.

Analysis

Describe what this network shows in your own words. This shows that from more than half of the people in this nework think actors 20 and 18 are isolated—they never go to someone else for advice and they also never provide advice to someone else. Similarly, more than half of the people in this network think several people go to actors 2, 5, 14, 19 for advice, suggesting that they might be better in mentoring and helping others. Most people also think actor 11 goes to others for advice a lot, suggesting that he is good at seeking for advice. What are the relevant similiarities and differences between the two networks? What do they mean? In both networks, actors 2, 14, 19 appear to the ones that several people go to for advice. This means that not only these people themselves, but also the majority of the people in this network think that they are good in providing advice. Similarly, actor 18 appear to be isolated in both cases, suggesting that not only himself but also most people in the network think he is isolated. However, actor 20 thinks actor 15 comes to him for advice and he goes to actor 3 for advice, but most people don’t think so. Taken together, the results may suggest that most people are in aggrement in terms of who are popular in the network, but the opinion from majority and the opinion from the actor himself may differ when it comes to the one who is relatively isolated # 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 to visualize actor 11’s responses for both friendship and advice networks. The reason I chose to visualize actor 11 is because he seems to be popular in both networks regardless of the different measures. I would guess that he might have a more accurate perception of both networks because he interacts a lot with others in both cases. Therefore, I would like to see whether the friendship and advice networks overlap from his own perspective. What do their networks show? Can you draw any conclusions about each actor’s role in the network? From actor 11’s perspective, actors 8, 10, 18 and 20 have a lot of friends but no link in the advice network. This may infer that actors 8, 10, 18 and 20 might be “mascots” of the company that many people love to be friend with them but few would go for advice for business purpose. Moreover, actor 11 thinks that the friendship network is denser than the advice network. This may suggest that actor 11 thinks a lot of people are friends with each other but they are not neccessarily partners for work. Furthermore, actor 11 goes to several people for advice, but he doesn’t think the ones he goes to advice for are the ones that he friends with. For instance, actors 6, 21, 13, 9, 16 are the ones that actor 11 thinks he goes to advice for, but none of them appear to be his friends in the friendship network. This suggests actor 11’s own friendship and advice networks do not overlap a lot. # 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 network shows the relational ties that exist in both the friendship and the advice networks. We can tell that the links are much fewer than previous networks, but there are still some links, which suggests the two networks do overlap to some extent. Actors 1, 14, 21 seem to be popular in the intersection network, meaning that they are popular in the network as both friends and as advice-givers. This visualization would be useful when we would like to see to what extent do the friendship and advice networks overlap.
# 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 would like to choose fr_intersection and ad_intersection. I woule like to see whether the actors who are structural equivalent in the frienship network are also structural equivalent in the advice network. This would give us information on the extent to which the roles of actors in the two networks overlap. # 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? The high values in this matrix mean that the two actors are more distant (less equivalent) in the structure, while the low values mean that the two actors are less distant (more towards equivalent) in the structure. 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. Friendship network has the smallest minimum distance between nodes, and that is between actors 18 and 10. This might because both 10 and 18 are isolated from the entire network, therefore they are most similar in terms of structural equivalence. Which network has the greatest maximum distance between nodes? Why might that be? Advice network has the greatest maximum distance bewteen nodes, and that is between actors 18 and 12. This might because the advice network is usually one-way, therefore the relation is passed onto one another and the structure of network becomes more different. Which network exhibits more structural equivalence? Friendship network exhibits more structural equivalence because the mean value is smaller. # 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.1639918 
##      1stQ:    -0.04389317 
##      Med:     0.004146261 
##      Mean:    5.089893e-05 
##      3rdQ:    0.04017584 
##      Max:     0.1842941

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. Actor 16 is most accurate and actor 1 is least accurate. # 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 result is significant because 0.70 is much larger than 0.3, which means if I would draw a vertical line it would be far on the right. The graph above tells us that most values would fall between -0.2 to 0.3. # Friendship Networks

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

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 from the friendship network is different from the results I had for the advice network. The reason why people may have more precise representation of one structure than the other might be that because these people are co-workers, some may not interact with each other besides their work. Therefore, the perception of friendship network might be less accurate for these people. However, there might be people who are active in both work and daily life and thus have a relatively more accurate perception of both networks. # 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 is most highly correlated with the consensus network. Individuals’ embeddedness or patterning of ties might result in different perceptions in that some relational ties can be transitive and thus the individuals’ perception might be influenced by the embeddedness of oneself. # 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? Actor 16 sees the two networks as the most similar, while actor 18 sees them as the least similar. # 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.