If there is a dot in the constraints= formula passed, e.g., constraints=~. or constraints=~. + blockdiag("blah"), the constraints set by %ergmlhs% on the network object are substituted in place of the dot.
If there is no dot, they are discarded.
The defaults constraints argument is constraints=~..
However, as an Honours student and I have discovered, this may be bad user interface design: a typical user would want to add constraints on top of the ergmlhs ones, not override them, and it's easy to forget that they even exist.
Thus, I wonder whether it might be worth modifying the behaviour:
If there is a dot in the constraints= formula passed, e.g., constraints=~. or constraints=~. + blockdiag("blah"), the constraints set by %ergmlhs% on the network object are substituted in place of the dot.
If there is no dot, the constraints set by %ergmlhs% on the network object are are prepended (so constraints=~blockdiag("blah") is treated as constraints=~. + blockdiag("blah")).
If there is an explicit flag (TBD), they are dropped.
Possible flags include:
~ -.: this is analogous to lm(), where ~-1 fits a model without intercept; at the same time - <constraint> actually has a distinct meaning in constraint formula specification.
~ !.: this doesn't clash with anything, but we may, say, decide to implement a ! constraint operator to negate dyad-independent constraints at some point in the future.
Current behaviour is as follows:
constraints=
formula passed, e.g.,constraints=~.
orconstraints=~. + blockdiag("blah")
, the constraints set by%ergmlhs%
on the network object are substituted in place of the dot.constraints=~.
.However, as an Honours student and I have discovered, this may be bad user interface design: a typical user would want to add constraints on top of the
ergmlhs
ones, not override them, and it's easy to forget that they even exist.Thus, I wonder whether it might be worth modifying the behaviour:
constraints=
formula passed, e.g.,constraints=~.
orconstraints=~. + blockdiag("blah")
, the constraints set by%ergmlhs%
on the network object are substituted in place of the dot.%ergmlhs%
on the network object are are prepended (soconstraints=~blockdiag("blah")
is treated asconstraints=~. + blockdiag("blah")
).Possible flags include:
~ -.
: this is analogous tolm()
, where~-1
fits a model without intercept; at the same time- <constraint>
actually has a distinct meaning in constraint formula specification.~ !.
: this doesn't clash with anything, but we may, say, decide to implement a!
constraint operator to negate dyad-independent constraints at some point in the future.