Suppose you walked into a dining room that hosts a luncheon at a conference you are currently attending. What table would you sit at?
Network Analysis: Getting Started with the super basics
A set of nodes and relation(s) defined on them
Synonyms:
Term node is common in statistics and applied sciences outside of soc and psych.
Synonyms:
Ties can have characteristics:
Early Puzzles
Early Puzzles: Individuals inside social groups
Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization
Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization
Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization
Kathleen Carley, Another Early Puzzle (1980-90s): Group Stability and Organization
How can we capture these relationships? The Sociomatrix. example: PONIES
Ranks and Relationships in Highland Ponies and Highland Cows by Brock et. al 1976
Directed, targeted behavior
Undirected, mutual behavior
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)
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)
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)
Break-out groups interview
Step 1: A simple Data set
Step 2: A simple, undirected, sociomatrix
Dyads
Dyads
Dyads
Dyads
Dyads
Today: Systems (Dyads --> Networks)
Bearman, Moody and Stovel
Networks of Violence: Predicting Conflict in Nigeria by Dorff, Gallop, & Minhas
International Conflict Event Warning System (ICEWS): Material Conflict by Minhas, Hoff, & Ward
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:
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
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)
igraph
.Suppose you walked into a dining room that hosts a luncheon at a conference you are currently attending. What table would you sit at?
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 |