tergm icon indicating copy to clipboard operation
tergm copied to clipboard

add summary_formula methods for lists and network.lists

Open martinamorris opened this issue 3 years ago • 12 comments

if it's not too much trouble...

martinamorris avatar Jun 18 '21 00:06 martinamorris

There isn't one for lists, but there's one for network.lists, and it just evaluates the summary on each network in the list.

krivit avatar Jun 18 '21 02:06 krivit

hmm. i'm not having any luck with summary(network.list ~ terms):

data(samplk)
samp.list <- list(samplk1,samplk2)
samp.netlist <- network.list(samp.list)
summary.netlist <- summary(samp.netlist ~
                            Form(~edges) +
                            Diss(~edges))
Error: In term ‘Form (dynamic)’ (called from term ‘Form’ in package ‘tergm’): This term requires either dynamic data (network series or network dynamic or last toggle information) or for dynamic mode to be set (typically by passing ‘dynamic=TRUE)’ to the top-level function.

martinamorris avatar Jun 18 '21 17:06 martinamorris

Right. This is because that method is defined in ergm, and treats each network individually; this is probably how it should be, since we shouldn't assume that the user wants to omit and condition on the first network, unless they actually use NetSeries.

We could implement a tsummary.formula() method analogous to tergm that would do that automatically.

krivit avatar Jun 19 '21 10:06 krivit

Can we make it an argument to summary, instead of a new function?

martinamorris avatar Jun 21 '21 17:06 martinamorris

We'd have to do the same kind of switcheroo that we do with simulate_formula.network(), and that would probably require changing ergm, which we probably don't want to do for this release.

Longer term, we really need to figure out a better way to do this.

krivit avatar Jun 22 '21 00:06 krivit

For this release, we may have to just tell people to use NetSeries(). I don't think we have time for anything else.

krivit avatar Jun 22 '21 02:06 krivit

They can also use networkDynamic

martinamorris avatar Jun 22 '21 02:06 martinamorris

I am not 100% sure if there is an easy way to go from a network list to a networkDynamic. @skyebend ?

krivit avatar Jun 22 '21 02:06 krivit

summary_formula already works for networkDynamic

martinamorris avatar Jun 22 '21 03:06 martinamorris

What about the network.list argument to networkDynamic()?

-Carter

On 6/21/21 7:53 PM, Pavel N. Krivitsky wrote:

I am not 100% sure if there is an easy way to go from a network list to a |networkDynamic|. @skyebend https://github.com/skyebend ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/statnet/tergm/issues/54#issuecomment-865487716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJM3GGYXRK4HZG3UDJR4JLTT73MNANCNFSM464VE2WA.

CarterButts avatar Jun 22 '21 04:06 CarterButts

@CarterButts, oh, I missed that one. @martinamorris, sounds like we have a solution.

krivit avatar Jun 22 '21 04:06 krivit

Is this still an issue?

krivit avatar Jun 12 '22 11:06 krivit