ergmConstraint {ergm}R Documentation

Sample Space Constraints for Exponential-Family Random Graph Models

Description

This page describes how to specify the constraints on the network sample space (the set of possible networks Y, the set of networks y for which h(y)>0) and sometimes the baseline weights h(y) to functions in the ergm package. It also provides an indexed list of the constraints visible to the ergm's API. Constraints can also be searched via search.ergmConstraints, and help for an individual constraint can be obtained with ⁠ergmConstraint?<constraint>⁠ or help("<constraint>-ergmConstraint").

Specifying constraints

In an exponential-family random graph model (ERGM), the probability or density of a given network, y \in Y, on a set of nodes is

h(y) \exp[\eta(\theta) \cdot g(y)] / \kappa(\theta),

where h(y) is the reference distribution (particularly for valued network models), g(y) is a vector of network statistics for y, \eta(\theta) is a natural parameter vector of the same length (with \eta(\theta)\equiv\theta for most terms), \cdot is the dot product, and \kappa(\theta) is the normalizing constant for the distribution. A complete ERGM specification requires a list of network statistics g(y) and (if applicable) their \eta(\theta) mappings provided by a formula of ergmTerms; and, optionally, sample space \mathcal{Y} and reference distribution h(y) information provided by ergmConstraints and, for valued ERGMs, by ergmReferences. Constraints typically affect Y, or, equivalently, set h(y)=0 for some y, but some (“soft” constraints) set h(y) to values other than 0 and 1.

A constraints formula is a one- or two-sided formula whose left-hand side is an optional direct selection of the InitErgmProposal function and whose right-hand side is a series of one or more terms separated by "+" and "-" operators, specifying the constraint.

The sample space (over and above the reference distribution) is determined by iterating over the constraints terms from left to right, each term updating it as follows:

For example, a constraints formula ~a-b+c-d with all constraints dyadic will allow dyads permitted by either a or b but only if they are also permitted by c; as well as all dyads permitted by d. If A, B, C, and D were logical matrices, the matrix of variable dyads would be equal to ((A|B)&C)|D.

Terms with a positive sign can be viewed as "adding" a constraint while those with a negative sign can be viewed as "relaxing" a constraint.

Inheriting constraints from LHS network

By default, %ergmlhs% attributes constraints or constraints.obs (depending on which constraint) attached to the LHS of the model formula or the ⁠basis=⁠ argument will be added in front of the specified constraints formula. This is the desired behaviour most of the time, since those constraints are usually determined by how the network was constructed (e.g., structural zeros in a block-diagonal network).

For those situations in which this is not the desired behavior, a . term (with a positive sign or no sign at all) can be used to manually set the position of the inherited constraints in the formula, and a -. (minus-dot) term anywhere in the constraints formula will suppress the inherited formula altogether.

Constraints visible to the package

Term Package Description Concepts
ergm Constrain fixed or varying dyad-independent terms directed dyad-independent operator undirected
ergm Preserve the actor degree for bipartite networks bipartite
ergm Preserve the receiver degree for bipartite networks bipartite
ergm Constrain maximum and minimum vertex degree directed undirected
ergm Block-diagonal structure constraint directed dyad-independent undirected
ergm Constrain blocks of dyads defined by mixing type on a vertex attribute. directed dyad-independent undirected
ergm Preserve the degree distribution of the given network directed undirected
ergm Preserve the degree of each vertex of the given network directed undirected
ergm A soft constraint to adjust the sampled distribution for dyad-level noise with known perturbation probabilities directed dyad-independent soft undirected
ergm Preserve the edge count of the given network
ergm Preserve values of dyads incident on vertices with given attribute directed dyad-independent undirected
ergm Preserve the dyad status in all but the given edges directed dyad-independent undirected
ergm Preserve and preclude edges directed dyad-independent undirected
ergm Preserve the hamming distance to the given network (BROKEN: Do NOT Use) directed undirected
ergm Preserve the indegree distribution directed
ergm Preserve indegree for directed networks directed
ergm Preserve the observed dyads of the given network directed dyad-independent undirected
ergm Preserve the outdegree distribution directed
ergm Preserve outdegree for directed networks directed

All constraints

Term dir dyad-indep op undir bip soft
Dyads
b1degrees
b2degrees
bd
blockdiag
blocks
degreedist
degrees
dyadnoise
edges
egocentric
fixallbut
fixedas
hamming
idegreedist
idegrees
observed
odegreedist
odegrees

Constraints by keywords

Jump to keyword: directed dyad-independent operator undirected bipartite soft

directed

Dyads bd blockdiag blocks degreedist degrees dyadnoise egocentric fixallbut fixedas hamming idegreedist idegrees observed odegreedist odegrees

dyad-independent

Dyads blockdiag blocks dyadnoise egocentric fixallbut fixedas observed

operator

Dyads

undirected

Dyads bd blockdiag blocks degreedist degrees dyadnoise egocentric fixallbut fixedas hamming observed

bipartite

b1degrees b2degrees

soft

dyadnoise

References


[Package ergm version 4.6.0 Index]