1 of 76

Introduction to the Models and Tools of Network Analysis�Part 3: Selection: Latent Factor Selection Models in R

Ken Frank

1

2 of 76

Overview

  • Introduction
  • Influence
  • Selection
    • Selection: How Actors Choose Others with whom to Interact
    • Selection Model
    • Selection Exercise
    • Estimation of Selection Model
    • Running selection in Amen
    • Selection Application Transition from Social Exchange to quasi ties ...
  • Graphical Representations
  • Centrality
  • Ethics
  • Resources

2

3 of 76

Selection: How Actors Choose Others with whom to Interact�

Examples of Research Questions

How do farmers decide to whom to provide help?

How do bankers decide to whom to loan money?

How do social service agencies choose other agencies to refer clients to?

Theoretical Mechanisms (see Frank and Fahrbach, 1999)

Frank, K.A., & Fahrbach, K. (1999). "Organizational Culture as a Complex System: balance and Information in Models of Influence and Selection." Special issue of Organization Science on Chaos and Complexity, Vol 10, No. 3, pp. 253-277.

Balance seeking/homophily -- seeking to interact with others like yourself

Information seeking Goal oriented , Reduce uncertainty , Power oriented , Better understanding , Curiosity, Inoculate

Transaction costs: Constraints on exposure

Frank, K.A., Muller, C., Mueller, A.S., 2013. The Embeddedness of Adolescent Friendship Nominations: The Formation of Social Capital in Emergent Network Structures.  American Journal of Sociology, Vol 119(1):216-253. 

Status seeking – talk to popular others (preferential attachment)

Zerubavel, N., Bearman, P. S., Weber, J., & Ochsner, K. N. (2015). Neural mechanisms tracking popularity in real-world social networks. Proceedings of the National Academy of Sciences112(49), 15072-15077

3

4 of 76

5 of 76

We see the World in Networks

6 of 76

7 of 76

Selection of Network Partners: Graphical Representation

7

t

t-1

8 of 76

Examples of Selection

Frank, K.A., Muller, C., Mueller, A.S., 2013. The Embeddedness of Adolescent Friendship Nominations: The Formation of Social Capital in Emergent Network Structures. American Journal of Sociology, Vol 119(1):216-253. Media hits: Atlantic; Huffington Post; Huffington Post (Op-ed); US News and World Report; Yahoo; Health Day; RedOrbit; The Times of India; MSUToday: Psych Central: Positions and Promotions; Deccan Chronicle: wood radio: Fox Chicago: local news channels (south Carolina): Science Daily; National Science Foundation

Spillane, J., Kim, Chong Min, Frank, K.A. 2012. “Instructional Advice and Information Providing and Receiving Behavior in Elementary Schools: Exploring Tie Formation as a Building Block in Social Capital Development.” American Educational Research Journal. Vol 49 no. 6 1112-1145

Crosnoe, Robert, Anna Strassman-Mueller, and Frank, K.A. 2008. “Gender, Body Size, and Social Relations in American High Schools.” Social Forces 86: 1189-1216.

Frank, K. A. and Zhao, Y. (2005). "Subgroups as a Meso-Level Entity in the Social Organization of Schools." Chapter 10, pages 279-318. Book honoring Charles Bidwell's retirement, edited by Larry Hedges and Barbara Schneider. New York: Sage publications

Frank, K.A. & Yasumoto, J. 1998. "Linking Action to Social Structure within a System: Social Capital Within and Between Subgroups." American Journal of Sociology, Volume 104, No 3, pages 642-686

Wilhelm, A.G., Chen, I.C., Smith, T.M. and Frank, K.A., 2016. Selecting Expertise in Context Middle School Mathematics Teachers’ Selection of New Sources of Instructional Advice. American Educational Research Journal, 53(3), pp.456-491.

8

9 of 76

Selection Model

9

  • wii’

Interactions between i and i’ between t-1 and t

  • yi
    • An attitude or behavior of actor i at time t
  • θ0: intercept, ln odds of tie occurring when |yi-yi’|=0
  • θ1 : increase in ln odds of tie occurring for 1 unit increase in |yi-yi’|.
    • Negative value of θ1 🡪 the more different are two actors, the less likely they will have a tie. Homophily.

10 of 76

The Logistic Regression Model

The "logit" model :��ln[p/(1-p)] = β0 + β1X �

  • p is the probability that the event Y occurs, p(wii’=1)
    • [range=0 to 1]
  • p/(1-p) is the "odds ratio"
    • [range=0 to ∞]
  • ln[p/(1-p)]: log odds ratio, or "logit“
    • [range=-∞ to +∞]

10

11 of 76

11

w

W=1

W=0

P(w|x)

12 of 76

Interpretation of Ogive

  • The logistic distribution constrains the estimated probabilities to lie between 0 and 1.
  • The estimated probability is:�� p = e(β0 + β1X) /[1 + e(β0 + β1X )] �
  • if you let β0 + β1X =0, then p = .50
  • as β0 + β1X gets really big, p approaches 1
  • as β0 + β1X gets really small, p approaches 0

12

13 of 76

Introducing the Odds Ratio for the Logistic Transformation

  • If there is a 75% chance that it will rain tomorrow, then 3 out of 4 times we say this it will rain. That means for every three times it rains once it will not. The odds of it raining tomorrow are 3 to 1. This can also be understood as (¾)/(¼)=3/1.
  • If the odds that my pony will win the race is 1 to 3, that means for every 4 races it runs, it will win 1 and lose 3. Therefore I should be paid $3 for every dollar I bet.

13

14 of 76

Example Interpretation of coefficient β1

14

Odds=p/(1-p)

Odds of tie for same gender = (20/25)/(5/25)=4

Odds of tie for different gender = (10/15)/(5/15)=2

Change in odds due to same gender =4/2=2

Can also be calculated as (AD)/(BC)=(20x5)/(10x5)=2

Logistic regression coefficient=LN(2)=.693

Change in odds =e β0 + β1/e β0=eβ1 =e.693 =2

tie

No

yes

Same gender

no

A 5

B 10

yes

C 5

D 20

total

10

30

15 of 76

Selection Exercise

A) Write a model for whether two actors talked as a function of whether they are of different race and whether they are of different gender.

wii’ represents whether i and i’ talked,

yi represents the gender of i (0 if male, 1 if female), and

zi represents the race of i (0 if white, 1 if African American)

(You’ll need one term for effects associated with gender, and another for race)

15

16 of 76

Selection Exercise

B) Assume that Bob and Lisa are African American and that Jane and Bill are white. Bill and Bob are male and Lisa and Jane are female.

Calculate the independent variables based on difference of race and gender for Bob with each of his interaction partners:

(Bob, Lisa): different gender = _______; different race = _________

(Bob, Jane): different gender =_______; different race = _________

(Bob, Bill): different gender = _______; different race =__________

16

17 of 76

Selection Exercise

C) Assuming the values of the θ’s are negative and that the effect of race is stronger than that of gender, who is Bob most likely to talk to?

D) Include a term capturing the interaction of race and gender

17

18 of 76

Estimation of Selection Model

Use the example of wii’ being whether one teacher helped another (1 if helped, 0 if not)

Naive: logistic regression:

18

19 of 76

19

1 2 3 4 5 6

1|0 1 1 0 0 0

2|1 0 1 0 0 0

3|0 1 0 1 0 1

4|0 0 0 0 1 1

5|0 0 0 1 0 0

6|0 0 1 1 0 0

ROW COLUMN WEIGHT

1 2 1

1 3 1

1 4 0

1 5 0

1 6 0

2 1 1

2 3 1

2 4 0

2 5 0

2 6 0

3 1 0

3 2 1

3 4 1

3 5 0

Nominator Nominee W(help)

.

.

.

Matrix

Edgelist

Logistic Regression?

Just model the 1 or 0 as an outcome?

20 of 76

Estimation of Selection Model

Use the example of wii’ being whether one teacher helped another (1 if helped, 0 0 if not)

Naive: logistic regression:

Likelihood function: p(A and B) = p(A)×p(B) if A and B are independent. NO!

Helpii’ is not independent of Helpii” !

20

21 of 76

The p1 Approach

21

Wi’i =0

Wi’i =1

Wii’ =0

Cell A

(reciprocity)

Cell B

Wii’ =1

Cell C

Cell D

(reciprocity)

Model as 4 cells, A,B,C,D instead of just Wii’ =0

Holland, Paul W. and S. Leinhardt. 1981. "An Exponential Family of Probability Distributions for Directed Graphs." Journal of American Statistical Association 76(373):33-49.

22 of 76

Estimation via p*�

22

23 of 76

Visual representations of p2 model�control for dependencies associated with nominator and nominee�

23

Van Duijn, M.A.J. (1995). Estimation of a random effects model for directed graphs. In: Snijders, T.A.B. (Ed.) SSS '95. Symposium Statistische Software, nr. 7. Toeval zit overal: programmatuur voor random-coefficient modellen [Chance is omnipresent: software for random coefficient models], p. 113-131. Groningen, iec ProGAMMA.

SOFTWARE http://stat.gamma.rug.nl/stocnet/

Lazega, E. and van Duijn, M (1997). “Position in formal structure, personal characteristics and choices of advisors in a law firm: a logistic regression model for dyadic network data.” Social Networks, Vol 19, pages 375-397.

Hoff, P.D., 2005. Bilinear mixed-effects models for dyadic data. Journal of the american Statistical association100(469), pp.286-295.

https://www.stat.washington.edu/~pdhoff/

θ1

β

γ01

ai

bi’

β

β

24 of 76

Cross-nesting

24

Nominees nested within nominators

Nominator nested within nominees

nominator effects ai

Nominee effects bi’

25 of 76

Selection and Influence

  • Selection and Influence always present
    • Ignore them at your peril! – biased / wrong estimates

25

Influence

selection

0 1 2 3

Time

Change in Behavior

Change in Relations

Behavior |

Relations |

Leenders, R. (1995). Structure and influence: Statistical models for the dynamics of actor attributes, network structure and their interdependence. Amsterdam: Thesis Publishers.

26 of 76

Causality

  • Is it selection or influence?
    • Do people choose to interact with others like themselves (selection) or do they change
      • Birds of a feather flock together
    • Beliefs/behaviors based on interactions with others (influence)?
      • She’s hanging out with the wrong crowd!
  • Need longitudinal data!!!!!!!
    • Influence
      • With whom did you talk over the last week: asked at week 2 (1🡪2)
      • What are your beliefs? (asked at week 1)
      • What are your beliefs (asked at week 2)
    • Selection
      • With whom did you talk over the last week: asked at week 1 (0🡪 1)
      • With whom did you talk over the last week: asked at week 2 (1🡪 2)
      • What are your beliefs? (asked at week 1, or asked at weeks 1 and 2 and take the average)

26

27 of 76

Peter Hoff’s additive, multiplicative, and latent factor models

27

See also: Sweet, T. M., Thomas, A. C., & Junker, B. W. (2013). Hierarchical Network Models for Education Research Hierarchical Latent Space Models. Journal of Educational and Behavioral Statistics38(3), 295-318.

28 of 76

Latent space adjusted approach

  • Latent space modeling (Hoff et al., 2002)

Assume latent social position in a n-dim space that can determine probability of interaction

28

From Hoff et al. (2002)

Note here we use actors i and j instead of i and i’

reflection

29 of 76

Latent Space as Proxy for Unobserved Attributes with Tie to k

29

i

k

j

Latent space

L

M

Observed network

Shadow network

ci

cj

ck

30 of 76

Latent Space as Proxy for Unobserved Attributes: No Tie to k

30

i

k

j

Latent space

L

M

Observed network

Shadow network

ci

cj

ck

31 of 76

Hoff’s notation

31

Tie

i 🡪 j

Dyadic covariate

Row covariate

Sender

nominator

Column covariate

Receiver

nominee

Row random effect

Column random effect

Similarity on latent factors

Wii’

32 of 76

Latent Space vs Latent Factor

32

-5 -4 -3 -2 -1 0 1 2 3 4 5

3

2

1

0

-1

-2

-3

Dim 1

Dim 2

Sqrt(1.22 +-.52)=1.3

33 of 76

Selection of Network Partners: Graphical Representation

33

VDE

VCE

VBE

Shared paths (as in ERGM) =2

E

34 of 76

Selection of Network Partners: Graphical Representation

34

uDE

uCE

uBE

Shared nominations as in ERGM=2

E

35 of 76

Latent factor instead of latent space

  • Latent space mix strong ties with stochastic equivalence. Too predictive?
  • Latent factor controls for where you are on each dimension of latent space

35

36 of 76

36

37 of 76

Page 11

37

38 of 76

Software

38

39 of 76

39

40 of 76

Latent space Selection Model

40

Absolute value of difference

in attributes

Represents the effect of difference in attribute

+Plotted Distance between i and i’

41 of 76

Latent factor

  • Distance in latent space may capture too much information about direct ties
  • Instead, control for latent factor – where you are on each dimension of latent space

41

42 of 76

Reciprocity: Wii’ (as yij) Wi’i (as yji) Modeled Simultaneously (Lazega and Van Duijn 1997)

42

43 of 76

Selection Model (p2)

43

Pair Level (i,i’)

Sender Level (i) or nominator

Receiver Level (i’) or nominee

ui ~N(0,τu)

Vi’ ~N(0,τv)

Difference

In attribute

reciprocity

Sender

attribute

Receiver

attribute

Sender

variance

Receiver

variance

44 of 76

Toy Data

44

Network (w)

Attribute

attr1 attr2

2

2

3

2

1

2

total

Total 1 2 3 3 1 2

In-degree

Out-degree

45 of 76

Hoff’s notation

45

Tie

i 🡪 j

Dyadic covariate

Row covariate

Sender (out-degree)

nominator

Column covariate

Receiver (in-degree)

nominee

Row random effect

Column random effect

Similarity on latent factors

46 of 76

Toyfit1: �Latent factor selection models �line 62: toyfit1 <-ame(matnet, Xr=allatt, print=F)

46

Regression coefficients:

pmean psd z-stat p-val

intercept 0.278 0.366 0.758 0.448

attr1.row -0.072 0.402 -0.179 0.858

attr2.row 0.117 0.552 0.211 0.833

Variance parameters:

pmean psd

va 0.365 0.346

cab 0.025 0.157 (covar of a,b)

vb 0.261 0.171

rho 0.522 0.231 (reciprocity)

ve 0.326 0.144

Pmean is posterior mean effect

Psd is approximate posterior standard error

For a 1 unit increase in attr1 the log odds of a tie increase .117

47 of 76

47

W

|Yi-Yi’ |

48 of 76

toyfit3 <-ame(matnet, Xd=abattr1, print=F)�summary(toyfit3)�

48

Regression coefficients:

pmean psd z-stat p-val

intercept 0.785 0.352 2.230 0.026

.dyad -0.168 0.080 -2.106 0.035

[difference on attribute 1 is stat sig]

Variance parameters:

pmean psd

va 0.243 0.166

cab 0.019 0.119

vb 0.262 0.200

rho 0.423 0.270

ve 0.268 0.123

49 of 76

Two dimensions of latent space�toyfit6 <-ame(matnet, Xd=abattr1, Xr=attr1, Xc=attr2, R=2, print=F, family="nrm")�summary(toyfit6)

49

2 dimensions latent space

fit

50 of 76

No latent space�toyfit6nl <-ame(matnet, Xd=abattr1, Xr=attr1, Xc=attr2, print=F, family="nrm")�summary(toyfit6nl)

50

51 of 76

Selection Exercise 2

1) Start by modeling with just attribute 1 as a row (sender covariate)

  • For each of the below, examine how the estimate and standard error change for attribute 1
  • + row random effects
  • + column random effects
  • +dyadic difference on attribute 1,
  • + latent factor

2) Changing data

  • Change attr1 to make it more predictive of the row (nominations sent)
  • Change the network data to make attr1 more predictive of the row
  • Change the network data (toynet.csv) to increase the effect of similarity on attribute 1 on forming a tie.
  • Change the attribute data (toyatt.csv) to increase the effect of similarity on attribute 1 on forming a tie.

51

52 of 76

Exercise for P2

  • How can you make an inference about the effect of similarity of an attribute
  • What happens to the similarity of attribute when you control for time 1?
  • Try putting in the model:
    • Difference in attribute1+attribute1 on sender+attribute1 on receiver
      • Did it work?
  • What is the difference between putting in difference in attribute instead of absolute value of the difference?

53 of 76

53

54 of 76

Using statnet

  • Overview
  • Access R
  • Running R

54

55 of 76

55

56 of 76

Basic statnet setup

56

57 of 76

Basic ERGM in statnet �from statnet tutorial

57

58 of 76

58

59 of 76

59

60 of 76

60

61 of 76

61

62 of 76

Concerns about Causality

62

Outcome: advice from i’ to i

Prior advice from i’ to i

Similarity of behavior between i’ and i

Influence

selection

63 of 76

63

. For every pair of school staff i and j, if i turned to j for advice about instruction the ij relationship was assigned a value of 1 and 0 otherwise.

64 of 76

64

65 of 76

65

66 of 76

Selection Application�Transition from Social Exchange to Systemic Exchange Via Quasi-Ties�video : (42:25-48:00)

66

Frank, K.A. 2009 Quasi-Ties: Directing Resources to Members of a CollectiveAmerican Behavioral Scientist.  52: 1613-1645

67 of 76

p2 extended model

67

Quasi-tie

68 of 76

Interaction of Close Colleagues and Identification of the Potential Provider on the Provision of Help: Evidence of a Quasi-Tie

68

69 of 76

Cross Nested Multilevel Poisson Regression (i.e., p2 social network model)�of Extent (# of days per year) to which i’ Helped i

69

Quasi-tie

70 of 76

Examples of Selection

70

71 of 76

Selection Answers

71

72 of 76

Selection Answers

72

73 of 76

Selection Answers

73

Note: variable is 1 if different gender, 0 if same gender.

Could also make it: 1 if same gender, 0 if different gender

74 of 76

Selection answers

74

C

D

For Bob and Jane: .4-.2(1)-.5(1)= -.3

If θ0=.4 and θ1= -.2 and θ2= -.5 then

Bob : Lisa

75 of 76

Scenarios for the Network analyst

For each of the scenarios below,

identify the theoretical processes at work

write down what model or tool you would employ to evaluate the theory.

describe what data you would collect to apply the model or tool to

describe what estimation procedure/tool you would use.

Sally is concerned that her daughter is experimenting with alcohol and thinks it is because her daughter’s friends are experimenting. Sally wonders generally if adolescents tend to drink more if their friends drink alcohol.

Michael wants to understand the social structure of his synagogue (church). He has an idea that there are certain sets of people who interact with each other, and, if he could understand what those sets of people are, he might better be able to tailor programs of the synagogue to be more effective.

How could Michael use the information above track the diffusion of new beliefs or behaviors in his synagogue?

Pennie wants to know under what conditions one social service agency would allocate resources to another. Is it because they have a history of doing so, they share clients, they deal with similar issues, etc.

What clustering among social service agencies might emerge as a result of the processes above?

75

76 of 76

Reflection

  • What part is most confusing to you?
    • Why?
    • More than one interpretation?
  • Talk with one other, share