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 tergm targets argument

martinamorris opened this issue · comments

as currently written, the docs say:

targets
	
One-sided ergm-style formula specifying statistics whose moments are used for the EGMME. Unused for CMLE and CMPLE. Targets is required for EGMME estimation. It may contain any valid ergm terms. Any offset terms are used only during the preliminary SAN run; they are removed automatically for the EGMME proper. If targets is specified as a character (one of "formation" and "dissolution") then the function .extract.fd.formulae is used to determine the corresponding formula; the user should be aware of its behavior and limitations.

Presumably any Operator formula can be used as a target. So rather than "formation" and "dissolution" we should probably use the operator names: Form, Persist, Diss, Cross & Change.

We really shouldn't offer the character functionality at all; we cannot determine what it means in general.

Rather than expanding this, the character options should be removed.

Same goes for monitor: #65 (comment)

Why do you say that? The Operators all have formulas -- and that's what we want to grab, rather than having to type it twice.

We lack a definition of the formation and dissolution parts of a tergm formula that depends only on the tergm formula's statistical content rather than the arbitrary way in which the tergm formula is written. Even if such a definition is eventually provided, it is probably impossible to automatically extract those parts of the formula in a way that is practically useful in the general case.

If the user wants to refer to the same formula more than once, they can assign it to a variable and use the variable name inside an operator and again as the targets/monitor argument.

@martinamorris , this is one of those hanging conversations. I agree with @chad-klumb in principle that specifying targets and monitored statistics with character strings is clunky and fragile, and I think it would be a good idea to deprecate. However, if there is a lot of interest from the end-user side (i.e., you and @sgoodreau), it might be worth keeping.

@krivit I guess what I don't understand is why the text parsing that is used for the formula(e) of the tergm call can't be used in this context as well.

Can you give a qucik example of what you mean here, i.e. what is an exampe of a call that is currently allowable but would not be with this change?