ergm
ergm copied to clipboard
Can the underlying C structures represent non-square arrays?
I've been working with Discrete Exponential Family Models (i.e., not necessarily ERGMs). For that reason (and for fun/learning, obviously), I've been putting a lot of effort into building a C++ template library that allows me to count sufficient stats in arrays with arbitrary dimensions--not necessarily square.
I have learned a lot from looking at the underlying C code in ERGM (thank you!), and now I wonder if there's a way I can use that to work with my non-square binary arrays.
PS: I'm sorry if I was supposed to post this on statnet_help; I figured that, b/c it deals with the underlying engine of ERGM, it would be more appropriate to ask here.
The ERGM internals don't know anything about matrices; they only know about graphs. So anything that can be represented via a graph (possibly with constraints) can be represented that way; for instance, k-mode networks can be written in terms of a single network with attributes and block constraints (so long as your statistics are correctly defined). Not sure if that is practical for your application, but there is a lot of flexibility in it. I would note that ERGM (and many things in statnet, though not all) are designed with sparseness in mind, and thus can get bogged down in the large n' dense regime - so if you are dealing with non-sparse array data, this may not be the best way to handle it.
Hope that helps!
(BTW, this would indeed be better for the help list. But since it's here, it shall be answered!)
BTW of motifs and graphlets, have you seen https://github.com/CarterButts/ergm.graphlets, @gvegayon ?
I have not seen the ergm.graphlets
before; @mbojan, thanks for the reference! The paper is indeed very relevant to what I am looking at.
@CarterButts, thanks for the quick reply! Good point about setting up constraints. I'd need to take a more detailed view of how to specify "arbitrary" constraints. Nonetheless, as you said, non-sparse data goes better with contiguous memory structures!
@gvegayon , just checking in: has this issue been resolved to your satisfaction?
Yes, @krivit, I'm good with it. Thanks for checking!