Search code examples
igraphstatnet

Modeling ERGM with two edge attributes in R


I have a scenario, where one edge attribute affects another edge attribute. Is there a way to model this in ERGM? For instance, consider outsourcing contracts where complexity of the contract affects the value of contract. I would like to model valued ERGM in a way that I can predict a network with contract value using complexity.

I know we could use node attributes in modeling the ERGM, is it possible to model two edge attributes? Please also let me know if we could model this with methods other than ERGMs.


Solution

    1. The first question is whether ergm is necessarily the best tool to use here. If you are interested in modelling the value of the contract given that it exists, you might not need the full ERGM machinery. Instead, you might be able to get away with an linear or generalised linear model with appropriate covariates. It's only if you need to model the existence of the contract and its value that you need the valued ERGM machinery.
    2. If you do require ERGMs, you should be able to use the edgecov term in a valued ERGM. You need to be careful in constructing the network, though, since an edge has to exist in order to have a value. The most reliable approach is probably to construct a matrix with the predictor edge's values, attach it to the network as a network (%n%) attribute, and reference it in the term.