Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


Resit assignment – Part 1 and Part 2

Part 2

For the second assignment, you will need to use the attached dataset. The data represent the trust network of a secondary school classroom over a period of one year. The dataset comes from a questionnaire asking students whom they would trust with a personal secret. This network is directed and binary. The network was measured at two time points over the course of an academic year. We also have information about the sex of students.

The data are stored in the following three files:

- 1200_trust_w1.csv: the trust network at the first time point (1 = the sender trusts the receiver; 0 = the sender does not trust the receiver)

- 1200_trust_w2.csv: the trust network at the second time point (the coding is the same as above)

- 1200_sex: the sex of students (1 = male, 2 = female)

You can load the data in R using the following command lines:

trust.t1 <- as.matrix(read.csv(file = "1200_trust_w1.csv", row.names = 1))

trust.t2 <- as.matrix(read.csv(file = "1200_trust_w2.csv", row.names = 1))

sex <- unlist(read.csv(file = "1200_sex.csv", row.names = 1))

Complete the following tasks:

a) Visualize and describe the trust network at the second time point in terms of number of nodes, number of edges and density. Interpret the results.

b) You are interested in running an ERGM on the trust network at the second time point with the following statistics:

- edges

- mutual

- gwesp(0, fixed=TRUE)

- nodeocov(“sex”)

- nodeicov(“sex”)

- nodematch(“sex”)

Describe what these statistics represent and why they might be of interest to include in an ERGM. Fit the mentioned ERGM and interpret the parameter estimates. What can you conclude? Briefly explain how you would assess the goodness of fit of this model.

c) You would like to fit a SAOM to the trust network. You will need to use data from both time points this time. You should include the following effects in your model (the below are the effect short names from RSiena):

- density

- recip

- transTrip

- inPop

- egoX [related to the covariate sex]

- altX [related to the covariate sex]

- sameX [related to the covariate sex]

Fit this model to the data. Add the “returnDeps=TRUE” argument to the estimation function; you will need this to complete the last task. Assess the convergence of the model. Interpret the results, briefly discussing every effect in the table.

d) Test how well the above model fits the outdegree distribution of the observed network at the second time point. Use the sienaGOF function to do this. Plot the outcome of the GoF test and interpret the result.