-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use concatenation of ergm_model and ergm_conlist objects instead of formula alchemy whenever possible. #475
Comments
krivit
added a commit
to statnet/statnet.common
that referenced
this issue
Jul 18, 2022
…at stores the source environment, signs and supports concatenation and indexing. referneces statnet/ergm#475
krivit
added a commit
to statnet/statnet.common
that referenced
this issue
Jul 18, 2022
krivit
added a commit
that referenced
this issue
Jul 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Formulas come with an environment in which their terms should be evaluated, e.g.,
~nodefactor(x)
, wherex
is a variable present in the formula's environment. If the environment changes, the formula may no longer evaluate as intended.When combining two formulas, there is no unique way to combine their environments, unless one of them is trivial (e.g.,
baseenv
orglobalenv
) or known to be unused (e.g., known to contain specific terms .statnet.common::nonsimp_update.formula()
offers a number of options, but every option has the possibility of breaking something.Thus, we should, in general, avoid concatenating formulas. Currently, the "unsafe" concatenations are done in
.handle.auto.constraints()
and, to an extent,ergm()
, though the latter is only a problem if the RHS of the formula referencesTARGET_STATS
. In principle, it should be able to rename it to something else that's not a regularly used variable name.Auto constraints is a bit more complicated, since the API makes use of dot-substitution of the
%ergmlhs%
constraints into theconstraints=
constraints. We might therefore need some method for passing multiple formulas that are processed into constraint lists and then dot-substituted.The text was updated successfully, but these errors were encountered: