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

 

ST5225:  Assignment 3

 

Instructions.

❼ Same as for Assignments 1 and 2.

❼ Each part is worth 1 mark, maximum number of marks you can get is

12.

❼ Please upload your solutions to the Assignment 3 submission folder in

Luminus by 1 October midnight.

❼ The questions in this assignment are related to the karate dataset,

which describes the friendships between 34 members of a karate club. The club became divided into 2 factions due to disagreement over the price of the karate lessons. Let m be the number of edges (friendships) in the dataset. Let ku be the degree of node u and xu the faction which node u belongs.

1.   (a)  Compute the assortativity coefficient with respect to faction.

(b) Is the coefficient computed in 1(a) significant? You can compute a Monte Carlo p-value by generating say 999 random graphs with fixed degree sequence.  The p-value is given by , where i is the number of random graphs with coefficient greater than the coefficient computed in 1(a).

(c) Argue why the edge weighted mean E  =       kuxu  is the

same over all generated random graphs.

 


(d) Argue why

 


 ku(xu  − E )2  is the same over all generated


random graphs.

(e) Is it true that the Monte Carlo p-values of the assortativity coeffi- cient and the modularity are the same for the same set of random graphs? Why?

2.  Model the karate dataset as a block model, with i = 1 the nodes in faction 1 and i = 2 the nodes in faction 2.

(a) Let bij  be the probability, for a given node u from group i and a given node v from group j, that u and v are neighbours. Find the MLE of bij  for this dataset.


 

 

 

 

 

(b)  Consider logistic regression, with the model

 


puv  = 1+exp(β0 +β1 (x-+xo)+β2I(x- =xo)) ,


(1)


where puv  is the probability that u and v are neighbours.  How are the MLE of β0 , β 1  and β2  related to the MLE of bij  in 2(a)?

3. Now fit the logistic model using (1).

(a)  Produce the output of the fitted model.

(b)  Based on your output, conclude whether members in faction 2 have significantly more friendships  (not necessarily within fac- tion) compared to members in faction 1.

(c)  Based on your output, conclude whether members have signifi- cantly more friendships within faction compared to between fac- tion.

(d) Using your output, find the (estimated) odds ratio for friendship within faction 2 versus friendship within faction 1.

(e) Using your output, find the (estimated) odds ratio for friendships between the two factions versus friendship within faction 1.

(f)  Check your answers for 3(d) and  (e) using your MLE in 2(a). That is find the estimated odds ratio using the MLE in 2(a) and show that it matches your answers in 3(d) and (e).

4. In this problem, you are not supposed to do a separate logistic regres- sion.

(a) What are the MLE estimates if we let xu  = 0 if u is in faction 1 and xu = 1 if u is in faction 2?

(b) What are the MLE estimates if we let xu  =  if u is in faction 1 and xu =  if u is in faction 2?

5.   (a)  Produce the dendogram using the dendPlot function inside li- brary(ape).

(b) How many nodes are misclassified if we compare the recommended partitioning of the nodes into 2 clusters, against the actual fac- tions that the nodes belong to?


 

 

 

 

 

(c) Let yu = 1 if node u is in the first cluster and yu = 2 if node u is in the second cluster. What is the sample correlation coefficient r between x  =  (x1 , . . . , x34 ) and y  =  (y1 , . . . , y34 )?   Based on your sample correlation coefficient, can you conclude that mem- bers tend to have more friendships within faction?   Perform a statistical test to support your conclusion.