introduction to social network analysis in rstatnet.org/workshops/introtosnainr.pdfintroduction to...
Post on 25-Jun-2020
12 Views
Preview:
TRANSCRIPT
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
1-133
Introduction to Social Network Analysis inR
Lorien Jasny1
1Q-Step Centre, Exeter Universityl.jasny@exeter.ac.uk
Sunbelt XXXVIII, Utrecht University26 June 2018
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct
of nodes(vertices, actors) N andedges (ties, relations) Ethat can be directed orundirected. We caninclude information(attributes) on thenodes as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct of nodes(vertices, actors) N
andedges (ties, relations) Ethat can be directed orundirected. We caninclude information(attributes) on thenodes as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct of nodes(vertices, actors) N andedges (ties, relations) E
that can be directed orundirected. We caninclude information(attributes) on thenodes as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct of nodes(vertices, actors) N andedges (ties, relations) Ethat can be directed
orundirected. We caninclude information(attributes) on thenodes as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct of nodes(vertices, actors) N andedges (ties, relations) Ethat can be directed orundirected.
We caninclude information(attributes) on thenodes as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct of nodes(vertices, actors) N andedges (ties, relations) Ethat can be directed orundirected. We caninclude information(attributes) on thenodes
as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
2-133
Think Formally
A network is not just ametaphor: it is aprecise, mathematicalconstruct of nodes(vertices, actors) N andedges (ties, relations) Ethat can be directed orundirected. We caninclude information(attributes) on thenodes as well as theedges.
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
3-133
Network Intuition
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
3-133
Network Intuition
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
4-133
Why network methods
• We need a new language to describe what’s going on
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
• Want to explicitly model these interdependencies
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
4-133
Why network methods
• We need a new language to describe what’s going on
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
• Want to explicitly model these interdependencies
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
4-133
Why network methods
• We need a new language to describe what’s going on
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
• Want to explicitly model these interdependencies
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
4-133
Why network methods
• We need a new language to describe what’s going on
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
• Want to explicitly model these interdependencies
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
4-133
Why network methods
• We need a new language to describe what’s going on
• Cannot simply use existing statistical methods
• The whole point is that observations are interdependent
• Want to explicitly model these interdependencies
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1
- 1 0 0 1 0
n2
0 - 1 1 0 0
n3
0 1 - 0 0 0
n4
0 0 0 - 1 0
n5
0 0 0 0 - 1
n6
0 1 0 0 0 -
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1
- 1 0 0 1 0
n2
0 - 1 1 0 0
n3
0 1 - 0 0 0
n4
0 0 0 - 1 0
n5
0 0 0 0 - 1
n6
0 1 0 0 0 -
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1
-
1
0 0 1 0
n2
0 - 1 1 0 0
n3
0 1 - 0 0 0
n4
0 0 0 - 1 0
n5
0 0 0 0 - 1
n6
0 1 0 0 0 -
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1
-
1
0 0
1
0
n2
0 - 1 1 0 0
n3
0 1 - 0 0 0
n4
0 0 0 - 1 0
n5
0 0 0 0 - 1
n6
0 1 0 0 0 -
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1
-
1
0 0
1
0
n2
0 -
1 1
0 0
n3
0
1
- 0 0 0
n4
0 0 0 -
1
0
n5
0 0 0 0 -
1n6
0
1
0 0 0 -
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1 - 1
0 0
1
0
n2
0
- 1 1
0 0
n3
0
1 -
0 0 0
n4
0 0 0
- 1
0
n5
0 0 0 0
- 1n6
0
1
0 0 0
-
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
5-133
Data Structures
n1 n2 n3 n4 n5 n6n1 - 1 0 0 1 0n2 0 - 1 1 0 0n3 0 1 - 0 0 0n4 0 0 0 - 1 0n5 0 0 0 0 - 1n6 0 1 0 0 0 -
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
6-133
Data Structures
Sender Receiver Weight
n1 n2 1n1 n5 1n2 n3 1n2 n6 1n3 n2 1n4 n5 1n5 n6 1n6 n2 1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
6-133
Data Structures
Sender Receiver Weight
n1 n2 1n1 n5 1n2 n3 1n2 n6 1n3 n2 1n4 n5 1n5 n6 1n6 n2 1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
6-133
Data Structures
Sender Receiver Weightn1 n2 1
n1 n5 1n2 n3 1n2 n6 1n3 n2 1n4 n5 1n5 n6 1n6 n2 1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
6-133
Data Structures
Sender Receiver Weightn1 n2 1n1 n5 1n2 n3 1n2 n6 1n3 n2 1n4 n5 1n5 n6 1n6 n2 1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
7-133
The R Environment
• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
7-133
The R Environment
• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
7-133
The R Environment
• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
7-133
The R Environment
• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable• You can write your own custom functions• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable• You can write your own custom functions• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable
• You can write your own custom functions• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable• You can write your own custom functions
• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable• You can write your own custom functions• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable• You can write your own custom functions• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
8-133
Basics
• R uses a command-like environment, like stata or sas
• R is highly extendable• You can write your own custom functions• There are 6000 free add-on packages
• Generally good at reading in/writing out other fileformats
• Everything in R is an object – data, functions,everything
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
9-133
Fundamentals
• When you type commands at the prompt ‘>’ and hitENTER
• R tries to interpret what you’ve asked it to do(evaluation)
• 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, othersdon’t
• If you type an incomplete command, R will usuallyrespond 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)
• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)
• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:
• Numeric (integers, numbers, etc.)• 12• 3.14
• Strings (alphanumeric characters in quotation marks)
• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)
• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)
• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)
• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures
• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures• Vectors
• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures• Vectors• Matrices
• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames
• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
10-133
Data Structures in R
• R has several built-in data types and structures
• Common data types:• Numeric (integers, numbers, etc.)
• 12• 3.14
• Strings (alphanumeric characters in quotation marks)• “hello”• “3.14”
• Common data structures• Vectors• Matrices• Data Frames• Network objects
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
11-133
Vectors
A vector is a one-dimensional data structure
n1 2 3 4
• 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 allstrings or all numerical but not both
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
11-133
Vectors
A vector is a one-dimensional data structure
n
1 2 3 4
• 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 allstrings or all numerical but not both
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
11-133
Vectors
A vector is a one-dimensional data structure
n1 2 3 4
• 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 allstrings or all numerical but not both
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
11-133
Vectors
A vector is a one-dimensional data structure
n1 2 3 4
• 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 allstrings or all numerical but not both
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
11-133
Vectors
A vector is a one-dimensional data structure
n1 2 3 4
• 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 allstrings or all numerical but not both
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
12-133
Working with Vectors in R
• We index vectors in R using “square bracket notation”
• Example:• you have a vector of numeric values called testScores• To retrieve the value in the third cell, typetestScores[3]
• To retrieve all BUT the third value, typetestScoress[-3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
12-133
Working with Vectors in R
• We index vectors in R using “square bracket notation”
• Example:• you have a vector of numeric values called testScores• To retrieve the value in the third cell, typetestScores[3]
• To retrieve all BUT the third value, typetestScoress[-3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
12-133
Working with Vectors in R
• We index vectors in R using “square bracket notation”
• Example:• you have a vector of numeric values called testScores
• To retrieve the value in the third cell, typetestScores[3]
• To retrieve all BUT the third value, typetestScoress[-3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
12-133
Working with Vectors in R
• We index vectors in R using “square bracket notation”
• Example:• you have a vector of numeric values called testScores• To retrieve the value in the third cell, typetestScores[3]
• To retrieve all BUT the third value, typetestScoress[-3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
12-133
Working with Vectors in R
• We index vectors in R using “square bracket notation”
• Example:• you have a vector of numeric values called testScores• To retrieve the value in the third cell, typetestScores[3]
• To retrieve all BUT the third value, typetestScoress[-3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
13-133
Two-dimensional data in R
• Most (all?) of us are familiar with two-dimensionaldata like that in spreadsheets
• R has two built-in data structures for storingtwo-dimensional data
• Matrices• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a dataframe
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
13-133
Two-dimensional data in R
• Most (all?) of us are familiar with two-dimensionaldata like that in spreadsheets
• R has two built-in data structures for storingtwo-dimensional data
• Matrices• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a dataframe
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
13-133
Two-dimensional data in R
• Most (all?) of us are familiar with two-dimensionaldata like that in spreadsheets
• R has two built-in data structures for storingtwo-dimensional data
• Matrices
• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a dataframe
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
13-133
Two-dimensional data in R
• Most (all?) of us are familiar with two-dimensionaldata like that in spreadsheets
• R has two built-in data structures for storingtwo-dimensional data
• Matrices• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a dataframe
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
13-133
Two-dimensional data in R
• Most (all?) of us are familiar with two-dimensionaldata like that in spreadsheets
• R has two built-in data structures for storingtwo-dimensional data
• Matrices• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a dataframe
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
13-133
Two-dimensional data in R
• Most (all?) of us are familiar with two-dimensionaldata like that in spreadsheets
• R has two built-in data structures for storingtwo-dimensional data
• Matrices• Data Frames
• In most instances, they behave the same
• Most functions will accept either a matrix or a dataframe
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
14-133
Matrices versus data frames in R
• Matrices can only store data of one type• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
14-133
Matrices versus data frames in R
• Matrices can only store data of one type
• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
14-133
Matrices versus data frames in R
• Matrices can only store data of one type• Either all strings or all numbers, but not both
• If you try to give it multiple types, R convertseverything 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
14-133
Matrices versus data frames in R
• Matrices can only store data of one type• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
14-133
Matrices versus data frames in R
• Matrices can only store data of one type• 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 amix of numerical and string data
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
14-133
Matrices versus data frames in R
• Matrices can only store data of one type• 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
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
15-133
Working with matrices
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• Can also use “square bracket notation”
• Inside the square brackets, the first position refers tothe row(s) and the second to the column(s)
• If this matrix is called friendSurvey, the command toretrieve Josh’s age is friendSurvey[2,3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
15-133
Working with matrices
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• Can also use “square bracket notation”
• Inside the square brackets, the first position refers tothe row(s) and the second to the column(s)
• If this matrix is called friendSurvey, the command toretrieve Josh’s age is friendSurvey[2,3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
15-133
Working with matrices
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• Can also use “square bracket notation”
• Inside the square brackets, the first position refers tothe row(s) and the second to the column(s)
• If this matrix is called friendSurvey, the command toretrieve Josh’s age is friendSurvey[2,3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
15-133
Working with matrices
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• Can also use “square bracket notation”
• Inside the square brackets, the first position refers tothe row(s) and the second to the column(s)
• If this matrix is called friendSurvey, the command toretrieve Josh’s age is friendSurvey[2,3]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
16-133
Working with data frames
• Square bracket notation works for data frames as well
• Data frames provide another option: dollar signnotation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
16-133
Working with data frames
• Square bracket notation works for data frames as well
• Data frames provide another option: dollar signnotation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
16-133
Working with data frames
• Square bracket notation works for data frames as well
• Data frames provide another option: dollar signnotation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
17-133
Working with data frames
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• To retrieve the ‘sex’ column as a vector, usefriendSurvey$sex
• To retrieve Josh’s age, use friendSurvey$age[2]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
17-133
Working with data frames
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• To retrieve the ‘sex’ column as a vector, usefriendSurvey$sex
• To retrieve Josh’s age, use friendSurvey$age[2]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
17-133
Working with data frames
id name age sex handed lastDocVisit
5012 Danielle 44 F R 20122331 Josh 44 M R 20081989 Mark 40 M R 20102217 Emma 32 F L 20122912 Sarah 33 F R 2011
• To retrieve the ‘sex’ column as a vector, usefriendSurvey$sex
• To retrieve Josh’s age, use friendSurvey$age[2]
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
18-133
Network Objects
• stores an adjacency matrix or an edgelist as well asmetadata
• vertex, edge, and network attributes
• can use square-bracket notation just like a matrix
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
18-133
Network Objects
• stores an adjacency matrix or an edgelist as well asmetadata
• vertex, edge, and network attributes
• can use square-bracket notation just like a matrix
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
18-133
Network Objects
• stores an adjacency matrix or an edgelist as well asmetadata
• vertex, edge, and network attributes
• can use square-bracket notation just like a matrix
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
18-133
Network Objects
• stores an adjacency matrix or an edgelist as well asmetadata
• vertex, edge, and network attributes
• can use square-bracket notation just like a matrix
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
18-133
Network Objects
• stores an adjacency matrix or an edgelist as well asmetadata
• vertex, edge, and network attributes
• can use square-bracket notation just like a matrix
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
19-133
Code Time!
• Sections 1-3
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
20-133
Descriptives
• One isolate
• Two components
• Diameter is 5
• Medici is most popular
• Three triads
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
20-133
Descriptives
• One isolate
• Two components
• Diameter is 5
• Medici is most popular
• Three triads
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
20-133
Descriptives
• One isolate
• Two components
• Diameter is 5
• Medici is most popular
• Three triads
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
20-133
Descriptives
• One isolate
• Two components
• Diameter is 5
• Medici is most popular
• Three triads
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
20-133
Descriptives
• One isolate
• Two components
• Diameter is 5
• Medici is most popular
• Three triads
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
20-133
Descriptives
• One isolate
• Two components
• Diameter is 5
• Medici is most popular
• Three triads
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
21-133
Degree
For each node, its degree is
• the number of nodes adjacent to it
• or, the number of lines incident with it
• Pucci has degree 0
• Lamberteschi has degree 1
• Guadagni has degree 4
• Medici has degree 6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree
and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree
and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegree
and 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
22-133
Directed Degree
In directed graphs,
• Indegree indicates the number of received ties
• Outdegree indicates the number of sent ties
A
B
C
D
• A has 1 outdegree
• B has 1 outdegree and 3indegree
• C has 2 outdegree and 1indegree
• D has 1 outdegreeand 1indegree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
23-133
Calculate degree centrality?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
23-133
Calculate degree centrality?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
24-133
Pseudo Code
for each vertex{Count the number of 1’s in the row
}
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
24-133
Pseudo Code
for each vertex{Count the number of 1’s in the row
}
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
25-133
R Code
network rs← vector(length=nrow(network))
for(i in 1:nrow(network)){network rs← sum(network[i,])}
Or, rowSums(network)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
25-133
R Code
network rs← vector(length=nrow(network))
for(i in 1:nrow(network)){network rs← sum(network[i,])}
Or, rowSums(network)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
25-133
R Code
network rs← vector(length=nrow(network))
for(i in 1:nrow(network)){network rs← sum(network[i,])}
Or, rowSums(network)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:
• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C
= 1
• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D
= 1
• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D
= 0
• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C
= 1
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C = 1• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C = 1• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C = 1• C→ A = 0• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C = 1• C→ A = 0• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
26-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• A sits on no pathsbetween others
• B sits on some paths:• A→ C = 1• A→ D = 1• C→ D = 0• D→ C = 1• C→ A = 0• D→ A = 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C
= 0
• A→ D
= 1/2
• C→ D
= 0
• D→ C
= 0
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C
= 0
• A→ D
= 1/2
• C→ D
= 0
• D→ C
= 0
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C = 0• A→ D
= 1/2
• C→ D
= 0
• D→ C
= 0
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C = 0• A→ D
= 1/2
• C→ D
= 0
• D→ C
= 0
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C = 0• A→ D
= 1/2
• C→ D
= 0
• D→ C
= 0
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C = 0• A→ D = 1/2• C→ D
= 0
• D→ C
= 0
• C→ A
= 0
• D→ A
= 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
27-133
Betweenness Centrality
Proportion of shortest paths between all other pairs ofnodes that the given node lies on
A
B
C
D
• B sits on some paths:• A→ C = 0• A→ D = 1/2• C→ D = 0• D→ C = 0• C→ A = 0• D→ A = 0
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
28-133
Betweenness Centrality
Forrest Pitts 1978 “The River Trade Network of Russia,Revisited”
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
28-133
Betweenness Centrality
Forrest Pitts 1978 “The River Trade Network of Russia,Revisited”
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to
• B = 1• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1
• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1• C = 2
• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
29-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• A’s Distance to• B = 1• C = 2• D = 3
• A’s Closeness Centrality= 3
1+2+3 = .5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
30-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• B’s Distance to
• C = 1• D = 2• B = inf
• B’s Closeness Centrality= 3
inf+1+2 = inf
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
30-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• B’s Distance to• C = 1
• D = 2• B = inf
• B’s Closeness Centrality= 3
inf+1+2 = inf
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
30-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• B’s Distance to• C = 1• D = 2
• B = inf
• B’s Closeness Centrality= 3
inf+1+2 = inf
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
30-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• B’s Distance to• C = 1• D = 2• B = inf
• B’s Closeness Centrality= 3
inf+1+2 = inf
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
30-133
Closeness Centrality
How far is each node from the other nodes in the graph
A
B
C
D
• C(v) = |V |−1∑d(v,i)
• B’s Distance to• C = 1• D = 2• B = inf
• B’s Closeness Centrality= 3
inf+1+2 = inf
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
31-133
Closeness Centrality – AlternateMeasure
How far is each node from the other nodes in the graph
A
B
C
D
• C2(v) =
∑ 1d(v,i)
|V |−1• B’s Distance to
• C = 1• D = 2• B = inf
• B’s Closeness Centrality
=1
inf+ 1
1+ 1
2
3 = 12
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
31-133
Closeness Centrality – AlternateMeasure
How far is each node from the other nodes in the graph
A
B
C
D
• C2(v) =
∑ 1d(v,i)
|V |−1• B’s Distance to
• C = 1• D = 2• B = inf
• B’s Closeness Centrality
=1
inf+ 1
1+ 1
2
3 = 12
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
32-133
Page Rank and EigenvectorCentrality
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
33-133
Page Rank
Erica
Amy Bryan
Carter
David
1
1 1
1
1
1
0 1+.5
1+.5
1
1
0 1+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
1+.5
1
1+1
0 0+.5
0+.5
1+1
1+1
0 0+.5
0+.5
1+1
1+1
0+1 0+.5
0+.5
0+1
1+1
0+1 0+.5
0+.5
0+1
2
1 .5
.5
1
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
34-133
Graph Level Indices
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
35-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
35-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
35-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
35-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
35-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
35-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
36-133
Graph Level Indices
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
37-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
37-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
37-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
37-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
37-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
37-133
Density
• Number of ties, expressed as a percentage of thenumber of possible ties
• For directed graphs:E
N(N−1)
• For undirected graphs:
EN(N−1)
2
1
2
3
=2
3(3−1)
2 = 46
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
38-133
Mean Degree
The mean degree, d, of all nodes in the graph is
d(n) =∑Ni=1 d(ni)N = 2E
N
= 1+2+13 = 4
3
1
2
3
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
38-133
Mean Degree
The mean degree, d, of all nodes in the graph is
d(n) =∑Ni=1 d(ni)N = 2E
N
= 1+2+13 = 4
3
1
2
3
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
38-133
Mean Degree
The mean degree, d, of all nodes in the graph is
d(n) =∑Ni=1 d(ni)N = 2E
N
= 1+2+13 = 4
3
1
2
3
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
39-133
Size, Density, and Mean Degree
If we hold the meandegree constant, butvary size, whathappens to density?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
39-133
Size, Density, and Mean Degree
If we hold the meandegree constant, butvary size, whathappens to density?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
40-133
Centralization
• Extent to which centrality is concentrated on a singlevertex
• Calculated as the sum of the differences between eachnode’s centrality score and the maximum score
• Most centralized structure is usually a star network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
40-133
Centralization
• Extent to which centrality is concentrated on a singlevertex
• Calculated as the sum of the differences between eachnode’s centrality score and the maximum score
• Most centralized structure is usually a star network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
40-133
Centralization
• Extent to which centrality is concentrated on a singlevertex
• Calculated as the sum of the differences between eachnode’s centrality score and the maximum score
• Most centralized structure is usually a star network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
40-133
Centralization
• Extent to which centrality is concentrated on a singlevertex
• Calculated as the sum of the differences between eachnode’s centrality score and the maximum score
• Most centralized structure is usually a star network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
41-133
Bavelas Experiments
• People in positionspassed messages toone another tosolve a problem
• Studied the effectof structure on
• Efficiency• Leadership• Satisfaction
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
41-133
Bavelas Experiments
• People in positionspassed messages toone another tosolve a problem
• Studied the effectof structure on
• Efficiency• Leadership• Satisfaction
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
41-133
Bavelas Experiments
• People in positionspassed messages toone another tosolve a problem
• Studied the effectof structure on
• Efficiency• Leadership• Satisfaction
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
42-133
Bavelas Experiments
Circle Line
Star Y
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
FastestFewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
FastestFewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
FastestFewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
FastestFewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
Fastest
Fewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
FastestFewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
43-133
Bavelas Experiments
Circle
Star
Slowest to completion
Most errors
Most satisfied
FastestFewest errors
Most dissatisfied
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
44-133
Dyad Census
Mutual (M)
Assymetric (A)
Null (N)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
44-133
Dyad Census
Mutual (M)
Assymetric (A)
Null (N)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
44-133
Dyad Census
Mutual (M)
Assymetric (A)
Null (N)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
44-133
Dyad Census
Mutual (M)
Assymetric (A)
Null (N)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
45-133
Reciprocity
• Dyadic: the proportion of dyads that are symmetric
M+NM+A+N
• Dyadic non-null: the proportion of non-null dyads that
are reciprocalM
M+A
• Edgewise:2∗M
2∗M+A
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
45-133
Reciprocity
• Dyadic: the proportion of dyads that are symmetric
M+NM+A+N
• Dyadic non-null: the proportion of non-null dyads that
are reciprocalM
M+A
• Edgewise:2∗M
2∗M+A
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
45-133
Reciprocity
• Dyadic: the proportion of dyads that are symmetric
M+NM+A+N
• Dyadic non-null: the proportion of non-null dyads that
are reciprocalM
M+A
• Edgewise:2∗M
2∗M+A
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
45-133
Reciprocity
• Dyadic: the proportion of dyads that are symmetric
M+NM+A+N
• Dyadic non-null: the proportion of non-null dyads that
are reciprocalM
M+A
• Edgewise:2∗M
2∗M+A
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
46-133
Triad Census
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
46-133
Triad Census
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
47-133
Triad Census
16 different triad types
On
ero
wp
ern
etw
ork
i,j cell is the numberof triad type jin network i
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
47-133
Triad Census
16 different triad types
On
ero
wp
ern
etw
ork i,j cell is the number
of triad type jin network i
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
48-133
Triad Census
Dominance Relationships
Friendship, Assistance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
48-133
Triad Census
Dominance Relationships
Friendship, Assistance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
48-133
Triad Census
Dominance Relationships
Friendship, Assistance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
49-133
Transitivity
1
2
3
• Usually calculated as thefraction of completedtwo-paths
• Related to Grannovetter’s‘forbidden triad’
• Can be directed or undirected
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
50-133
Forbidden Triad orStructural Hole?
• Granovetter, Mark S. 1973.“The Strength of Weak Ties”
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
50-133
Forbidden Triad orStructural Hole?
• Granovetter, Mark S. 1973.“The Strength of Weak Ties”
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
51-133
Forbidden Triad orStructural Hole?
• Granovetter, Mark S. 1973.“The Strength of Weak Ties”
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
52-133
Forbidden Triad orStructural Hole?
• Burt, Ronald S. 2004.“Structural Holes: The SocialStructure of Competition”
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
53-133
Extensions
Attributes!
• Properties of nodes, edges, or even networks
• Pretty much anything you can measure could be anattribute
• Extension based on node attributes: Brokerage
• Extension based on edge attributes: Structural Balance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
53-133
Extensions
Attributes!
• Properties of nodes, edges, or even networks
• Pretty much anything you can measure could be anattribute
• Extension based on node attributes: Brokerage
• Extension based on edge attributes: Structural Balance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
53-133
Extensions
Attributes!
• Properties of nodes, edges, or even networks
• Pretty much anything you can measure could be anattribute
• Extension based on node attributes: Brokerage
• Extension based on edge attributes: Structural Balance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
53-133
Extensions
Attributes!
• Properties of nodes, edges, or even networks
• Pretty much anything you can measure could be anattribute
• Extension based on node attributes: Brokerage
• Extension based on edge attributes: Structural Balance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
53-133
Extensions
Attributes!
• Properties of nodes, edges, or even networks
• Pretty much anything you can measure could be anattribute
• Extension based on node attributes: Brokerage
• Extension based on edge attributes: Structural Balance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
54-133
Brokerage
• Brokerage is a process “by which intermediary actorsfacilitate transactions between other actors lackingaccess to or trust in one another” (Marsden 1982)
• Brokers play a crucial role in knitting together diversegroups of people, organizations, parties
• Brokers can gain a lot – early access to information,prestige
• But can also be distrusted by everyone
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
54-133
Brokerage
• Brokerage is a process “by which intermediary actorsfacilitate transactions between other actors lackingaccess to or trust in one another” (Marsden 1982)
• Brokers play a crucial role in knitting together diversegroups of people, organizations, parties
• Brokers can gain a lot – early access to information,prestige
• But can also be distrusted by everyone
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
54-133
Brokerage
• Brokerage is a process “by which intermediary actorsfacilitate transactions between other actors lackingaccess to or trust in one another” (Marsden 1982)
• Brokers play a crucial role in knitting together diversegroups of people, organizations, parties
• Brokers can gain a lot – early access to information,prestige
• But can also be distrusted by everyone
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
54-133
Brokerage
• Brokerage is a process “by which intermediary actorsfacilitate transactions between other actors lackingaccess to or trust in one another” (Marsden 1982)
• Brokers play a crucial role in knitting together diversegroups of people, organizations, parties
• Brokers can gain a lot – early access to information,prestige
• But can also be distrusted by everyone
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
55-133
Brokerage: Formal Concept
In a network N withedges E,
node j brokersnodes i and kif eij ∈ Eand ejk ∈ Ebut eik /∈ E
ji
k
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
55-133
Brokerage: Formal Concept
In a network N withedges E,node j brokers
nodes i and kif eij ∈ Eand ejk ∈ Ebut eik /∈ E
j
i
k
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
55-133
Brokerage: Formal Concept
In a network N withedges E,node j brokersnodes i and k
if eij ∈ Eand ejk ∈ Ebut eik /∈ E
ji
k
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
55-133
Brokerage: Formal Concept
In a network N withedges E,node j brokersnodes i and kif eij ∈ E
and ejk ∈ Ebut eik /∈ E
ji
k
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
55-133
Brokerage: Formal Concept
In a network N withedges E,node j brokersnodes i and kif eij ∈ Eand ejk ∈ E
but eik /∈ E
ji
k
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
55-133
Brokerage: Formal Concept
In a network N withedges E,node j brokersnodes i and kif eij ∈ Eand ejk ∈ Ebut eik /∈ E
ji
k
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
56-133
Brokerage: Formal Concept
Gould and Fernandez (1989, 1994)
• formalized the concept
• added a vertex attribute component
• compared empirical brokerage counts to counts fromrandom graphs conditioned on the number of edges
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
56-133
Brokerage: Formal Concept
Gould and Fernandez (1989, 1994)
• formalized the concept
• added a vertex attribute component
• compared empirical brokerage counts to counts fromrandom graphs conditioned on the number of edges
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
56-133
Brokerage: Formal Concept
Gould and Fernandez (1989, 1994)
• formalized the concept
• added a vertex attribute component
• compared empirical brokerage counts to counts fromrandom graphs conditioned on the number of edges
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
56-133
Brokerage: Formal Concept
Gould and Fernandez (1989, 1994)
• formalized the concept
• added a vertex attribute component
• compared empirical brokerage counts to counts fromrandom graphs conditioned on the number of edges
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
57-133
Brokerage: One Mode
Coordinator
Representative Gatekeeper Itinerant Liaison
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
57-133
Brokerage: One Mode
Coordinator Representative
Gatekeeper Itinerant Liaison
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
57-133
Brokerage: One Mode
Coordinator Representative Gatekeeper
Itinerant Liaison
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
57-133
Brokerage: One Mode
Coordinator Representative Gatekeeper Itinerant
Liaison
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
57-133
Brokerage: One Mode
Coordinator Representative Gatekeeper Itinerant Liaison
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
58-133
Gould and Fernandez’ Findings
• the benefits of brokerage are mediated both by the typeof organization (the node sets) and the type ofbrokerage chain
• non-governmental organizations were found to havemore influence when they held any type of brokerageposition
• governmental organizations gained influence only whenthey held “outsider” brokerage roles in itinerant andliaison chains
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
58-133
Gould and Fernandez’ Findings
• the benefits of brokerage are mediated both by the typeof organization (the node sets) and the type ofbrokerage chain
• non-governmental organizations were found to havemore influence when they held any type of brokerageposition
• governmental organizations gained influence only whenthey held “outsider” brokerage roles in itinerant andliaison chains
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
58-133
Gould and Fernandez’ Findings
• the benefits of brokerage are mediated both by the typeof organization (the node sets) and the type ofbrokerage chain
• non-governmental organizations were found to havemore influence when they held any type of brokerageposition
• governmental organizations gained influence only whenthey held “outsider” brokerage roles in itinerant andliaison chains
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
58-133
Gould and Fernandez’ Findings
• the benefits of brokerage are mediated both by the typeof organization (the node sets) and the type ofbrokerage chain
• non-governmental organizations were found to havemore influence when they held any type of brokerageposition
• governmental organizations gained influence only whenthey held “outsider” brokerage roles in itinerant andliaison chains
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
59-133
Structural Balance
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
60-133
Bernoulli ‘Random’ Graphs
• A probabilitydistribution for asuccess/failure
• Best known example isthe coin flip
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
60-133
Bernoulli ‘Random’ Graphs
• A probabilitydistribution for asuccess/failure
• Best known example isthe coin flip
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
60-133
Bernoulli ‘Random’ Graphs
• A probabilitydistribution for asuccess/failure
• Best known example isthe coin flip
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
61-133
Bernoulli ‘Random’ Graphs
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
62-133
Small Worlds
What are the characteristics of real world?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
63-133
Small Worlds
Stanley Milgram “The Small World Problem”, PsychologyToday, vol. 1, no. 1, May 1967, pp61-67
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
63-133
Small Worlds
Stanley Milgram “The Small World Problem”, PsychologyToday, vol. 1, no. 1, May 1967, pp61-67
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
64-133
Watts-Strogatz Model
• high clustering coefficient
• low diameter
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
64-133
Watts-Strogatz Model
• high clustering coefficient
• low diameter
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
64-133
Watts-Strogatz Model
• high clustering coefficient
• low diameter
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
65-133
Clustering Coefficient andDiameter
• The diameter of a graph is the longest shortest pathbetween any pair nodes
• The clustering coefficient of a graph is the numberof triangles divided by the number of two-paths
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
65-133
Clustering Coefficient andDiameter
• The diameter of a graph is the longest shortest pathbetween any pair nodes
• The clustering coefficient of a graph is the numberof triangles divided by the number of two-paths
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
65-133
Clustering Coefficient andDiameter
• The diameter of a graph is the longest shortest pathbetween any pair nodes
• The clustering coefficient of a graph is the numberof triangles divided by the number of two-paths
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
66-133
Clustering Coefficient Tangent
• remember the triad census...
• your numerator is...the number of triads with 3ties
• your denominator is...the number of triads with 2ties PLUS 3*the number oftriads with 3 ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
66-133
Clustering Coefficient Tangent
• remember the triad census...
• your numerator is...the number of triads with 3ties
• your denominator is...the number of triads with 2ties PLUS 3*the number oftriads with 3 ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
66-133
Clustering Coefficient Tangent
• remember the triad census...
• your numerator is...
the number of triads with 3ties
• your denominator is...the number of triads with 2ties PLUS 3*the number oftriads with 3 ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
66-133
Clustering Coefficient Tangent
• remember the triad census...
• your numerator is...the number of triads with 3ties
• your denominator is...the number of triads with 2ties PLUS 3*the number oftriads with 3 ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
66-133
Clustering Coefficient Tangent
• remember the triad census...
• your numerator is...the number of triads with 3ties
• your denominator is...
the number of triads with 2ties PLUS 3*the number oftriads with 3 ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
66-133
Clustering Coefficient Tangent
• remember the triad census...
• your numerator is...the number of triads with 3ties
• your denominator is...the number of triads with 2ties PLUS 3*the number oftriads with 3 ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
67-133
Watts-Strogatz Model
• high clusteringcoefficient
• low diameter
• starts with alattice structure
• randomlyre-wires ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
67-133
Watts-Strogatz Model
• high clusteringcoefficient
• low diameter
• starts with alattice structure
• randomlyre-wires ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
67-133
Watts-Strogatz Model
• high clusteringcoefficient
• low diameter
• starts with alattice structure
• randomlyre-wires ties
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
68-133
Watts-Strogatz Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
69-133
Watts-Strogatz Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual C1
Film Actors
3.65 2.99 0.79 0.00027
Power Grid
18.7 12.4 0.08 0.005
C. Elegans
2.65 2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual
L1 Cactual C1
Film Actors
3.65 2.99 0.79 0.00027
Power Grid
18.7 12.4 0.08 0.005
C. Elegans
2.65 2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1
Cactual C1
Film Actors
3.65 2.99 0.79 0.00027
Power Grid
18.7 12.4 0.08 0.005
C. Elegans
2.65 2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual
C1
Film Actors
3.65 2.99 0.79 0.00027
Power Grid
18.7 12.4 0.08 0.005
C. Elegans
2.65 2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual C1
Film Actors
3.65 2.99 0.79 0.00027
Power Grid
18.7 12.4 0.08 0.005
C. Elegans
2.65 2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual C1
Film Actors 3.65
2.99 0.79 0.00027
Power Grid 18.7
12.4 0.08 0.005
C. Elegans 2.65
2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual C1
Film Actors 3.65 2.99
0.79 0.00027
Power Grid 18.7 12.4
0.08 0.005
C. Elegans 2.65 2.25
0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual C1
Film Actors 3.65 2.99 0.79
0.00027
Power Grid 18.7 12.4 0.08
0.005
C. Elegans 2.65 2.25 0.28
0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
70-133
Watts-Strogatz Model
Lactual L1 Cactual C1
Film Actors 3.65 2.99 0.79 0.00027Power Grid 18.7 12.4 0.08 0.005C. Elegans 2.65 2.25 0.28 0.05
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
71-133
Watts-Strogatz Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
71-133
Watts-Strogatz Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
71-133
Watts-Strogatz Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
72-133
Barabasi-Albert Model
• Alternative network generating model
• Where Watts and Strogatz’s model results in a worldwhere everyone has approximately the same number ofties,
• Barabasi and Albert thought about a skeweddistribution of ties
• Based on the idea of ‘preferential attachment’ aka ’richget richer’
• Unlike Watts-Strogatz, this model starts with one node,add additional nodes one at a time
• Nodes ‘preferentially’ attach to those with higher degree
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
73-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
73-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
73-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
73-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
73-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
73-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
74-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
75-133
Barabasi-Albert Model
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
76-133
Barabasi-Albert Model
Barabsi, A.-L.; R. Albert (1999). “Emergence of scaling inrandom networks”. Science
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
77-133
Code Time!
• Section 4
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
78-133
Hypothesis Testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
79-133
Relating Node level indices tocovariates
• Node Level Indices: centrality measures, brokerage,constraint
• Node Covariates: measures of power, careeradvancement, gender – really anything you want tostudy that varies at the node level
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
79-133
Relating Node level indices tocovariates
• Node Level Indices: centrality measures, brokerage,constraint
• Node Covariates: measures of power, careeradvancement, gender – really anything you want tostudy that varies at the node level
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
80-133
Emergent Multi-OrganizationalNetworks (EMON) Dataset
• 7 case studies of EMONs in the context of search andrescue activities from Drabek et. al. (1981)
• Ties between organizations are self-reported levels ofcommunication coded from 1 to 4 with 1 as mostfrequent
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
80-133
Emergent Multi-OrganizationalNetworks (EMON) Dataset
• 7 case studies of EMONs in the context of search andrescue activities from Drabek et. al. (1981)
• Ties between organizations are self-reported levels ofcommunication coded from 1 to 4 with 1 as mostfrequent
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
81-133
Emergent Multi-OrganizationalNetworks (EMON) Dataset
Attribute Data
• Command Rank Score (CRS): mean rank (reversed) forprominence in the command structure
• Decision Rank Score (DRS): mean rank (reversed) forprominence in decision making process
• Paid Staff: number of paid employees
• Volunteer Staff: number of volunteer staff
• Sponsorship: organization type (City, County, State,Federal, or Private)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
82-133
Correlation between DRS andDegree?
• Subsample of MutuallyReported “ContinuousCommunication” inTexas EMON
• Degree is shown in color(darker is bigger)
• DRS in size
• Empirical corelationρ = 0.86
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
82-133
Correlation between DRS andDegree?
• Subsample of MutuallyReported “ContinuousCommunication” inTexas EMON
• Degree is shown in color(darker is bigger)
• DRS in size
• Empirical corelationρ = 0.86
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
82-133
Correlation between DRS andDegree?
• Subsample of MutuallyReported “ContinuousCommunication” inTexas EMON
• Degree is shown in color(darker is bigger)
• DRS in size
• Empirical corelationρ = 0.86
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
82-133
Correlation between DRS andDegree?
• Subsample of MutuallyReported “ContinuousCommunication” inTexas EMON
• Degree is shown in color(darker is bigger)
• DRS in size
• Empirical corelationρ = 0.86
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
82-133
Correlation between DRS andDegree?
• Subsample of MutuallyReported “ContinuousCommunication” inTexas EMON
• Degree is shown in color(darker is bigger)
• DRS in size
• Empirical corelationρ = 0.86
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
83-133
Correlation between DRS andDegree?
ρ = 0.86
ρ = −0.07
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
83-133
Correlation between DRS andDegree?
ρ = 0.86
ρ = −0.07
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
83-133
Correlation between DRS andDegree?
ρ = 0.86 ρ = −0.07
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
84-133
Correlation between DRS andDegree?
ρ = 0.86
ρ = −0.07
ρ = −0.12
ρ = −0.39
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
84-133
Correlation between DRS andDegree?
ρ = 0.86
ρ = −0.07
ρ = −0.12
ρ = −0.39
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
84-133
Correlation between DRS andDegree?
ρ = 0.86
ρ = −0.07
ρ = −0.12
ρ = −0.39
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
85-133
Correlation between DRS andDegree?
ρobs = 0.86
Pr(ρ ≥ ρobs)= 3e− 5
Pr(ρ < ρobs) = 0.9999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
85-133
Correlation between DRS andDegree?
ρobs = 0.86
Pr(ρ ≥ ρobs)= 3e− 5
Pr(ρ < ρobs) = 0.9999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
85-133
Correlation between DRS andDegree?
ρobs = 0.86
Pr(ρ ≥ ρobs)= 3e− 5
Pr(ρ < ρobs) = 0.9999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
85-133
Correlation between DRS andDegree?
ρobs = 0.86
Pr(ρ ≥ ρobs)= 3e− 5
Pr(ρ < ρobs) = 0.9999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
86-133
Regression?
• Can use Node Level Indices as independent variables ina regression
• Big assumption: position predicts the properties ofthose who hold them
• Conditioning on NLI values, so dependence inaccounted for assuming no error in the network
• NLIs as dependent variables more problematic due toautocorrelation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
86-133
Regression?
• Can use Node Level Indices as independent variables ina regression
• Big assumption: position predicts the properties ofthose who hold them
• Conditioning on NLI values, so dependence inaccounted for assuming no error in the network
• NLIs as dependent variables more problematic due toautocorrelation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
86-133
Regression?
• Can use Node Level Indices as independent variables ina regression
• Big assumption: position predicts the properties ofthose who hold them
• Conditioning on NLI values, so dependence inaccounted for assuming no error in the network
• NLIs as dependent variables more problematic due toautocorrelation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
86-133
Regression?
• Can use Node Level Indices as independent variables ina regression
• Big assumption: position predicts the properties ofthose who hold them
• Conditioning on NLI values, so dependence inaccounted for assuming no error in the network
• NLIs as dependent variables more problematic due toautocorrelation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
86-133
Regression?
• Can use Node Level Indices as independent variables ina regression
• Big assumption: position predicts the properties ofthose who hold them
• Conditioning on NLI values, so dependence inaccounted for assuming no error in the network
• NLIs as dependent variables more problematic due toautocorrelation
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
87-133
Code Time!
• 5.1-5.3
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
88-133
Quadratic Assignment Procedure
Marriage Business
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
89-133
Quadratic AssignmentProceedure
Marriage Business
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
90-133
Graph Correlation
• Simple way of comparing graphs on the same vertex setby element
• gcor([
1 11 0
],
[1 12 2
])= cor([1, 1, 1, 0], [1, 1, 2, 2])
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
90-133
Graph Correlation
• Simple way of comparing graphs on the same vertex setby element
• gcor([
1 11 0
],
[1 12 2
])= cor([1, 1, 1, 0], [1, 1, 2, 2])
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
90-133
Graph Correlation
• Simple way of comparing graphs on the same vertex setby element
• gcor([
1 11 0
],
[1 12 2
])= cor([1, 1, 1, 0], [1, 1, 2, 2])
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
91-133
Do business ties coincide withmarriages?
Marriage Business
ρ = 0.372
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
92-133
Do business ties coincide withmarriages?
Marriage Business
ρ = 0.169
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
92-133
Do business ties coincide withmarriages?
Marriage Business
ρ = 0.169
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
93-133
Do business ties coincide withmarriages?
Marriage Business
ρ = −0.034
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
94-133
Do business ties coincide withmarriages?
Marriage Business
ρ = −0.101
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
95-133
QAP Test
ρobs = 0.372
Pr(ρ ≥ ρobs)= .001
Pr(ρ < ρobs) = 0.999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
95-133
QAP Test
ρobs = 0.372
Pr(ρ ≥ ρobs)= .001
Pr(ρ < ρobs) = 0.999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
95-133
QAP Test
ρobs = 0.372
Pr(ρ ≥ ρobs)= .001
Pr(ρ < ρobs) = 0.999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
95-133
QAP Test
ρobs = 0.372
Pr(ρ ≥ ρobs)= .001
Pr(ρ < ρobs) = 0.999
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties
• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression
• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
96-133
Network Regression
• Family of models predicting social ties• Special case of standard OLS regression• Dependent variable is a network adjacency matrix
• EYij = β0 + β1X1ij + β2X2ij + · · ·+ βρXρij
• Where E is the expectation operator (analagous to“mean” or “average”)
• Yij is the value from i to j on the dependent relationwith adjacency matrix Y
• Xkij is the value of the kth predictor for the (i, j)ordered pair, and β0, . . . βρ are coefficients
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix• Standard case: dichotomous data• Valued case
• Independent variables also in adjacency matrix form• Always takes matrix form, but may be based on vector
data• eg. simple adjacency matrix, sender/receiver effects,
attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix
• Standard case: dichotomous data• Valued case
• Independent variables also in adjacency matrix form• Always takes matrix form, but may be based on vector
data• eg. simple adjacency matrix, sender/receiver effects,
attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix• Standard case: dichotomous data
• Valued case
• Independent variables also in adjacency matrix form• Always takes matrix form, but may be based on vector
data• eg. simple adjacency matrix, sender/receiver effects,
attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix• Standard case: dichotomous data• Valued case
• Independent variables also in adjacency matrix form• Always takes matrix form, but may be based on vector
data• eg. simple adjacency matrix, sender/receiver effects,
attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix• Standard case: dichotomous data• Valued case
• Independent variables also in adjacency matrix form
• Always takes matrix form, but may be based on vectordata
• eg. simple adjacency matrix, sender/receiver effects,attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix• Standard case: dichotomous data• Valued case
• Independent variables also in adjacency matrix form• Always takes matrix form, but may be based on vector
data
• eg. simple adjacency matrix, sender/receiver effects,attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
97-133
Data Prep
• Dependent variable is an adjacency matrix• Standard case: dichotomous data• Valued case
• Independent variables also in adjacency matrix form• Always takes matrix form, but may be based on vector
data• eg. simple adjacency matrix, sender/receiver effects,
attribute differences, elements held in common
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
98-133
Code Time!
• Sections 5.4 and 5.5
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)• where Θ is the matrix for the Auto-Regressive weights• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)• where Θ is the matrix for the Auto-Regressive weights• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression
• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)• where Θ is the matrix for the Auto-Regressive weights• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)• where Θ is the matrix for the Auto-Regressive weights• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)
• where Θ is the matrix for the Auto-Regressive weights• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)• where Θ is the matrix for the Auto-Regressive weights
• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
99-133
Network Autocorrelation Models
• Family of models for estimating how covariates relate toeach other through ties
• Special case of standard OLS regression• Dependent variable is a vertex attribute
• y = (I −ΘW )−1(Xβ + (I − ψZ)−1v)• where Θ is the matrix for the Auto-Regressive weights• and ψ is the matrix for the Moving Average weights
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
100-133
The Classical Regression Model
Xiβ
εi
yi
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
100-133
The Classical Regression Model
Xiβ
εi
yi
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
100-133
The Classical Regression Model
Xiβ
εi
yi
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
100-133
The Classical Regression Model
Xiβ
εi
yi
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
101-133
Adding Network AR Effects
Xiβ
εi
yiXjβ
εj
yj
Xkβ
εk
yk
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
101-133
Adding Network AR Effects
Xiβ
εi
yiXjβ
εj
yj
Xkβ
εk
yk
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
101-133
Adding Network AR Effects
Xiβ
εi
yiXjβ
εj
yj
Xkβ
εk
yk
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
102-133
Adding Network MA Effects
Xiβ
εi
yiXjβ
εj
yj
Xkβ
εk
yk
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
102-133
Adding Network MA Effects
Xiβ
εi
yiXjβ
εj
yj
Xkβ
εk
yk
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
103-133
Network ARMA Model
Xiβ
εi
yiXjβ
εj
yj
Xkβ
εk
yk
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
104-133
Network ‘Resonance’
εi
εj
εk εl
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
104-133
Network ‘Resonance’
εi
εj
εk εl
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
104-133
Network ‘Resonance’
εi
εj
εk εl
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
104-133
Network ‘Resonance’
εi
εj
εk εl
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
104-133
Network ‘Resonance’
εi
εj
εk εl
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
104-133
Network ‘Resonance’
εi
εj
εk εl
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
105-133
Inference with the NetworkAutocorrelation Model
• Usually observe y, X, and Z and/or Z, want to infer β,θ, and φ
• Need each I−W, I− Z invertible for solution to exist
• error in disturbance autocorrelation, v, assumed as iid,vi N(0, σ2)
• Standard errors based on the inverse informationmatrix at the MLE
• Compare models in the usual way (eg AIC, BIC)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
105-133
Inference with the NetworkAutocorrelation Model
• Usually observe y, X, and Z and/or Z, want to infer β,θ, and φ
• Need each I−W, I− Z invertible for solution to exist
• error in disturbance autocorrelation, v, assumed as iid,vi N(0, σ2)
• Standard errors based on the inverse informationmatrix at the MLE
• Compare models in the usual way (eg AIC, BIC)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
105-133
Inference with the NetworkAutocorrelation Model
• Usually observe y, X, and Z and/or Z, want to infer β,θ, and φ
• Need each I−W, I− Z invertible for solution to exist
• error in disturbance autocorrelation, v, assumed as iid,vi N(0, σ2)
• Standard errors based on the inverse informationmatrix at the MLE
• Compare models in the usual way (eg AIC, BIC)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
105-133
Inference with the NetworkAutocorrelation Model
• Usually observe y, X, and Z and/or Z, want to infer β,θ, and φ
• Need each I−W, I− Z invertible for solution to exist
• error in disturbance autocorrelation, v, assumed as iid,vi N(0, σ2)
• Standard errors based on the inverse informationmatrix at the MLE
• Compare models in the usual way (eg AIC, BIC)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
105-133
Inference with the NetworkAutocorrelation Model
• Usually observe y, X, and Z and/or Z, want to infer β,θ, and φ
• Need each I−W, I− Z invertible for solution to exist
• error in disturbance autocorrelation, v, assumed as iid,vi N(0, σ2)
• Standard errors based on the inverse informationmatrix at the MLE
• Compare models in the usual way (eg AIC, BIC)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
105-133
Inference with the NetworkAutocorrelation Model
• Usually observe y, X, and Z and/or Z, want to infer β,θ, and φ
• Need each I−W, I− Z invertible for solution to exist
• error in disturbance autocorrelation, v, assumed as iid,vi N(0, σ2)
• Standard errors based on the inverse informationmatrix at the MLE
• Compare models in the usual way (eg AIC, BIC)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
106-133
Choosing the Weight Matrix
• crucial modeling issue to choose the right form• standard adjacency matrix• row-normalized adjancecy matrix• structural equivalence distance
• Many suggestions given by Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
106-133
Choosing the Weight Matrix
• crucial modeling issue to choose the right form
• standard adjacency matrix• row-normalized adjancecy matrix• structural equivalence distance
• Many suggestions given by Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
106-133
Choosing the Weight Matrix
• crucial modeling issue to choose the right form• standard adjacency matrix
• row-normalized adjancecy matrix• structural equivalence distance
• Many suggestions given by Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
106-133
Choosing the Weight Matrix
• crucial modeling issue to choose the right form• standard adjacency matrix• row-normalized adjancecy matrix
• structural equivalence distance
• Many suggestions given by Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
106-133
Choosing the Weight Matrix
• crucial modeling issue to choose the right form• standard adjacency matrix• row-normalized adjancecy matrix• structural equivalence distance
• Many suggestions given by Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
106-133
Choosing the Weight Matrix
• crucial modeling issue to choose the right form• standard adjacency matrix• row-normalized adjancecy matrix• structural equivalence distance
• Many suggestions given by Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
107-133
Data Prep
• Dependent variable is a vertex attribute
• Covariates are in matrix form with one column perattribute
• Can include an intercept term by adding a column of 1s
• Weight matrices for both AR and MA terms in matrixform
• Can include multiple weight matrices (as a list) forboth AR and MA
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
107-133
Data Prep
• Dependent variable is a vertex attribute
• Covariates are in matrix form with one column perattribute
• Can include an intercept term by adding a column of 1s
• Weight matrices for both AR and MA terms in matrixform
• Can include multiple weight matrices (as a list) forboth AR and MA
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
107-133
Data Prep
• Dependent variable is a vertex attribute
• Covariates are in matrix form with one column perattribute
• Can include an intercept term by adding a column of 1s
• Weight matrices for both AR and MA terms in matrixform
• Can include multiple weight matrices (as a list) forboth AR and MA
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
107-133
Data Prep
• Dependent variable is a vertex attribute
• Covariates are in matrix form with one column perattribute
• Can include an intercept term by adding a column of 1s
• Weight matrices for both AR and MA terms in matrixform
• Can include multiple weight matrices (as a list) forboth AR and MA
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
107-133
Data Prep
• Dependent variable is a vertex attribute
• Covariates are in matrix form with one column perattribute
• Can include an intercept term by adding a column of 1s
• Weight matrices for both AR and MA terms in matrixform
• Can include multiple weight matrices (as a list) forboth AR and MA
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
107-133
Data Prep
• Dependent variable is a vertex attribute
• Covariates are in matrix form with one column perattribute
• Can include an intercept term by adding a column of 1s
• Weight matrices for both AR and MA terms in matrixform
• Can include multiple weight matrices (as a list) forboth AR and MA
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
108-133
Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
109-133
Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:• B is the percentage of African American residents in the
parish• C is the percentage of Catholic residents in the parish• U is the percentage of the parish considered urban• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:
• B is the percentage of African American residents in theparish
• C is the percentage of Catholic residents in the parish• U is the percentage of the parish considered urban• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:• B is the percentage of African American residents in the
parish
• C is the percentage of Catholic residents in the parish• U is the percentage of the parish considered urban• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:• B is the percentage of African American residents in the
parish• C is the percentage of Catholic residents in the parish
• U is the percentage of the parish considered urban• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:• B is the percentage of African American residents in the
parish• C is the percentage of Catholic residents in the parish• U is the percentage of the parish considered urban
• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:• B is the percentage of African American residents in the
parish• C is the percentage of Catholic residents in the parish• U is the percentage of the parish considered urban• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
110-133
Variables
• Dependent variable: proportion of support in a parishfor democratic presidential candidate Kennedy in the1960 elections
• Covariates:• B is the percentage of African American residents in the
parish• C is the percentage of Catholic residents in the parish• U is the percentage of the parish considered urban• BPE is a measure of ’black political equality’
• Weight matrix (ρ): simple contiguity network
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
111-133
Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
112-133
Leenders 2002
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
113-133
Code Time!
• Section 5.6
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
114-133
Baseline Models
• treats social structure as maximally random given somefixed constraints
• methodological premise from Mayhew• identify potentially constraining factors• compare observed properties to baseline model• useful even when baseline model is not ‘realistic’
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
114-133
Baseline Models
• treats social structure as maximally random given somefixed constraints
• methodological premise from Mayhew• identify potentially constraining factors• compare observed properties to baseline model• useful even when baseline model is not ‘realistic’
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
114-133
Baseline Models
• treats social structure as maximally random given somefixed constraints
• methodological premise from Mayhew
• identify potentially constraining factors• compare observed properties to baseline model• useful even when baseline model is not ‘realistic’
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
114-133
Baseline Models
• treats social structure as maximally random given somefixed constraints
• methodological premise from Mayhew• identify potentially constraining factors
• compare observed properties to baseline model• useful even when baseline model is not ‘realistic’
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
114-133
Baseline Models
• treats social structure as maximally random given somefixed constraints
• methodological premise from Mayhew• identify potentially constraining factors• compare observed properties to baseline model
• useful even when baseline model is not ‘realistic’
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
114-133
Baseline Models
• treats social structure as maximally random given somefixed constraints
• methodological premise from Mayhew• identify potentially constraining factors• compare observed properties to baseline model• useful even when baseline model is not ‘realistic’
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
115-133
Types of Baseline Hypotheses
Empirical Network . . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
115-133
Types of Baseline Hypotheses
Empirical Network
. . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
115-133
Types of Baseline Hypotheses
Empirical Network
. . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
115-133
Types of Baseline Hypotheses
Empirical Network
. . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
115-133
Types of Baseline Hypotheses
Empirical Network . . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
116-133
Types of Baseline Hypotheses
Empirical Network
. . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
116-133
Types of Baseline Hypotheses
Empirical Network
. . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
116-133
Types of Baseline Hypotheses
Empirical Network
. . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
116-133
Types of Baseline Hypotheses
Empirical Network . . . etc
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
117-133
Types of Baseline Models
• Size: given the number of individuals, all structuresare equally likely
• Number of edges/probability of an edge: giventhe number of individuals and interactions (akaErdos-Renyi random graphs)
• Dyad census: given number of individuals, mutuals,asymmetric, and null relationships
• Degree distribution: given the number of individualsand each individual’s outgoing/incoming ties
• Number of triangles: not implemented due tocomplexity – with ERGM, can condition on theexpected number of triangles
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
117-133
Types of Baseline Models
• Size: given the number of individuals, all structuresare equally likely
• Number of edges/probability of an edge: giventhe number of individuals and interactions (akaErdos-Renyi random graphs)
• Dyad census: given number of individuals, mutuals,asymmetric, and null relationships
• Degree distribution: given the number of individualsand each individual’s outgoing/incoming ties
• Number of triangles: not implemented due tocomplexity – with ERGM, can condition on theexpected number of triangles
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
117-133
Types of Baseline Models
• Size: given the number of individuals, all structuresare equally likely
• Number of edges/probability of an edge: giventhe number of individuals and interactions (akaErdos-Renyi random graphs)
• Dyad census: given number of individuals, mutuals,asymmetric, and null relationships
• Degree distribution: given the number of individualsand each individual’s outgoing/incoming ties
• Number of triangles: not implemented due tocomplexity – with ERGM, can condition on theexpected number of triangles
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
117-133
Types of Baseline Models
• Size: given the number of individuals, all structuresare equally likely
• Number of edges/probability of an edge: giventhe number of individuals and interactions (akaErdos-Renyi random graphs)
• Dyad census: given number of individuals, mutuals,asymmetric, and null relationships
• Degree distribution: given the number of individualsand each individual’s outgoing/incoming ties
• Number of triangles: not implemented due tocomplexity – with ERGM, can condition on theexpected number of triangles
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
117-133
Types of Baseline Models
• Size: given the number of individuals, all structuresare equally likely
• Number of edges/probability of an edge: giventhe number of individuals and interactions (akaErdos-Renyi random graphs)
• Dyad census: given number of individuals, mutuals,asymmetric, and null relationships
• Degree distribution: given the number of individualsand each individual’s outgoing/incoming ties
• Number of triangles: not implemented due tocomplexity – with ERGM, can condition on theexpected number of triangles
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
117-133
Types of Baseline Models
• Size: given the number of individuals, all structuresare equally likely
• Number of edges/probability of an edge: giventhe number of individuals and interactions (akaErdos-Renyi random graphs)
• Dyad census: given number of individuals, mutuals,asymmetric, and null relationships
• Degree distribution: given the number of individualsand each individual’s outgoing/incoming ties
• Number of triangles: not implemented due tocomplexity – with ERGM, can condition on theexpected number of triangles
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
118-133
Method
• Select a test statistic (graph correlation, reciprocity,transitivity. . . )
• Select a baseline hypothesis (what you’re conditioningon)
• Simulate from the baseline hypothesis
• For each simulation, recalculate the test statistic
• Compare empirical value to null distribution, just as instandard statistical testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
118-133
Method
• Select a test statistic (graph correlation, reciprocity,transitivity. . . )
• Select a baseline hypothesis (what you’re conditioningon)
• Simulate from the baseline hypothesis
• For each simulation, recalculate the test statistic
• Compare empirical value to null distribution, just as instandard statistical testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
118-133
Method
• Select a test statistic (graph correlation, reciprocity,transitivity. . . )
• Select a baseline hypothesis (what you’re conditioningon)
• Simulate from the baseline hypothesis
• For each simulation, recalculate the test statistic
• Compare empirical value to null distribution, just as instandard statistical testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
118-133
Method
• Select a test statistic (graph correlation, reciprocity,transitivity. . . )
• Select a baseline hypothesis (what you’re conditioningon)
• Simulate from the baseline hypothesis
• For each simulation, recalculate the test statistic
• Compare empirical value to null distribution, just as instandard statistical testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
118-133
Method
• Select a test statistic (graph correlation, reciprocity,transitivity. . . )
• Select a baseline hypothesis (what you’re conditioningon)
• Simulate from the baseline hypothesis
• For each simulation, recalculate the test statistic
• Compare empirical value to null distribution, just as instandard statistical testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
118-133
Method
• Select a test statistic (graph correlation, reciprocity,transitivity. . . )
• Select a baseline hypothesis (what you’re conditioningon)
• Simulate from the baseline hypothesis
• For each simulation, recalculate the test statistic
• Compare empirical value to null distribution, just as instandard statistical testing
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
119-133
Example
Transitivity in the Hurricane Frederic EMON
• ρ = 0.475
• indicatesthat roughlyhalf the timethati→ j → k,i→ j
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
119-133
Example
Transitivity in the Hurricane Frederic EMON
• ρ = 0.475
• indicatesthat roughlyhalf the timethati→ j → k,i→ j
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
119-133
Example
Transitivity in the Hurricane Frederic EMON
• ρ = 0.475
• indicatesthat roughlyhalf the timethati→ j → k,i→ j
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
120-133
Example
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
121-133
Example
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
122-133
Caution!
• Your selection of baseline model controls whathypothesis you’re testing
• Changing the model can greatly change the results
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
122-133
Caution!
• Your selection of baseline model controls whathypothesis you’re testing
• Changing the model can greatly change the results
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
123-133
Example
Donations and voting patterns in the US 111th House ofRepresentatives
• Two two-mode matrices• Representatives by donors• Representatives by votes
• Convert to one-mode matrices• Similarity in donations among representatives• Similarity in voting among representatives
• What is the correlation between donations and voting?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
123-133
Example
Donations and voting patterns in the US 111th House ofRepresentatives
• Two two-mode matrices
• Representatives by donors• Representatives by votes
• Convert to one-mode matrices• Similarity in donations among representatives• Similarity in voting among representatives
• What is the correlation between donations and voting?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
123-133
Example
Donations and voting patterns in the US 111th House ofRepresentatives
• Two two-mode matrices• Representatives by donors• Representatives by votes
• Convert to one-mode matrices• Similarity in donations among representatives• Similarity in voting among representatives
• What is the correlation between donations and voting?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
123-133
Example
Donations and voting patterns in the US 111th House ofRepresentatives
• Two two-mode matrices• Representatives by donors• Representatives by votes
• Convert to one-mode matrices
• Similarity in donations among representatives• Similarity in voting among representatives
• What is the correlation between donations and voting?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
123-133
Example
Donations and voting patterns in the US 111th House ofRepresentatives
• Two two-mode matrices• Representatives by donors• Representatives by votes
• Convert to one-mode matrices• Similarity in donations among representatives• Similarity in voting among representatives
• What is the correlation between donations and voting?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
123-133
Example
Donations and voting patterns in the US 111th House ofRepresentatives
• Two two-mode matrices• Representatives by donors• Representatives by votes
• Convert to one-mode matrices• Similarity in donations among representatives• Similarity in voting among representatives
• What is the correlation between donations and voting?
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
124-133
Example
• Consider the baseline model conditioning on degreedistribution
• In the two mode case this conditions on:• the number of donations each donor makes• the number of donations each Representative receives
• In the one mode case:• the similarity in donations received
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
124-133
Example
• Consider the baseline model conditioning on degreedistribution
• In the two mode case this conditions on:
• the number of donations each donor makes• the number of donations each Representative receives
• In the one mode case:• the similarity in donations received
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
124-133
Example
• Consider the baseline model conditioning on degreedistribution
• In the two mode case this conditions on:• the number of donations each donor makes• the number of donations each Representative receives
• In the one mode case:• the similarity in donations received
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
124-133
Example
• Consider the baseline model conditioning on degreedistribution
• In the two mode case this conditions on:• the number of donations each donor makes• the number of donations each Representative receives
• In the one mode case:
• the similarity in donations received
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
124-133
Example
• Consider the baseline model conditioning on degreedistribution
• In the two mode case this conditions on:• the number of donations each donor makes• the number of donations each Representative receives
• In the one mode case:• the similarity in donations received
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
125-133
Example
Lorien JasnyBaseline Models for Two Mode Social Network DataPolicy Studies Journal (2012)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
126-133
Example
Lorien JasnyBaseline Models for Two Mode Social Network DataPolicy Studies Journal (2012)
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
127-133
Studying Network Dynamicswith MDS
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
128-133
Hamming Distance
• Distance between two matrices, A and B, is equal tothe number of dyads that would need to change for Ato be equivalent to B
• Need a one-to-one mapping of vertices in A and B
Distance = 2
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
129-133
Example: Hamming Distance
One column per network
On
ero
wp
ern
etw
ork
i,j cell is theHamming Distancebetween networks i and j
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
129-133
Example: Hamming Distance
One column per network
On
ero
wp
ern
etw
ork i,j cell is the
Hamming Distancebetween networks i and j
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
130-133
Example: Hamming Distance
• revealsqualitativedynamics
• pace ofchange
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
131-133
Example: Hamming Distance
• don’t overinterpretcurvature
• works wellwith valueddata
Butts and CrossChange and External EventsJournal of Social Structure, 2009
SNA
LJasny
Intro
DataStructures
Descriptives
HypothesisTesting
132-133
Code Time!
• Sections 6 and 7
top related