Lab 2: QAP, CSS & Structural Equivalence

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

Amber Johnson

2017-12-13

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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V2 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1
V3 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0
V4 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0
V5 0 0 1 0 0 0 0 0 0 1 0 0 0 0 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 1
V7 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V8 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
V9 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0
V10 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0
V11 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
V12 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1
V13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V16 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
V17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
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 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V20 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
V21 0 1 0 0 0 1 1 0 0 0 0 1 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.

## starting httpd help server ... done

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? #These networks do not conceptually differ, they create the matrix of relationships. Whereas Row1 describes actor 1’s relations, column 2 describes actor 2’s relations, including their perception of thie relation with actor 1.

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 captures the connection between one actors relationship perception and the other persons…The tie only exists if both parties agree that it exists. This method may yield a less dense and perhaps less ‘interesting’ network, but the network that is made can be considered more robust because it requires mutual ties/actor overlap in perception.

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? #IN a CSS reduction using the union method, a tie exists if one party OR another thinks that it exists. This is helpful to have slightly less strict criteria for the network.

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 uses the ‘median’ value to determine whether a tie exists. i.e. if more people in the network think that tie exists, it exists. If more think that it does not exist, it does not. This method seems to be one that values the wisdom of the crowd perspective more than the “closest is most accurate” kind of perspective. THis could perhaps be helpful if some network members had a vested interest in denying some of their ties, where many other members had high information on the ties and less incentive to mislead/misrepresent their networks (e.g. military extremists and their extended families … or something like that.)

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 aggregated network of all ties that have been indicated by all of the ego networks. If the network exists in any of the networks, it is included.
Friendship, Row.

Friendship, Row.

Analysis

Describe what this network shows in your own words. #This shows the friendship network from one ego network. If the relationship exists in the ego network of the actor in the row column, it exists in this network. What are the relevant similiarities and differences between the two networks? What do they mean? Some of the nodes (e.g. 20 and 17) have different connections (fewer) than the previous network. This could indicate differences in the perceived social structure of the actors describing the network.

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. #In an intersection network, the ties only exist if both parties agree that they exist. These ties are agreed upon by both parties in each relationship. In this network, both parties would have to agree about their advice relationship.
Advice, Median.

Advice, Median.

Analysis

Describe what this network shows in your own words. #In median networks, a tie exists if/the strength of the tie is determined by, the median response. That is to say, when you write out whether each actor’s network details a tie between actor i and j, if the median tie is a hit(1), there is a tie. If the tie is quantifiable, the tie strength could presumably be determined this way as well.

What are the relevant similiarities and differences between the two networks? What do they mean? #Again, some nodes are more isolated in the median network compared to the intersection network. Differences between this network and the previous one indicate that others who are weighing in on the network may have more liberal understandings of the relationships compared to those who are actually in them?

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 #20 and #11 to see the variance in the network. #20 is occassionally an isolate and occasionally included in the main component, so I thought it would be interesting to see their impression of the advice network. On the other hand, #11 is consistently well-connected in the networks we’ve reviewed.

What do their networks show? Can you draw any conclusions about each actor’s role in the network? # It is interesting because #20 has the impression that #18 is very well-connected and relied upon in the network, but they are not considred that way by most others. Indeed, #11 (a much more central node) considered #18 to be one of the least relied-upon actors. This shows how important an actor’s perspective and centrality is for understanding the roles of others in the network.

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 a fairly well-connected network. The number of ties is more moderate than some of the other networks would indicate. This suggests that friendship and advice is not wholly correlated, and also that this final intersection is probably cutting out a lot of the noise/variance in many of the individual ego 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. ad_union and fr_union seem like good choices for default analyses. Since there is no cutoff or threshold, they capture the most liberal, collective network we can make.

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

## starting httpd help server ... done

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? #In the Advice Network, we can understand low values to indicate near-perfect structural equivalence or closeness using the Eucledian distance metric. Inversely, high values indicate high structural equivalence or very little similarity in the network.

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 had the lowest value between nodes with 1 (vs. 4.47).

Which network has the greatest maximum distance between nodes? Why might that be? #The advice network has the greatest distance between nodes. This could be because there are some people who are very relied upon for advice and some who are not at all relied upon. This could create a larger range than friendship networks.

Which network exhibits more structural equivalence? #There is more equivalence in the friendship network (3.1 vs. 4). This means there is less variance in the equivalence in the friendship network than the advice network (for similar reasons as above)

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.1760016 
##      1stQ:    -0.03188332 
##      Med:     0.004146261 
##      Mean:    0.001468062 
##      3rdQ:    0.04017584 
##      Max:     0.1482646

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. # The highest accuracy was with actor #16 (.70) and the lowest accuracy was #18 with .39. This is particularly helpful information when compared to #18s positionality and large discrepancies in their network compared to the median/other networks.

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 correlation appears to be significant, according to the test statistics. The graph above shows how the test statistic of .28 would not be likely to be replicated by chance in the 1000 replications.The line would be drawn at the test statistic location of x = .28?

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 friendship network is fairly similar to the advice network, but slightly higher (.36). People are likely better at estimating friendships than advice because advice is a more intimate and potentially more secretive relationship.

Considering Centrality

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

## 
## Attaching package: 'igraph'
## The following objects are masked from 'package:sna':
## 
##     betweenness, bonpow, closeness, components, degree, dyad.census, evcent, hierarchy, is.connected, neighborhood, triad.census
## The following objects are masked from 'package:network':
## 
##     %c%, %s%, add.edges, add.vertices, delete.edges, delete.vertices, get.edge.attribute, get.edges, get.vertex.attribute,
##     is.bipartite, is.directed, list.edge.attributes, list.vertex.attributes, set.edge.attribute, set.vertex.attribute
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## The following object is masked from 'package:base':
## 
##     union
## 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 has the highest correlation with accuracy of predicting the median network. This is likely because people with high closeness centrality have access to information from all corners of the network and might be able to use their closeness to make better predictions/more accurate perceptions. # 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? #Most Similar #16 most similar (.47) #Least Similar #18 least similar (.03)

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.