2

Nodes are universities around the world. I'm doing ERGM (Exponential random graph models) using R about what factors affect universities to have collaborations. I have node attribute including both longitude and latitude information. I would like to use the information of geo-locations to test if the distance between universities (nodes) will affect the probability of collaboration. I am aware that I should make new ERGM terms, but I don't have a clue of doing.

The starting code is something like the following:

library(statnet)    
model<-ergm(g ~ edges +  gwesp(0.2, fixed=T), 
             control=control.ergm(parallel=np, parallel.type="PSOCK"))
fffchao
  • 174
  • 3
  • 8
  • It sounds like you haven't converted long/lat to distance yet. You need to do that first. Then include the distance metric in your model, for which I believe you want `nodecov('distance')`. But please check the `ergm.terms` in the [reference manual](https://cran.r-project.org/web/packages/ergm/ergm.pdf) to be sure. – alexwhitworth Sep 13 '16 at 17:36
  • Is it not edgecov(network)? – fffchao Sep 16 '16 at 08:41
  • I'm honestly not sure, which is why I suggested you check `ergm.terms`. – alexwhitworth Sep 16 '16 at 14:53

0 Answers0