+ - 0:00:00
Notes for current slide
Notes for next slide

Advanced Network Analysis

Olga Chyzh [www.olgachyzh.com]

1 / 45

Why Do We Need Network Analysis?

Suppose you walked into a dining room that hosts a luncheon at a conference you are currently attending. What table would you sit at?

2 / 45

Today's Class

Network Analysis: Getting Started with the super basics

  1. Definitions. What is network analysis?
  2. Network Science: Origins
  3. Network features and measurements
  4. Collecting network data
  5. What does this all mean for Political Science?
  6. Processing network data in R
3 / 45

Definitions. What Is Network Analysis?

4 / 45

What is a network (i.e., a graph)?

A set of nodes and relation(s) defined on them

5 / 45

Defining Network Features & Measurements: What's a node?

  • A node can be defined as an entity that can form relations with other entities.

Synonyms:

  • actor: from sociometry, common terminology in sociology and psychology
  • vertex: from graph theory (i.e., math), common terminology in mathematics and physics

Term node is common in statistics and applied sciences outside of soc and psych.

6 / 45

Examples of Nodes

  • Individuals (Mad Men characters, legislators)
  • Families (Padgett and Ansell's reading)
  • Human Rights NGOs
  • Countries
7 / 45

Defining Network Features & Measurements: What's a relation?

  • A relation/tie defines the existence of an attribute relating nodes.

Synonyms:

  • link: common in computer science (e.g., huge lit on “Link Prediction”) and social sciences
  • edge: graph theoretic terminology common in physics and math, but also elsewhere

Ties can have characteristics:

  • Weight
  • Qualitative attributes
  • Direction
8 / 45

Let's brainstorm ties to go with our nodes

  • Romantic relationship, marriage, friendship
  • Business relationship
  • Cooperation/conflict
9 / 45

Network Science: Origins

10 / 45

Origins and History of Network Analysis

Early Puzzles

  • Sociologists began using the term as early as 1887 and early 1990s
  • Emile Durkheim, Jacob Moreno, and later Harrison White (among others) were interested in understanding social patterns and the relations between members of a system.
    • How do people feel towards one another? Why might this matter?
11 / 45

Early study of network analysis

Early Puzzles: Individuals inside social groups

  • Example: In 1932 there was a pandemic of runaways at Brooklyn public and private schools: within two weeks 14 girls ran away, which was 30 times more than the average number
    • Moreno's finding: position in network predicted whether the girl would run away

12 / 45

Early study of network analysis

Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization

13 / 45

Early study of network analysis

Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization

  • Example: What makes a group stable? Application: founders/leaders of businesses
14 / 45

Early study of network analysis

Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization

  • Example: What makes a group stable? Application: founders/leaders of businesses
  • Shared knowledge between actors matters as much, if not more, than context for group stability
15 / 45

Early study of network analysis

Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization

  • Example: What makes a group stable? Application: founders/leaders of businesses
  • Shared knowledge between actors matters as much, if not more, than context for group stability
  • i.e., characteristics outside the group versus inside of the group
16 / 45

Defining Network Features & Measurements

How can we capture these relationships? The Sociomatrix. example: PONIES

Ranks and Relationships in Highland Ponies and Highland Cows by Brock et. al 1976

17 / 45

Sociomatrix: Pony threats

Directed, targeted behavior

18 / 45

Sociomatrix: Pony grooming

Undirected, mutual behavior

19 / 45

How might we look at this in R?

  • Our class has an R package that will contain all the datasets.

  • To load our class package (you have to do this each time you need to access the data):

library(devtools)
install_github("ochyzh/networkdata")
library(networkdata)
  • Now, load the specific dataset:
data(highlandPonies)
ponies<-as.matrix(highlandPonies[1:17, 2:18])

Create a graph object:

library(igraph)
pGraph <- graph_from_adjacency_matrix(ponies, weighted=TRUE, mode="undirected",
diag=FALSE)
20 / 45

Plot using the igraph package:

V(pGraph)$color <- ifelse(V(pGraph)$name %in% c("WT", "WH", "WS"), "azure1", "turquoise")
ponyPlot<- plot(pGraph,
edge.arrow.size=.2,
edge.color="black",
vertex.frame.color="black",
vertex.label=V(pGraph)$names,
vertex.label.color="black", layout=layout_with_fr,
edge.width=E(pGraph)$weight/5, edge.curved=.08)
21 / 45

Mutually supportive behavior between ponies

22 / 45

Other Examples of Neworks

  • Survey data (Mexico violence)
  • Text (co-occurrence matrices)
  • Event data (conflict between actors, shared behavior between actors)
  • Membership data (subcommittees)
23 / 45

Collecting network data

24 / 45

Activity 1: Build your own sociomatrix of shared experience

Break-out groups interview

  1. Brainstorm a question you can ask each member of the group.
  2. Keep the question simple yet specific enough to get variation in this small sample, i.e. "have you ever visited Texas" or "have you ever graphed a social network before?"
  3. Record this observational data where in each observation (person) is a row in the data and their response (the variable you measured) is a column.
  4. Now transform this data, with pen and pencil, into a sociomatrix.
25 / 45

Activity 1: Undirected sociomatrix of Shared Interests

Step 1: A simple Data set

Step 2: A simple, undirected, sociomatrix

26 / 45

Summary: data processing

27 / 45

Networks in Political Science

Dyads

  • Introduced by the use of dyads, largely in International Relations literature
28 / 45

Networks in Political Science

Dyads

  • Introduced by the use of dyads, largely in International Relations literature
  • Early work in IR focused on the behavior and policies of individual states (for example, Morgenthau 1948).
29 / 45

Networks in Political Science

Dyads

  • Introduced by the use of dyads, largely in International Relations literature
  • Early work in IR focused on the behavior and policies of individual states (for example, Morgenthau 1948).
  • Analysis of pairs of countries (trade, war, democracy, political ties).
30 / 45

Networks in Political Science

Dyads

  • Introduced by the use of dyads, largely in International Relations literature
  • Early work in IR focused on the behavior and policies of individual states (for example, Morgenthau 1948).
  • Analysis of pairs of countries (trade, war, democracy, political ties).
    • Example:
      • US-Iraq 2003: War
      • US-Iran 2003: No War
      • Iran-Iraq 2003: No War
31 / 45

Networks in Political Science

Dyads

  • Introduced by the use of dyads, largely in International Relations literature
  • Early work in IR focused on the behavior and policies of individual states (for example, Morgenthau 1948).
  • Analysis of pairs of countries (trade, war, democracy, political ties).
    • Example:
      • US-Iraq 2003: War
      • US-Iran 2003: No War
      • Iran-Iraq 2003: No War
32 / 45

This image again (or why logits are not who you think they are)

33 / 45

Networks in Political Science

Today: Systems (Dyads --> Networks)

  • Researchers recognize that dyads cannot be studied independently
  • Network analysis is seen in a wide variety of applications both within and beyond Political Science:
    • geography
    • spatial analysis
    • conflict studies
    • peer-networks
    • congressional voting
34 / 45

Network graphs can reveal important structures

35 / 45

Adolescent romantic and sexual networks

Bearman, Moody and Stovel

36 / 45

Adolescent Social Structure by Jim Moody

37 / 45

Adolescent Social Structure by Jim Moody

38 / 45

Networks of Violence in Nigeria

Networks of Violence: Predicting Conflict in Nigeria by Dorff, Gallop, & Minhas

39 / 45

Structures do hide in hairballs ...

International Conflict Event Warning System (ICEWS): Material Conflict by Minhas, Hoff, & Ward

40 / 45

Processing Network Data:

41 / 45

Dealing with Data

You might begin with either a matrix or information stored separately about edges and nodes. This depends on your data collection strategy.

Useful terminology for working in R:

  • Matrices: the adjacency matrix
  • Edges: linkages between actors or nodes
  • Vertices: nodes (or actors) in your system
42 / 45

How can we go beyond dyads?

How do we restructure a dyadic data frame such as alliances from COW into a matrix format?

data(defAlly)
head(defAlly)
## ccode1 ccode2 ij defAlly year
## 1 2 20 2_20 1 2012
## 2 2 31 2_31 0 2012
## 3 2 41 2_41 0 2012
## 4 2 42 2_42 0 2012
## 5 2 51 2_51 0 2012
## 6 2 52 2_52 0 2012
43 / 45

Your Turn (5 min)

Can you transform defAlly into a matrix form as shown below?

## 2 20 31 41 42 51 52 53 54 55 56 57 58 60 70 80 90 91 92 93
## 2 NA 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 20 1 NA 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 31 0 0 NA 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 41 0 0 0 NA 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 42 0 0 0 0 NA 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 51 0 0 0 0 0 NA 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 52 0 0 0 0 0 0 NA 0 0 0 0 0 0 0 0 0 0 0 0 0
## 53 0 0 0 0 0 0 0 NA 1 1 1 1 1 1 0 0 0 0 0 0
## 54 0 0 0 0 0 0 0 1 NA 1 1 1 1 1 0 0 0 0 0 0
## 55 0 0 0 0 0 0 0 1 1 NA 1 1 1 1 0 0 0 0 0 0
## 56 0 0 0 0 0 0 0 1 1 1 NA 1 1 1 0 0 0 0 0 0
## 57 0 0 0 0 0 0 0 1 1 1 1 NA 1 1 0 0 0 0 0 0
## 58 0 0 0 0 0 0 0 1 1 1 1 1 NA 1 0 0 0 0 0 0
## 60 0 0 0 0 0 0 0 1 1 1 1 1 1 NA 0 0 0 0 0 0
## 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NA 0 0 0 0 0
## 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NA 0 0 0 0
## 90 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NA 0 0 0
## 91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NA 0 0
## 92 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NA 0
## 93 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NA

(Hint the spread function from the tidyr package might be useful ... also easy to do with a for loop)

44 / 45

What We've Learned So Far

  • Network analysis has applications to many fields, from animal science to economics and political science.
  • Network data are most often stored as a sociomatrix.
  • Networks may contain important structures that are missed if treated as dyadic data.
  • Network data are easily visualized using igraph.
  • Convert long-form (dyadic) data into a matrix in R.
45 / 45

Why Do We Need Network Analysis?

Suppose you walked into a dining room that hosts a luncheon at a conference you are currently attending. What table would you sit at?

2 / 45
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow