代写接单-MY461/MY561: Week 10 Problem Set MY461/MY561 - Social Network Analysis

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top

 27/03/2023, 14:30 MY461/MY561: Week 10 Problem Set

  My courses / MY461/MY561 / Week 10 - Hypothesis testing: Exponential random graph models / Week 10 Problem Set

MY461/MY561 - Social Network Analysis

This course focuses on data about connections, forming structures known as networks. Networks and network data describe an increasingly vast part of the modern world, through connections on social media, communications, financial transactions, and other ties. This course covers the fundamentals of network structures, network data structures, and the analysis and presentation of network data. Students will work directly with network data and structure and analyze these data using R.

For more information see the course guide.

    Week 10 Problem Set

This week, we will revisit the dataset representing relationships between lawyers in an American law firm, gathered by Emmanuel Lazega (see Lazega, E. (2001). The collegial phenomenon: The social mechanisms of cooperation among peers in a corporate law partnership. Oxford University Press.). As a reminder...

Every lawyer in the firm was asked to nominate people from a full list of their colleagues in response to three prompts:

Advice: "Think back over the past year, consider all the lawyers in your Firm. To whom did you go for basic professional advice? For instance, you want to make sure that you are handling a case right, making a proper decision, and you want to consult someone whose professional opinions are in general of great value to you. By advice I do not mean simply technical advice." Friendship: "Would you go through this list, and check the names of those you socialize with outside work. You know their family, they know yours, for instance. I do not mean all the people you are simply on a friendly level with, or people you happen

 https://moodle.lse.ac.uk/mod/assign/view.php?id=698819

1/6

 

27/03/2023, 14:30 MY461/MY561: Week 10 Problem Set

  to meet at Firm functions."

Co-Work: "Because most firms like yours are also organized very informally, it is difficult to get a clear idea of how the members really work together. Think back over the past year, consider all the lawyers in your Firm. Would you go through this list and check the names of those with whom you have worked with. [By "worked with" I mean that you have spent time together on at least one case, that you have been assigned to the same case, that they read or used your work product or that you have read or used their work product; this includes professional work done within the Firm like Bar association work, administration, etc.]"

The responses to these questions form the basis of the edge lists provided. We also provide you with another file that includes information about each of the lawyers. There are 8 attributes:

ID: The ID for each lawyer

Status: (1 = partner (a more senior position); 2=associate (a more junior position)) Gender: (1 = male; 2 = female)

Office: (1 = Boston; 2 = Hartford; 3 = Providence)

Seniority: number of years with the firm

Age

Practice: (1 = litigation; 2 = corporate)

LawSchool: (1 = Harvard or Yale; 2 = University of Connecticut; 3 = Other)

Our primary focus this week will be on the advice network, and we will also make use of the friendship network. I am providing you with the code below to generate the network objects (please do use this code -- there is a quirk with how statnet would otherwise generate the networks which could lead to some unnecessary complication):

  https://moodle.lse.ac.uk/mod/assign/view.php?id=698819

2/6

 

 27/03/2023, 14:30 MY461/MY561: Week 10 Problem Set

   As we are going to be using the ergm() function in the ergm package of the statnet suite of packages, you should be using the statnet versions of the network objects (i.e., you should be using snet_ad not net_ad).

 require(igraph)

require(intergraph)

el_ad <- read.csv("Law_Advice.csv", header = TRUE, as.is = TRUE)

el_fr <- read.csv("Law_Friendship.csv", header = TRUE, as.is = TRUE)

law_att <- read.csv("Law_NodeAtt.csv", header = TRUE, as.is = TRUE)

net_ad <- graph_from_edgelist(as.matrix(el_ad), directed = TRUE)

net_fr <- graph_from_edgelist(as.matrix(el_fr), directed = TRUE)

attify <- function(n_net){

  V(n_net)$names <- V(n_net)

  V(n_net)$Status <- law_att$Status

  V(n_net)$Gender <- law_att$Gender

  V(n_net)$Office <- law_att$Office

  V(n_net)$Seniority <- law_att$Seniority

  V(n_net)$Age <- law_att$Age

  V(n_net)$Practice <- law_att$Practice

  V(n_net)$LawSchool <- law_att$LawSchool

  return(n_net)

}

net_ad <- attify(net_ad)

net_co <- attify(net_co)

net_fr <- attify(net_fr)

snet_ad <- intergraph::asNetwork(net_ad)

snet_fr <- intergraph::asNetwork(net_fr)

detach(package:igraph)

require(ergm)

require(sna)

https://moodle.lse.ac.uk/mod/assign/view.php?id=698819

3/6

 

 27/03/2023, 14:30 MY461/MY561: Week 10 Problem Set

 With this in hand...

1. Fit an ERG model including terms for: the effect of age (overall activity, i.e., ignoring tie directionality), status on incoming ties, status on outgoing ties, gender homophily, office homophily, and practice homophily. Print the model results with summary(). [1 point]

2. Interpret each of the terms (except the first “edges” term) of the ERGM. Report the odds ratio associated with each. Do so in prose, so that we can check your comprehension. [2 points]

3. Report the expected probability of a tie between two lawyers with the following characteristics [1 point]:

1. both with the median age of 39, both associates (i.e., both with a coding of 2), both of the same gender, working in the same office, and both practicing the same type of law;

2. both with the median age of 39, both associates (i.e., both with a coding of 2), both of the same gender, working in different offices, and both practicing the same type of law;

3. both with the median age of 39, one being an associate (i.e., one with a coding of 2) and one a partner (i.e., with a coding of 1), both of the same gender, working in the same office, and both practicing the same type of law

4. Fit a new ERGM with all of the same terms as above, but additionally with a reciprocity term (include mutual), a shared partners term (include gwesp(0.8, fixed = TRUE)), and a term for the friendship network (include edgecov(snet_fr)). Give explicit interpretations of the new terms. Compare the results of this new ERGM to the one previously run – how have things changed? [3 points]

--> Because it can take a few moments for this to run, please (1) include but comment out the lines of code that would run and summarize the model, (2) include the summary output for the model as a commented out chunk of text in your R file (to do this easily, you should just copy the summary output, paste it into your R file, highlight those lines and then select “Comment/Uncomment Lines” from the Code dropdown menu in RStudio – this should put a # in front of each of the lines). (If you are using RMarkdown and want to in some other way include this code without evaluating it and include the output of the results, you are free to do so).

  https://moodle.lse.ac.uk/mod/assign/view.php?id=698819

4/6

 

 27/03/2023, 14:30 MY461/MY561: Week 10 Problem Set

5. Now consider how well we are matching the structure of the network with our two ERG models. Look at the goodness of fit plots, including these as part of your submission. How are we doing in modelling the observed network? Are you satisfied with this? What are we not getting well? Consider how you might change the model. This could be by including other terms involving the attributes we are already including, or could involve attributes that we haven’t included yet (look back to the metadata file to see what other covariates exist). Give a rationale for an alternative term that you propose for inclusion in the ERGM. Run this new third ERGM that includes your proposed reformulation. How do the model results change (comparing to the ERGM from question #4)? Does your term have a strong effect on the likelihood of a tie? How does it affect the other terms in the model? [3 points]

--> Include the GOF plots either as stand-alone PDF files or as part of a knitted PDF resulting from your RMarkdown file. Again, comment out the line that would define this new ERGM, and include the summary output of the model (or otherwise ensure that we do not need to run the ERGM to see the results), as done for question 4.

 Law_Advice.csv Law_All.csv Law_CoWork.csv Law_Friendship.csv Law_NodeAtt.csv

Submission status

Submission No attempt status

Grading status Not marked

14 March 2023, 8:02 PM 14 March 2023, 8:02 PM 14 March 2023, 8:02 PM 14 March 2023, 8:02 PM 14 March 2023, 8:02 PM

                 https://moodle.lse.ac.uk/mod/assign/view.php?id=698819

5/6

 

 27/03/2023, 14:30 MY461/MY561: Week 10 Problem Set

   Due date

Time remaining

Last modified

Submission comments

Thursday, 30 March 2023, 10:00 AM 2 days 19 hours

-

      Ú Comments (0)

   ◄ ERGM statnet resources

Add submission

You have not made a submission yet.

 Jump to...

Week 11 readings ►

 https://moodle.lse.ac.uk/mod/assign/view.php?id=698819

6/6

 

 


51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468