| ChangeStats-ergmConstraint | R Documentation |
This is an constraint operator that takes a ergmTerm formula, and prevents any changes to the network that modify its value. Unlike \ergmConstraintergmDyads(fix = ...), the terms can be dyad-dependent and are calculated at the same time as the proposal rather than used to select proposable-dyads in the first place.
# ChangeStats(fix, check_dind = TRUE)
fix |
an |
check_dind |
logical; if |
If the constraint is dyad-independent, \ergmConstraintergmDyads(fix) will usually be faster (at least for estimation) and will make MPLE far more accurate, so if ChangeStats detects a dyad-independent constraint, it will fall back to Dyads. This can be overridden by setting check_dind = FALSE.
It is perfectly possible for this constraint to make sampling impossible. For example, ChangeStats(~edges) will prevent any proposals that change the number of edges in the network, but ergm has no way of knowing that two toggles (edge and non-edge) are now required, so it will keep trying making proposals and failing.
More insidiously, it is in principle possible for the constraint to split the sample space into two parts such that it is not possible to go between them without passing through a state that breaks the constraint.
Thus, it is recommended to use this constraint to, e.g., prevent certain motifs from forming.
ergmConstraint for index of constraints and hints currently visible to the package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.