tergm icon indicating copy to clipboard operation
tergm copied to clipboard

update tergm targets argument

Open martinamorris opened this issue 3 years ago • 6 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.

martinamorris avatar Jun 29 '21 19:06 martinamorris

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: https://github.com/statnet/tergm/issues/65#issuecomment-867258438

chad-klumb avatar Jun 29 '21 19:06 chad-klumb

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.

martinamorris avatar Jun 29 '21 19:06 martinamorris

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.

chad-klumb avatar Jun 29 '21 20:06 chad-klumb

@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 avatar Jun 12 '22 10:06 krivit

@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.

martinamorris avatar Jun 13 '22 18:06 martinamorris

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?

sgoodreau avatar Jun 13 '22 19:06 sgoodreau