introduction to social network analysis in rstatnet.org/workshops/introtosnainr.pdfintroduction to...

510
SNA LJasny Intro Data Structures Descriptives Hypothesis Testing 1-133 Introduction to Social Network Analysis in R Lorien Jasny 1 1 Q-Step Centre, Exeter University [email protected] Sunbelt XXXVIII, Utrecht University 26 June 2018

Upload: others

Post on 25-Jun-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

1-133

Introduction to Social Network Analysis inR

Lorien Jasny1

1Q-Step Centre, Exeter [email protected]

Sunbelt XXXVIII, Utrecht University26 June 2018

Page 2: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 3: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 4: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 5: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 6: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 7: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 8: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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.

Page 9: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

3-133

Network Intuition

Page 10: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

3-133

Network Intuition

Page 11: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 12: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 13: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 14: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 15: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 16: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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 -

Page 17: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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 -

Page 18: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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 -

Page 19: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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 -

Page 20: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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 -

Page 21: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

-

Page 22: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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 -

Page 23: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 24: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 25: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 26: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 27: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 28: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 29: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 30: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 31: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 32: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 33: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 34: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 35: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 36: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 37: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 38: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 39: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 40: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 41: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 42: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 43: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 44: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 45: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 46: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 47: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 48: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 49: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 50: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 51: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 52: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 53: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 54: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 55: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 56: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 57: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 58: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 59: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 60: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 61: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 62: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 63: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 64: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 65: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 66: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 67: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 68: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 69: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 70: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 71: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 72: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 73: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 74: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 75: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 76: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 77: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 78: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 79: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 80: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 81: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 82: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 83: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 84: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 85: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 86: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 87: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 88: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 89: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 90: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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]

Page 91: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 92: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 93: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 94: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 95: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 96: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

19-133

Code Time!

• Sections 1-3

Page 97: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

20-133

Descriptives

• One isolate

• Two components

• Diameter is 5

• Medici is most popular

• Three triads

Page 98: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

20-133

Descriptives

• One isolate

• Two components

• Diameter is 5

• Medici is most popular

• Three triads

Page 99: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

20-133

Descriptives

• One isolate

• Two components

• Diameter is 5

• Medici is most popular

• Three triads

Page 100: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

20-133

Descriptives

• One isolate

• Two components

• Diameter is 5

• Medici is most popular

• Three triads

Page 101: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

20-133

Descriptives

• One isolate

• Two components

• Diameter is 5

• Medici is most popular

• Three triads

Page 102: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

20-133

Descriptives

• One isolate

• Two components

• Diameter is 5

• Medici is most popular

• Three triads

Page 103: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 104: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 105: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 106: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 107: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 108: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 109: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 110: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 111: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 112: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 113: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 114: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 115: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 116: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 117: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 118: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 119: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 120: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 121: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

23-133

Calculate degree centrality?

Page 122: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

23-133

Calculate degree centrality?

Page 123: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

24-133

Pseudo Code

for each vertex{Count the number of 1’s in the row

}

Page 124: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

24-133

Pseudo Code

for each vertex{Count the number of 1’s in the row

}

Page 125: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 126: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 127: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 128: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 129: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 130: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 131: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 132: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 133: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 134: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 135: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 136: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 137: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 138: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 139: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 140: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 141: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 142: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 143: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 144: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 145: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 146: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 147: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 148: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 149: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 150: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 151: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 152: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 153: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

28-133

Betweenness Centrality

Forrest Pitts 1978 “The River Trade Network of Russia,Revisited”

Page 154: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

28-133

Betweenness Centrality

Forrest Pitts 1978 “The River Trade Network of Russia,Revisited”

Page 155: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 156: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 157: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 158: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 159: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 160: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 161: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 162: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 163: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 164: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 165: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 166: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 167: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 168: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 169: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 170: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

32-133

Page Rank and EigenvectorCentrality

Page 171: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 172: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 173: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 174: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 175: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 176: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 177: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 178: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 179: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 180: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 181: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 182: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 183: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

34-133

Graph Level Indices

Page 184: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 185: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 186: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 187: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 188: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 189: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 190: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

36-133

Graph Level Indices

Page 191: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 192: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 193: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 194: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 195: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 196: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 197: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 198: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 199: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 200: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

39-133

Size, Density, and Mean Degree

If we hold the meandegree constant, butvary size, whathappens to density?

Page 201: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

39-133

Size, Density, and Mean Degree

If we hold the meandegree constant, butvary size, whathappens to density?

Page 202: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 203: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 204: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 205: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 206: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 207: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 208: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 209: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

42-133

Bavelas Experiments

Circle Line

Star Y

Page 210: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

FastestFewest errors

Most dissatisfied

Page 211: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

FastestFewest errors

Most dissatisfied

Page 212: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

FastestFewest errors

Most dissatisfied

Page 213: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

FastestFewest errors

Most dissatisfied

Page 214: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

Fastest

Fewest errors

Most dissatisfied

Page 215: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

FastestFewest errors

Most dissatisfied

Page 216: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

43-133

Bavelas Experiments

Circle

Star

Slowest to completion

Most errors

Most satisfied

FastestFewest errors

Most dissatisfied

Page 217: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

44-133

Dyad Census

Mutual (M)

Assymetric (A)

Null (N)

Page 218: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

44-133

Dyad Census

Mutual (M)

Assymetric (A)

Null (N)

Page 219: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

44-133

Dyad Census

Mutual (M)

Assymetric (A)

Null (N)

Page 220: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

44-133

Dyad Census

Mutual (M)

Assymetric (A)

Null (N)

Page 221: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 222: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 223: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 224: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 225: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

46-133

Triad Census

Page 226: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

46-133

Triad Census

Page 227: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 228: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 229: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

48-133

Triad Census

Dominance Relationships

Friendship, Assistance

Page 230: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

48-133

Triad Census

Dominance Relationships

Friendship, Assistance

Page 231: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

48-133

Triad Census

Dominance Relationships

Friendship, Assistance

Page 232: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 233: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 234: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 235: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 236: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 237: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 238: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 239: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 240: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

50-133

Forbidden Triad orStructural Hole?

• Granovetter, Mark S. 1973.“The Strength of Weak Ties”

Page 241: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

50-133

Forbidden Triad orStructural Hole?

• Granovetter, Mark S. 1973.“The Strength of Weak Ties”

Page 242: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

51-133

Forbidden Triad orStructural Hole?

• Granovetter, Mark S. 1973.“The Strength of Weak Ties”

Page 243: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

52-133

Forbidden Triad orStructural Hole?

• Burt, Ronald S. 2004.“Structural Holes: The SocialStructure of Competition”

Page 244: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 245: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 246: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 247: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 248: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 249: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 250: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 251: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 252: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 253: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 254: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 255: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 256: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 257: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 258: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 259: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 260: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 261: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 262: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 263: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

57-133

Brokerage: One Mode

Coordinator

Representative Gatekeeper Itinerant Liaison

Page 264: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

57-133

Brokerage: One Mode

Coordinator Representative

Gatekeeper Itinerant Liaison

Page 265: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

57-133

Brokerage: One Mode

Coordinator Representative Gatekeeper

Itinerant Liaison

Page 266: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

57-133

Brokerage: One Mode

Coordinator Representative Gatekeeper Itinerant

Liaison

Page 267: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

57-133

Brokerage: One Mode

Coordinator Representative Gatekeeper Itinerant Liaison

Page 268: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 269: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 270: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 271: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 272: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

59-133

Structural Balance

Page 273: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

60-133

Bernoulli ‘Random’ Graphs

• A probabilitydistribution for asuccess/failure

• Best known example isthe coin flip

Page 274: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

60-133

Bernoulli ‘Random’ Graphs

• A probabilitydistribution for asuccess/failure

• Best known example isthe coin flip

Page 275: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

60-133

Bernoulli ‘Random’ Graphs

• A probabilitydistribution for asuccess/failure

• Best known example isthe coin flip

Page 276: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 277: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 278: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 279: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 280: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 281: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 282: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 283: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 284: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 285: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

61-133

Bernoulli ‘Random’ Graphs

Page 286: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

62-133

Small Worlds

What are the characteristics of real world?

Page 287: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 288: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 289: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

64-133

Watts-Strogatz Model

• high clustering coefficient

• low diameter

Page 290: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

64-133

Watts-Strogatz Model

• high clustering coefficient

• low diameter

Page 291: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

64-133

Watts-Strogatz Model

• high clustering coefficient

• low diameter

Page 292: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 293: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 294: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 295: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 296: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 297: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 298: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 299: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 300: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 301: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

67-133

Watts-Strogatz Model

• high clusteringcoefficient

• low diameter

• starts with alattice structure

• randomlyre-wires ties

Page 302: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

67-133

Watts-Strogatz Model

• high clusteringcoefficient

• low diameter

• starts with alattice structure

• randomlyre-wires ties

Page 303: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

67-133

Watts-Strogatz Model

• high clusteringcoefficient

• low diameter

• starts with alattice structure

• randomlyre-wires ties

Page 304: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

68-133

Watts-Strogatz Model

Page 305: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

69-133

Watts-Strogatz Model

Page 306: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 307: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 308: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 309: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 310: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 311: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 312: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 313: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 314: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 315: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

71-133

Watts-Strogatz Model

Page 316: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

71-133

Watts-Strogatz Model

Page 317: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

71-133

Watts-Strogatz Model

Page 318: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 319: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 320: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 321: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 322: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 323: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 324: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 325: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

73-133

Barabasi-Albert Model

Page 326: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

73-133

Barabasi-Albert Model

Page 327: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

73-133

Barabasi-Albert Model

Page 328: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

73-133

Barabasi-Albert Model

Page 329: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

73-133

Barabasi-Albert Model

Page 330: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

73-133

Barabasi-Albert Model

Page 331: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

74-133

Barabasi-Albert Model

Page 332: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

75-133

Barabasi-Albert Model

Page 333: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

76-133

Barabasi-Albert Model

Barabsi, A.-L.; R. Albert (1999). “Emergence of scaling inrandom networks”. Science

Page 334: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

77-133

Code Time!

• Section 4

Page 335: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

78-133

Hypothesis Testing

Page 336: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 337: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 338: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 339: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 340: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 341: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 342: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 343: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 344: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 345: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 346: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

83-133

Correlation between DRS andDegree?

ρ = 0.86

ρ = −0.07

Page 347: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

83-133

Correlation between DRS andDegree?

ρ = 0.86

ρ = −0.07

Page 348: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

83-133

Correlation between DRS andDegree?

ρ = 0.86 ρ = −0.07

Page 349: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

84-133

Correlation between DRS andDegree?

ρ = 0.86

ρ = −0.07

ρ = −0.12

ρ = −0.39

Page 350: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

84-133

Correlation between DRS andDegree?

ρ = 0.86

ρ = −0.07

ρ = −0.12

ρ = −0.39

Page 351: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

84-133

Correlation between DRS andDegree?

ρ = 0.86

ρ = −0.07

ρ = −0.12

ρ = −0.39

Page 352: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

85-133

Correlation between DRS andDegree?

ρobs = 0.86

Pr(ρ ≥ ρobs)= 3e− 5

Pr(ρ < ρobs) = 0.9999

Page 353: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

85-133

Correlation between DRS andDegree?

ρobs = 0.86

Pr(ρ ≥ ρobs)= 3e− 5

Pr(ρ < ρobs) = 0.9999

Page 354: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

85-133

Correlation between DRS andDegree?

ρobs = 0.86

Pr(ρ ≥ ρobs)= 3e− 5

Pr(ρ < ρobs) = 0.9999

Page 355: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

85-133

Correlation between DRS andDegree?

ρobs = 0.86

Pr(ρ ≥ ρobs)= 3e− 5

Pr(ρ < ρobs) = 0.9999

Page 356: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 357: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 358: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 359: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 360: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 361: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

87-133

Code Time!

• 5.1-5.3

Page 362: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

88-133

Quadratic Assignment Procedure

Marriage Business

Page 363: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

89-133

Quadratic AssignmentProceedure

Marriage Business

Page 364: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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])

Page 365: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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])

Page 366: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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])

Page 367: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

91-133

Do business ties coincide withmarriages?

Marriage Business

ρ = 0.372

Page 368: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

92-133

Do business ties coincide withmarriages?

Marriage Business

ρ = 0.169

Page 369: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

92-133

Do business ties coincide withmarriages?

Marriage Business

ρ = 0.169

Page 370: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

93-133

Do business ties coincide withmarriages?

Marriage Business

ρ = −0.034

Page 371: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

94-133

Do business ties coincide withmarriages?

Marriage Business

ρ = −0.101

Page 372: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

95-133

QAP Test

ρobs = 0.372

Pr(ρ ≥ ρobs)= .001

Pr(ρ < ρobs) = 0.999

Page 373: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

95-133

QAP Test

ρobs = 0.372

Pr(ρ ≥ ρobs)= .001

Pr(ρ < ρobs) = 0.999

Page 374: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

95-133

QAP Test

ρobs = 0.372

Pr(ρ ≥ ρobs)= .001

Pr(ρ < ρobs) = 0.999

Page 375: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

95-133

QAP Test

ρobs = 0.372

Pr(ρ ≥ ρobs)= .001

Pr(ρ < ρobs) = 0.999

Page 376: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 377: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 378: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 379: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 380: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 381: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 382: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 383: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 384: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 385: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 386: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 387: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 388: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 389: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 390: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 391: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

98-133

Code Time!

• Sections 5.4 and 5.5

Page 392: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 393: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 394: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 395: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 396: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 397: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 398: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 399: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

100-133

The Classical Regression Model

Xiβ

εi

yi

Page 400: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

100-133

The Classical Regression Model

Xiβ

εi

yi

Page 401: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

100-133

The Classical Regression Model

Xiβ

εi

yi

Page 402: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

100-133

The Classical Regression Model

Xiβ

εi

yi

Page 403: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

101-133

Adding Network AR Effects

Xiβ

εi

yiXjβ

εj

yj

Xkβ

εk

yk

Page 404: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

101-133

Adding Network AR Effects

Xiβ

εi

yiXjβ

εj

yj

Xkβ

εk

yk

Page 405: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

101-133

Adding Network AR Effects

Xiβ

εi

yiXjβ

εj

yj

Xkβ

εk

yk

Page 406: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

102-133

Adding Network MA Effects

Xiβ

εi

yiXjβ

εj

yj

Xkβ

εk

yk

Page 407: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

102-133

Adding Network MA Effects

Xiβ

εi

yiXjβ

εj

yj

Xkβ

εk

yk

Page 408: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

103-133

Network ARMA Model

Xiβ

εi

yiXjβ

εj

yj

Xkβ

εk

yk

Page 409: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

104-133

Network ‘Resonance’

εi

εj

εk εl

Page 410: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

104-133

Network ‘Resonance’

εi

εj

εk εl

Page 411: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

104-133

Network ‘Resonance’

εi

εj

εk εl

Page 412: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

104-133

Network ‘Resonance’

εi

εj

εk εl

Page 413: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

104-133

Network ‘Resonance’

εi

εj

εk εl

Page 414: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

104-133

Network ‘Resonance’

εi

εj

εk εl

Page 415: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 416: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 417: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 418: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 419: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 420: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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)

Page 421: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 422: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 423: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 424: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 425: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 426: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 427: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 428: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 429: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 430: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 431: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 432: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 433: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

108-133

Leenders 2002

Page 434: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

109-133

Leenders 2002

Page 435: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 436: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 437: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 438: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 439: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 440: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 441: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 442: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

111-133

Leenders 2002

Page 443: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

112-133

Leenders 2002

Page 444: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

113-133

Code Time!

• Section 5.6

Page 445: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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’

Page 446: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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’

Page 447: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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’

Page 448: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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’

Page 449: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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’

Page 450: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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’

Page 451: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

115-133

Types of Baseline Hypotheses

Empirical Network . . . etc

Page 452: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

115-133

Types of Baseline Hypotheses

Empirical Network

. . . etc

Page 453: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

115-133

Types of Baseline Hypotheses

Empirical Network

. . . etc

Page 454: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

115-133

Types of Baseline Hypotheses

Empirical Network

. . . etc

Page 455: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

115-133

Types of Baseline Hypotheses

Empirical Network . . . etc

Page 456: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

116-133

Types of Baseline Hypotheses

Empirical Network

. . . etc

Page 457: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

116-133

Types of Baseline Hypotheses

Empirical Network

. . . etc

Page 458: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

116-133

Types of Baseline Hypotheses

Empirical Network

. . . etc

Page 459: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

116-133

Types of Baseline Hypotheses

Empirical Network . . . etc

Page 460: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 461: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 462: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 463: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 464: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 465: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 466: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 467: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 468: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 469: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 470: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 471: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 472: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 473: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 474: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 475: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

120-133

Example

Page 476: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

121-133

Example

Page 477: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 478: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 479: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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?

Page 480: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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?

Page 481: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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?

Page 482: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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?

Page 483: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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?

Page 484: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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?

Page 485: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 486: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 487: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 488: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 489: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 490: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

125-133

Example

Lorien JasnyBaseline Models for Two Mode Social Network DataPolicy Studies Journal (2012)

Page 491: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

126-133

Example

Lorien JasnyBaseline Models for Two Mode Social Network DataPolicy Studies Journal (2012)

Page 492: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

127-133

Studying Network Dynamicswith MDS

Page 493: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 494: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 495: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 496: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 497: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 498: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 499: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 500: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 501: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 502: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 503: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 504: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 505: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 506: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 507: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 508: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

130-133

Example: Hamming Distance

• revealsqualitativedynamics

• pace ofchange

Page 509: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

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

Page 510: Introduction to Social Network Analysis in Rstatnet.org/Workshops/IntroToSNAinR.pdfIntroduction to Social Network Analysis in R Lorien Jasny1 1Q-Step Centre, Exeter University l.jasny@exeter.ac.uk

SNA

LJasny

Intro

DataStructures

Descriptives

HypothesisTesting

132-133

Code Time!

• Sections 6 and 7