Beruflich Dokumente
Kultur Dokumente
With R
LJasny
1 University of Exeter
L.Jasny@exeter.ac.uk
Sunbelt XXXVI
Irvine, California; 5 April, 2016
1-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct
2-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct of nodes N
2-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct of nodes N
and edges E
2-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct of nodes N
and edges E that can
be directed
2-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct of nodes N
and edges E that can
be directed or
undirected.
2-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct of nodes N
and edges E that can
be directed or
undirected. We can
include information on
the nodes
2-47
Networks
With R
LJasny
Think Formally
Intro
Basic SNA
Measures A network is not just a
Graph Level metaphor: it is a
Indices
precise, mathematical
Simulation
construct of nodes N
and edges E that can
be directed or
undirected. We can
include information on
the nodes as well as
the edges.
2-47
Networks
With R
LJasny
Network Intuition
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
3-47
Networks
With R
LJasny
Network Intuition
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
3-47
Networks
With R
LJasny
Why network methods
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
4-47
Networks
With R
LJasny
Why network methods
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Cannot simply use existing statistical methods
4-47
Networks
With R
LJasny
Why network methods
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
4-47
Networks
With R
LJasny
Why network methods
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
• Want to explicitly model these interdependencies
4-47
Networks
With R
LJasny
The R Environment
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
5-47
Networks
With R
LJasny
The R Environment
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• R is both a language and a software platform
5-47
Networks
With R
LJasny
The R Environment
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• R is both a language and a software platform
• R software is open-source, cross-platform, and free
5-47
Networks
With R
LJasny
The R Environment
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• R is both a language and a software platform
• R software is open-source, cross-platform, and free
• Its home on the web: http://www.r-project.org
5-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
6-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
Simulation
6-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
6-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
6-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
6-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
6-47
Networks
With R
LJasny
Basics
Intro
Basic SNA
Measures
6-47
Networks
With R
LJasny
Fundamentals
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
Indices
Simulation
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
• R tries to interpret what you’ve asked it to do
Indices (evaluation)
Simulation
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
• R tries to interpret what you’ve asked it to do
Indices (evaluation)
Simulation • If it understands what you’ve written, it does it
(execution)
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
• R tries to interpret what you’ve asked it to do
Indices (evaluation)
Simulation • If it understands what you’ve written, it does it
(execution)
• If it doesn’t, it will likely give you an error or a warning
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
• R tries to interpret what you’ve asked it to do
Indices (evaluation)
Simulation • If it understands what you’ve written, it does it
(execution)
• If it doesn’t, it will likely give you an error or a warning
• Some commands trigger R to print to the screen, others
don’t
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
• R tries to interpret what you’ve asked it to do
Indices (evaluation)
Simulation • If it understands what you’ve written, it does it
(execution)
• If it doesn’t, it will likely give you an error or a warning
• Some commands trigger R to print to the screen, others
don’t
• If you type an incomplete command, R will usually
respond by changing the command prompt to the ‘+’
character
7-47
Networks
With R
LJasny
Fundamentals
Intro
• When you type commands at the prompt ‘>’ and hit
Basic SNA
Measures
ENTER
Graph Level
• R tries to interpret what you’ve asked it to do
Indices (evaluation)
Simulation • If it understands what you’ve written, it does it
(execution)
• If it doesn’t, it will likely give you an error or a warning
• Some commands trigger R to print to the screen, others
don’t
• If you type an incomplete command, R will usually
respond by changing the command prompt to the ‘+’
character
• Hit ESC on a Mac to cancel
• Type in Ctrl + C on Windows and Linux to cancel
7-47
Networks
With R
LJasny
Data Structures in R
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
8-47
Networks
With R
LJasny
Data Structures in R
Intro
Graph Level
Indices
Simulation
8-47
Networks
With R
LJasny
Data Structures in R
Intro
Simulation
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Data Structures in R
Intro
8-47
Networks
With R
LJasny
Vectors
Graph Level
Indices
Simulation
9-47
Networks
With R
LJasny
Vectors
Graph Level
Indices
Simulation
1 2 3 4
• Vectors are indexed starting at 1
9-47
Networks
With R
LJasny
Vectors
Graph Level
Indices
Simulation
1 2 3 4 n
• Vectors are indexed starting at 1
• A vector of length n has n cells
9-47
Networks
With R
LJasny
Vectors
Graph Level
Indices
Simulation
1 2 3 4 n
• Vectors are indexed starting at 1
• A vector of length n has n cells
• Each cell can hold a single value
9-47
Networks
With R
LJasny
Vectors
Graph Level
Indices
Simulation
1 2 3 4 n
• Vectors are indexed starting at 1
• A vector of length n has n cells
• Each cell can hold a single value
• Vectors can only store data of the same type – either all
strings or all numerical but not both
9-47
Networks
With R
LJasny
Working with Vectors in R
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
10-47
Networks
With R
LJasny
Working with Vectors in R
Intro
Basic SNA
Measures
Graph Level
Indices • We index vectors in R using “square bracket notation”
Simulation
10-47
Networks
With R
LJasny
Working with Vectors in R
Intro
Basic SNA
Measures
Graph Level
Indices • We index vectors in R using “square bracket notation”
Simulation
• Example:
• you have a vector of numeric values called testScores
10-47
Networks
With R
LJasny
Working with Vectors in R
Intro
Basic SNA
Measures
Graph Level
Indices • We index vectors in R using “square bracket notation”
Simulation
• Example:
• you have a vector of numeric values called testScores
• To retrieve the value in the third cell, type
testScores[3]
10-47
Networks
With R
LJasny
Working with Vectors in R
Intro
Basic SNA
Measures
Graph Level
Indices • We index vectors in R using “square bracket notation”
Simulation
• Example:
• you have a vector of numeric values called testScores
• To retrieve the value in the third cell, type
testScores[3]
• To retrieve all BUT the third value, type
testScoress[-3]
10-47
Networks
With R
LJasny
Two-dimensional data in R
Intro
Basic SNA
Measures
• Most (all?) of us are familiar with two-dimensional
Graph Level
Indices data like that in spreadsheets
Simulation
11-47
Networks
With R
LJasny
Two-dimensional data in R
Intro
Basic SNA
Measures
• Most (all?) of us are familiar with two-dimensional
Graph Level
Indices data like that in spreadsheets
Simulation
• R has two built-in data structures for storing
two-dimensional data
11-47
Networks
With R
LJasny
Two-dimensional data in R
Intro
Basic SNA
Measures
• Most (all?) of us are familiar with two-dimensional
Graph Level
Indices data like that in spreadsheets
Simulation
• R has two built-in data structures for storing
two-dimensional data
• Matrices
11-47
Networks
With R
LJasny
Two-dimensional data in R
Intro
Basic SNA
Measures
• Most (all?) of us are familiar with two-dimensional
Graph Level
Indices data like that in spreadsheets
Simulation
• R has two built-in data structures for storing
two-dimensional data
• Matrices
• Data Frames
11-47
Networks
With R
LJasny
Two-dimensional data in R
Intro
Basic SNA
Measures
• Most (all?) of us are familiar with two-dimensional
Graph Level
Indices data like that in spreadsheets
Simulation
• R has two built-in data structures for storing
two-dimensional data
• Matrices
• Data Frames
• In most instances, they behave the same
11-47
Networks
With R
LJasny
Two-dimensional data in R
Intro
Basic SNA
Measures
• Most (all?) of us are familiar with two-dimensional
Graph Level
Indices data like that in spreadsheets
Simulation
• R has two built-in data structures for storing
two-dimensional data
• Matrices
• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a data
frame
11-47
Networks
With R
LJasny
Matrices versus data frames in R
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
12-47
Networks
With R
LJasny
Matrices versus data frames in R
Intro
Basic SNA
Measures
Graph Level
Indices • Matrices can only store data of one type
Simulation
12-47
Networks
With R
LJasny
Matrices versus data frames in R
Intro
Basic SNA
Measures
Graph Level
Indices • Matrices can only store data of one type
Simulation • Either all strings or all numbers, but not both
12-47
Networks
With R
LJasny
Matrices versus data frames in R
Intro
Basic SNA
Measures
Graph Level
Indices • Matrices can only store data of one type
Simulation • Either all strings or all numbers, but not both
• If you try to give it multiple types, R converts
everything to string format
12-47
Networks
With R
LJasny
Matrices versus data frames in R
Intro
Basic SNA
Measures
Graph Level
Indices • Matrices can only store data of one type
Simulation • Either all strings or all numbers, but not both
• If you try to give it multiple types, R converts
everything to string format
• Data frames can store data of multiple types
12-47
Networks
With R
LJasny
Matrices versus data frames in R
Intro
Basic SNA
Measures
Graph Level
Indices • Matrices can only store data of one type
Simulation • Either all strings or all numbers, but not both
• If you try to give it multiple types, R converts
everything to string format
• Data frames can store data of multiple types
• Ideal for classical data analysis where you might have a
mix of numerical and string data
12-47
Networks
With R
LJasny
Working with matrices
Graph Level
2331 Josh 44 M R 2008
Indices 1989 Mark 40 M R 2010
Simulation 2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
13-47
Networks
With R
LJasny
Working with matrices
Graph Level
2331 Josh 44 M R 2008
Indices 1989 Mark 40 M R 2010
Simulation 2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
13-47
Networks
With R
LJasny
Working with matrices
Graph Level
2331 Josh 44 M R 2008
Indices 1989 Mark 40 M R 2010
Simulation 2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
13-47
Networks
With R
LJasny
Working with matrices
Graph Level
2331 Josh 44 M R 2008
Indices 1989 Mark 40 M R 2010
Simulation 2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
13-47
Networks
With R
LJasny
Working with data frames
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
14-47
Networks
With R
LJasny
Working with data frames
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Square bracket notation works for data frames as well
14-47
Networks
With R
LJasny
Working with data frames
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Square bracket notation works for data frames as well
• Data frames provide another option: dollar sign
notation
14-47
Networks
With R
LJasny
Working with data frames
Intro
Basic SNA
id name age sex handed lastDocVisit
Measures 5012 Danielle 44 F R 2012
Graph Level
Indices
2331 Josh 44 M R 2008
Simulation 1989 Mark 40 M R 2010
2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
15-47
Networks
With R
LJasny
Working with data frames
Intro
Basic SNA
id name age sex handed lastDocVisit
Measures 5012 Danielle 44 F R 2012
Graph Level
Indices
2331 Josh 44 M R 2008
Simulation 1989 Mark 40 M R 2010
2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
15-47
Networks
With R
LJasny
Working with data frames
Intro
Basic SNA
id name age sex handed lastDocVisit
Measures 5012 Danielle 44 F R 2012
Graph Level
Indices
2331 Josh 44 M R 2008
Simulation 1989 Mark 40 M R 2010
2217 Emma 32 F L 2012
2912 Sarah 33 F R 2011
15-47
Networks
With R
LJasny
Code Time
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Sections 1 and 2
16-47
Networks
With R
LJasny
Basic SNA Measures
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
17-47
Networks
With R
LJasny
Network Objects
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
18-47
Networks
With R
LJasny
Network Objects
• stores an adjacency matrix or an edgelist as well as
Intro
metadata
Basic SNA
Measures
Graph Level
Indices
Simulation
18-47
Networks
With R
LJasny
Network Objects
• stores an adjacency matrix or an edgelist as well as
Intro
metadata
Basic SNA
Measures • vertex, edge, and network attributes
Graph Level
Indices
Simulation
18-47
Networks
With R
LJasny
Network Objects
• stores an adjacency matrix or an edgelist as well as
Intro
metadata
Basic SNA
Measures • vertex, edge, and network attributes
Graph Level • can use square-bracket notation just like a matrix
Indices
Simulation
18-47
Networks
With R
LJasny
Network Objects
• stores an adjacency matrix or an edgelist as well as
Intro
metadata
Basic SNA
Measures • vertex, edge, and network attributes
Graph Level • can use square-bracket notation just like a matrix
Indices
Simulation
18-47
Networks
With R
LJasny
Descriptives
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
19-47
Networks
With R
LJasny
Descriptives
Intro
Basic SNA
Measures
Graph Level
Indices
19-47
Networks
With R
LJasny
Descriptives
Intro
Basic SNA
Measures
Graph Level
Indices
19-47
Networks
With R
LJasny
Descriptives
Intro
Basic SNA
Measures
Graph Level
Indices
19-47
Networks
With R
LJasny
Descriptives
Intro
Basic SNA
Measures
Graph Level
Indices
19-47
Networks
With R
LJasny
Descriptives
Intro
Basic SNA
Measures
Graph Level
Indices
19-47
Networks
With R
LJasny
Degree
Graph Level
Indices
Simulation
20-47
Networks
With R
LJasny
Degree
Graph Level
Indices
Simulation
20-47
Networks
With R
LJasny
Degree
Simulation
20-47
Networks
With R
LJasny
Degree
Simulation
20-47
Networks
With R
LJasny
Degree
Simulation
20-47
Networks
With R
LJasny
Degree
Simulation
20-47
Networks
With R
LJasny
Degree
Simulation
20-47
Networks
With R
LJasny
Degree
Simulation
20-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
Indices
Simulation
A D
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
Simulation
A D
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
A D
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B
A D
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B • B has 1 outdegree
A D
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B • B has 1 outdegree and 3
indegree
A D
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B • B has 1 outdegree and 3
indegree
A D • C has 2 outdegree
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B • B has 1 outdegree and 3
indegree
A D • C has 2 outdegree and 1
indegree
C
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B • B has 1 outdegree and 3
indegree
A D • C has 2 outdegree and 1
indegree
C
• D has 1 outdegree
21-47
Networks
With R
LJasny
Directed Degree
Intro
Graph Level
• Indegree indicates the number of received ties
Indices
• Outdegree indicates the number of sent ties
Simulation
• A has 1 outdegree
B • B has 1 outdegree and 3
indegree
A D • C has 2 outdegree and 1
indegree
C
• D has 1 outdegree and 1
indegree
21-47
Networks
With R
LJasny
Betweenness Centrality
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
Proportion of
shortest paths
that the given
node lies on
22-47
Networks
With R
LJasny
Betweenness Centrality
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
Proportion of
shortest paths
that the given
node lies on
22-47
Networks
With R
LJasny
Betweenness Centrality
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
Proportion of
shortest paths
that the given
node lies on
22-47
Networks
With R
LJasny
Additional Centrality Measures
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
23-47
Networks
With R
LJasny
Additional Centrality Measures
Intro
Basic SNA
Measures
Graph Level
Indices • Closeness: the sum of the distances to all other nodes
Simulation
in the network
23-47
Networks
With R
LJasny
Additional Centrality Measures
Intro
Basic SNA
Measures
Graph Level
Indices • Closeness: the sum of the distances to all other nodes
Simulation
in the network
• Eigenvector: an iterated measure where nodes have
higher eigenvector centrality if they are tied to nodes
with high eigenvector centrality
23-47
Networks
With R
LJasny
Additional Centrality Measures
Intro
Basic SNA
Measures
Graph Level
Indices • Closeness: the sum of the distances to all other nodes
Simulation
in the network
• Eigenvector: an iterated measure where nodes have
higher eigenvector centrality if they are tied to nodes
with high eigenvector centrality
• Many, many others
23-47
Networks
With R
LJasny
Graph Level Indices
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
24-47
Networks
With R
LJasny
Density
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
25-47
Networks
With R
LJasny
Density
Intro
• Number of ties, expressed as a percentage of the
Basic SNA
Measures number of possible ties
Graph Level
Indices
Simulation
25-47
Networks
With R
LJasny
Density
Intro
• Number of ties, expressed as a percentage of the
Basic SNA
Measures number of possible ties
Graph Level
Indices E
• For directed graphs:
Simulation N (N −1)
25-47
Networks
With R
LJasny
Density
Intro
• Number of ties, expressed as a percentage of the
Basic SNA
Measures number of possible ties
Graph Level
Indices E
• For directed graphs:
Simulation N (N −1)
E
N (N −1)
• For undirected graphs:
2
25-47
Networks
With R
LJasny
Density
Intro
• Number of ties, expressed as a percentage of the
Basic SNA
Measures number of possible ties
Graph Level
Indices E
• For directed graphs:
Simulation N (N −1)
E
N (N −1)
• For undirected graphs:
2
1 3
25-47
Networks
With R
LJasny
Density
Intro
• Number of ties, expressed as a percentage of the
Basic SNA
Measures number of possible ties
Graph Level
Indices E
• For directed graphs:
Simulation N (N −1)
E
N (N −1)
• For undirected graphs:
2
2
2
3(3−1) 4
= 2 = 6
1 3
25-47
Networks
With R
LJasny
Mean Degree
Intro
¯ of all nodes in the graph is
The mean degree, d,
Basic SNA
Measures
Graph Level
Indices
Simulation
1 3
26-47
Networks
With R
LJasny
Mean Degree
Intro
¯ of all nodes in the graph is
The mean degree, d,
Basic SNA
Measures
PN
¯ = i=1 d(ni )
Graph Level
2E
Indices
Simulation
d(n) N = N
1 3
26-47
Networks
With R
LJasny
Mean Degree
Intro
¯ of all nodes in the graph is
The mean degree, d,
Basic SNA
Measures
PN
¯ = i=1 d(ni )
Graph Level
2E
Indices
Simulation
d(n) N = N
1+2+1 4
= 3 = 3
1 3
26-47
Networks
With R
LJasny
Size, Density, and Mean Degree
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
If we hold the mean
degree constant, but
vary size, what
happens to density?
27-47
Networks
With R
LJasny
Size, Density, and Mean Degree
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
If we hold the mean
degree constant, but
vary size, what
happens to density?
27-47
Networks
With R
LJasny
Centralization
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
28-47
Networks
With R
LJasny
Centralization
Intro
Basic SNA
• Extent to which centrality is concentrated on a single
Measures
vertex
Graph Level
Indices
Simulation
28-47
Networks
With R
LJasny
Centralization
Intro
Basic SNA
• Extent to which centrality is concentrated on a single
Measures
vertex
Graph Level
Indices • Calculated as the sum of the differences between each
Simulation node’s centrality score and the maximum score
28-47
Networks
With R
LJasny
Centralization
Intro
Basic SNA
• Extent to which centrality is concentrated on a single
Measures
vertex
Graph Level
Indices • Calculated as the sum of the differences between each
Simulation node’s centrality score and the maximum score
• Most centralized structure is usually a star network
28-47
Networks
With R
LJasny
Dyad Census
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
29-47
Networks
With R
LJasny
Dyad Census
Intro
Basic SNA
Measures
Graph Level
Mutual (M)
Indices
Simulation
29-47
Networks
With R
LJasny
Dyad Census
Intro
Basic SNA
Measures
Graph Level
Mutual (M)
Indices
Simulation
Assymetric (A)
29-47
Networks
With R
LJasny
Dyad Census
Intro
Basic SNA
Measures
Graph Level
Mutual (M)
Indices
Simulation
Assymetric (A)
Null (N)
29-47
Networks
With R
LJasny
Reciprocity
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
30-47
Networks
With R
LJasny
Reciprocity
Intro
Basic SNA
Measures
Graph Level
Indices • Dyadic: the proportion of dyads that are symmetric
Simulation M +N
M +A+N
30-47
Networks
With R
LJasny
Reciprocity
Intro
Basic SNA
Measures
Graph Level
Indices • Dyadic: the proportion of dyads that are symmetric
Simulation M +N
M +A+N
• Dyadic non-null: the proportion of non-null dyads that
M
are reciprocal
M +A
30-47
Networks
With R
LJasny
Reciprocity
Intro
Basic SNA
Measures
Graph Level
Indices • Dyadic: the proportion of dyads that are symmetric
Simulation M +N
M +A+N
• Dyadic non-null: the proportion of non-null dyads that
M
are reciprocal
M +A
2∗M
• Edgewise:
2∗M +A
30-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
31-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
31-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures 16 different triad types
Graph Level
Indices
One row per network
Simulation
32-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures 16 different triad types
Graph Level
Indices
One row per network
32-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
33-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures
Graph Level
Indices
33-47
Networks
With R
LJasny
Triad Census
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
Friendship, Assistance
33-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
2
1 3
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
2
1 3
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
2
1 3
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
2
1 3
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
2 • Usually calculated as the
Simulation
fraction of completed
two-paths
1 3
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
2 • Usually calculated as the
Simulation
fraction of completed
two-paths
• Related to Grannovetter’s
1 3 ‘forbidden triad’
34-47
Networks
With R
LJasny
Transitivity
Intro
Basic SNA
Measures
Graph Level
Indices
2 • Usually calculated as the
Simulation
fraction of completed
two-paths
• Related to Grannovetter’s
1 3 ‘forbidden triad’
• Can be directed or undirected
34-47
Networks
With R
LJasny
Example
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
35-47
Networks
With R
LJasny
Code Time
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• Section 3-4.7
36-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
37-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• A probability
distribution for a
success/failure
37-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
• A probability
distribution for a
success/failure
• Best known example is
the coin flip
37-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Bernoulli ‘Random’ Graphs
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
38-47
Networks
With R
LJasny
Small Worlds
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
39-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
40-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
40-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
40-47
Networks
With R
LJasny
Clustering Coefficient and
Diameter
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
41-47
Networks
With R
LJasny
Clustering Coefficient and
Diameter
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
41-47
Networks
With R
LJasny
Clustering Coefficient and
Diameter
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
41-47
Networks
With R
LJasny
Clustering Coefficient
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
42-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices • high clustering
Simulation coefficient
• low diameter
43-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
• high clustering
Simulation
coefficient
• low diameter
• starts with a
lattice structure
43-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
• high clustering
Simulation
coefficient
• low diameter
• starts with a
lattice structure
• randomly
re-wires ties
43-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
44-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
45-47
Networks
With R
LJasny
Watts-Strogatz Model
Intro
Basic SNA
Measures
Graph Level
Indices
46-47
Networks
With R
LJasny
Code Time
Intro
Basic SNA
Measures
Graph Level
Indices
Simulation
47-47