A colleague writes:

I’m working with a doctoral student on a latent affinity network problem and we keep hitting challenges in sampling, in our case using Metropolis-Hastings, for the network links. As you can imagine, lots of local modes, things get stuck, etc . . .

Any suggestions on how to sample network links?

My reply: Hi, yes, these are tough, with no general solution. One idea is to start with a reasonable approx and then use the Metropolis sampling to perturb it. You’re not getting the full posterior but you’re getting some sense of a range of possible soutions. Another approach is to change into a continuous-parameter model (instead of links being either there or not there, you can have a continuous parameter defined on the range (0,1) for each link), then you can fit it in Stan.

Yes, sampling adjacency matrices is extremely difficult. Xi’an recently provided me with some good pointers in his stats.stackexchange.com answer (see http://stats.stackexchange.com/questions/200377/sampling-a-random-binary-matrix-with-gaussian-probability-distribution). Andrew’s advice on converting the binary edges to continuous edges is also great. I have not tried to use Stan to fit network models but variational methods have worked very well for me.