graspologic-org / graspologic

Python package for graph statistics
https://graspologic-org.github.io/graspologic/
MIT License
634 stars 134 forks source link

[Question] coefficient magnitude, GCT #1052

Closed jamesdalg closed 8 months ago

jamesdalg commented 8 months ago

Hello! I attended your course at JSM in August and I'm wondering if there is something within the graspologic package that will give a measure of effect size in addition to a p-value for the connectivity between groups (e.g. an omega coefficient in an ERGM). I saw the group connection test in your package and it seems to be the closest to what I'm trying to do, but it would be helpful to have a measure of the magnitude of the association. To explain, my matrices that I'm turning into graphs are valued and I am trying to find something that gives a sense for the effect size of how the connection between blocks changes between two conditions.

Best, James Dalgleish

bdpedigo commented 8 months ago

Hi @jamesdalg - you can find a "stats" field in the misc dictionary returned by group_connection_test, the exact meaning of which will depend on the exact test you asked for with method. https://microsoft.github.io/graspologic/latest/reference/reference/inference.html#graspologic.inference.group_connection_test

perhaps that's what you want?

jamesdalg commented 8 months ago

I think that's exactly it!! Great. Thanks!

jamesdalg commented 8 months ago

What I noticed is that I can't use the SBM on valued edges. Is there some model that allows for edge weights?

    192 graph = import_graph(graph)
    194 if not is_unweighted(graph):
--> 195     raise NotImplementedError(
    196         "Graph model is currently only implemented for unweighted graphs."
    197     )
    199 if y is None:
    200     self._estimate_assignments(graph)

NotImplementedError: Graph model is currently only implemented for unweighted graphs.
bdpedigo commented 8 months ago

conceptually, sure. one can put a distribution on the weights in a given block, say. obviously we don't have such a thing implemented.

if you did that, you'd just have to decide how you want to compare the two distributions in two different graphs, say. this paper talks about some possible options https://arxiv.org/pdf/2011.14990.pdf

jamesdalg commented 8 months ago

Sounds great! I'll look into it.