The purpose of this homework is to familiarize you with estimating exponential random graph models (ERGMs) in R. Please review the following materials before beginning this homework:
For this part of the homework you will use data from Thomas
Grund and James Densley’s study of ties among members of an
inner-city gang in London, England. The network is undirected, binary
ties collected from anonymized arrests data. We will refer to this
network as the LondonGangNet. Note that the object is of
class network.
Regarding the attributes:
Birthplace records where they were born where the
values are: 1 = West Africa, 2= Caribbean, 3= UK, 4= East AfricaPrison indicates whether they have been to prisonAge is their age in yearsConvictions is the number of convictions a gang member
hasFor the LondonGangNet network, do the following:
LondonGangNet and plot a random network with
the same number of edges.LondonGangNet differ
from the random network?Prison.Prison. Interpret the coefficient.Convictions. Interpret the coefficient.Birthplace. What is the
interpretation of this matrix?Birthplace are more likely to form ties.Birthplace?Age are
more likely to form ties.Age?Prison or (and?)
Convictions ERGMs (i.e. #5 or/and #6).LondonGangNet, identifying nodes based on
Prison or Conviction in both plots.Birthplace or (and?)
Age ERGMs (i.e. #8 or/and #10).LondonGangNet, identifying nodes based on
Birthplace or Age in both plots.For this part of the homework you will use data from WO-PINS study.
The network is directed, binary ties collected from women in a prison
unit. We will refer to this network as trustNet. Note that
the object is of class network.
Regarding the attributes:
White records whether the respondent is white and 0 is
non-whiteYearsOnUnit indicates the number of years the
individual has been on the unitFor the trustNet network, do the following:
trustNet and plot a random network with the
same number of edges.trustNet differ from
the random network?White.YearsOnUnit of experience.White. Interpret the coefficient.YearsOnUnit. Interpret the coefficient.White. What is the
interpretation of this matrix?White (i.e. homophily for the attribute
White).trustNet,
identifying nodes based on White or (and?)
YearsOnUnit in both plots.Download the Homework 5 template prior to beginning. The template contains code for accessing the data files.
When you have completed your homework, click the “Knit” button to
render your .RMD file into a .HTML report.
Upload both your .RMD and .HTML files to
the appropriate assignment on the Canvas page for this course. Just
click the “Start Assignment” button to upload the files. This assignment
is DUE on 4/3.
Remember to ensure the following before submitting your assignment.
See Google’s R Style Guide for examples of common conventions.
.RMD files are knit into .HTML and other
formats procedural, or line-by-line.
install.packages() or
setwd() are bound to cause errors in knittinglibrary() in a previous chunkIf All Else Fails: If you cannot determine and fix
the errors in a code chunk that’s preventing you from knitting your
document, add eval = FALSE inside the brackets of
{r} at the beginning of a chunk to ensure that R does not
attempt to evaluate it, that is: {r eval = FALSE}. This
will prevent an erroneous chunk of code from halting the knitting
process.