statnet / tergm

Fit, Simulate and Diagnose Models for Network Evolution Based on Exponential-Family Random Graph Models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

doc updates needed

martinamorris opened this issue · comments

I'm not sure why these examples are using ergm, rather than tergm:

#' # Method 1: list of networks
#' monks <- NetSeries(list(samplk1,samplk2,samplk3))
#' ergm(monks ~ Form(~edges)+Diss(~edges))
#' ergm(monks ~ Form(~edges)+Persist(~edges))
#'
#' # Method 2: networks as arguments
#' monks <- NetSeries(samplk1,samplk2,samplk3)
#' ergm(monks ~ Form(~edges)+Diss(~edges))
#' ergm(monks ~ Form(~edges)+Persist(~edges))
#'
#' # Method 3: networkDynamic and time points:
#' ## TODO

The ToDo also needs to be Done ;)

Perhaps related -- I'm not able to fit a tergm with a NetSeries object (see #49)

Since a tergm CMLE is just an ergm with some extra info, these are examples of how NetSeries() adds this extra info.

right, but if you're using tergm and this is what you get for help, it's not very helpful.

Fair enough. Suggested edits?

Seems like the examples should show 2 things: how to construct a NS object from other objects, and what functions an NS object can be passed to. Yes? If so:

For construction:

  1. add the networkDynamic case -- turn an nD object into a NetSeries object, and also the reverse case if that's possible?
  • note: i tried this:
data(samplk)
samp.list <- list(samplk1,samplk2)
samp.series <- NetSeries(samp.list)
samp.dyn <- networkDynamic(network.list = samp.list, start=1)
samp.dyn2series <- NetSeries(samp.dyn, times = c(1:2)) # worked
samp.series2dyn <- networkDynamic(samp.series, start=1) # didn't work

is the series2dyn transform not possible?

For use:

  1. swap out tergm for ergm if it's that easy -- maybe worth having the same example show the use of both?
  2. show a case using summary
  3. any other functions?

i'm happy to do this if you answer the q's about series2dyn and any other functions.

Series 2 dyn should be easy, if there is a networkDynamic constructor from a list of networks. If not, that might take a while.

Regarding the other questions:

  1. I think both.
  2. Good idea.
  3. In principle, we could also plug it into simulate() LHS, since this is a case where both dynamic=TRUE and dynamic=FALSE simulation is valid: we can ask the simulation to "continue" the series, or we can ask the simulation to generate what the networks in the observed series could have been.