What is included in the law_friends data set?

The law_friends network, which was found in the networkdata R package, consists of 71 American law firm workers in which the respective question posed to each individual was regarding which of their coworkers they considered to be friends outside of a mere work connection. The data set includes attributes such as a participant’s gender and the school they graduated from.

Hypothesis Regarding the Influence of Gender and Law School:

My hypothesis is that lawyers of the same gender and law school they attended will be more likely to form friendships in comparison to their other colleagues who do not share those attributes thus supporting the idea of homophily within this network.

Visualization of the Network and Interpretation:

Looking at the two network plots above, the leftmost one identifies each node by their gender in which male is associated with blue while female is identified by red. The rightmost plot depicts the school an individual graduated from in which red means that they graduated from Harvard or Yale, blue means that they graduated from the University of Connecticut, and finally green indicates that one graduated from other universities not specified.

When I saw the plots, I found that it appeared that gender had a greater impact on how friendships were formed based on how groupings of both red and then blue nodes were more visible compared to how ties were formed when you factor the school the lawyers graduated from though there isn’t a distinctive answer as to how those two aspects impact the friendship dynamics of this law firm as of yet.

Using the ERGM model and Goodness of Fit Plot to Determine the Significance of Gender and Law School:

Our first ERGM model tests how significant the gender attribute is by indicating how significant the inclusion of it is when determining if it helps fit the law_friends network to the respective ERGM model.

## Call:
## ergm(formula = law ~ edges + nodecov("gender"))
## 
## Maximum Likelihood Results:
## 
##                Estimate Std. Error MCMC % z value Pr(>|z|)    
## edges          -1.25903    0.23357      0  -5.390   <1e-04 ***
## nodecov.gender -0.15883    0.09203      0  -1.726   0.0844 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##      Null Deviance: 3445  on 2485  degrees of freedom
##  Residual Deviance: 2187  on 2483  degrees of freedom
##  
## AIC: 2191  BIC: 2202  (Smaller is better. MC Std. Err. = 0)

A p-value of 0.0844 indicates that the attribute gender does not in fact improve the model because it is not a significant value. Essentially, gender does not influence how friendships were formed. It is within the 90% confidence interval; however, it still isn’t a huge factor when it comes to how friendships were formed within this specific context.

Secondly, by plotting the goodness of fit model results I found that the simulated plots generated from the ERGM model underestimated the lower and higher degrees while overestimating the medium ones indicating that the model may not necessarily be the best fit when considering the impact of gender on the lawyer’s friendships.

## Call:
## ergm(formula = law ~ edges + nodecov("law_school"))
## 
## Maximum Likelihood Results:
## 
##                    Estimate Std. Error MCMC % z value Pr(>|z|)    
## edges              -1.27635    0.22683      0  -5.627   <1e-04 ***
## nodecov.law_school -0.08717    0.05120      0  -1.702   0.0887 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##      Null Deviance: 3445  on 2485  degrees of freedom
##  Residual Deviance: 2187  on 2483  degrees of freedom
##  
## AIC: 2191  BIC: 2203  (Smaller is better. MC Std. Err. = 0)

A p-value of 0.0887 indicates that the attribute law_school does not in fact improve the model because it is not a significant value. Essentially, the law school one graduated from does not influence how friendships were formed. Once again, it is within the 90% confidence interval though it remains inconclusive whether this attribute impacted how friendships were formed among the lawyers.

The results of both the p-value test along with the goodness of fit plots are extremely similar to the findings in the previous model testing the influence of the gender attribute, which makes sense as neither aspect appears to be that significant when determining how the friendships were formed in the firm.

## Call:
## ergm(formula = law ~ edges + nodecov("law_school") + nodecov("gender"))
## 
## Maximum Likelihood Results:
## 
##                    Estimate Std. Error MCMC % z value Pr(>|z|)  
## edges              -0.83997    0.32865      0  -2.556   0.0106 *
## nodecov.law_school -0.09182    0.05112      0  -1.796   0.0725 .
## nodecov.gender     -0.16735    0.09220      0  -1.815   0.0695 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##      Null Deviance: 3445  on 2485  degrees of freedom
##  Residual Deviance: 2184  on 2482  degrees of freedom
##  
## AIC: 2190  BIC: 2207  (Smaller is better. MC Std. Err. = 0)

Conclusion:

Overall, the findings were not entirely conclusive, as the attributes gender and law school individually were not that influential when determining the causational relationship they had on how the lawyers made friends within their firm. On the other hand, when combining both aspects there showed a higher chance of there being an influence when considering the impact of both but once again my conclusion was that homophily was not overly prominent within this network in contrast to my initial hypothesis which proposed that homophily was a large factor in how the lawyers formed their friendships in their firm.

Resources Consulted

http://networkdata.schochastics.net/

https://networkdata.schochastics.net/reference/law_friends.html

https://community.rstudio.com/t/how-to-add-a-hyperlink-or-reference-to-external-site-in-yaml-in-github/112359