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

update documentation for simulate.tergm

martinamorris opened this issue · comments

as currently written, it appears to assume STERGM. for example:

tergm/R/simulate.tergm.R

Lines 67 to 71 in 3080520

#' @param monitor A one-sided formula specifying one or more terms whose
#' value is to be monitored. If \code{monitor} is specified as a character
#' (one of \code{"formation"}, \code{"dissolution"}, and \code{"all"}) then
#' the function \code{\link{.extract.fd.formulae}} is used to determine the
#' corresponding formula; the user should be aware of its behavior and limitations.

if the monitor argument can only be used with Form() and Diss() operators, we should say this, otherwise this needs to be rewritten.

It can be used with all of them, I think.

And where do the monitored stats live in the output object?

I just ran the sim below, and I can see the stats.gen but not the monitored stats:

sep.sim <- simulate(sep.fit, nsim = 1, 
                    time.slices = 1000, 
                    monitor = "~edges",
                    stats = T)
names(attributes(sep.sim))
[1] "names"     "class"     "stats.gen" "coef"      "changes" 
``

Appended to stats, wherever they are.

monitor should be either an ordinary formula (so, ~edges, not "~edges") or one of the character values "formation", "dissolution", or "all"

I think the character options should be removed (we can't make sense of them in the general non-separable case) but at the moment they are still there.