Holding my code as I learn ERGM analysis. see here:https://us.sagepub.com/en-us/nam/an-introduction-to-exponential-random-graph-modeling/book237737
The text of the book can also be found here: http://methods.sagepub.com/Book/an-introduction-to-exponential-random-graph-modeling