Learn R Programming

ergm (version 3.1.3)

ergm-terms: Terms used in Exponential Family Random Graph Models

Description

The function ergm is used to fit exponential random graph models, in which the probability of a given network, $y$, on a set of nodes is $h(y) \exp{\eta(\theta) \cdot g(y)}/c(\theta)$, where $h(y)$ is the reference measure (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)=\theta$ for most terms), and $c(\theta)$ is the normalizing constant for the distribution.

The network statistics $g(y)$ are entered as terms in the function call to ergm.

This page describes the possible terms (and hence network statistics) included in ergm package. Other packages may add their own terms, and package ergm.userterms provides tools for implementing them.

The current recommendation for any package implementing additional terms is to create a help file with a name or alias ergm-terms, so that help("ergm-terms") will list ERGM terms available from all loaded packages.

Arguments

Specifying models

Terms to ergm are specified by a formula to represent the network and network statistics. This is done via a formula, that is, an Rformula object, of the form y ~ + ..., where y is a network object or a matrix that can be coerced to a network object, and , , etc, are each terms chosen from the list given below. To create a network object in R, use the network function, then add nodal attributes to it using the %v% operator if necessary.

Binary and valued ERGM terms

ergm functions such as ergm and simulate (for ERGMs) may operate in two modes: binary and weighted/valued, with the latter activated by passing a non-NULL value as the response argument, giving the edge attribute name to be modeled/simulated.

Binary ERGM statistics cannot be used in valued mode and vice versa. However, a substantial number of binary ERGM statistics --- particularly the ones with dyadic indepenence --- have simple generalizations to valued ERGMs, and have been adapted in ergm. They have the same form as their binary ERGM counterparts, with an additional argument: form, which, at this time, has two possible values: "sum" (the default) and "nonzero". The former creates a statistic of the form $\sum_{i,j} x_{i,j} y_{i,j}$, where $y_{i,j}$ is the value of dyad $(i,j)$ and $x_{i,j}$ is the term's covariate associated with it. The latter computes the binary version, with the edge considered to be present if its value is not 0.

Valued version of some binary ERGM terms have an argument threshold, which sets the value above which a dyad is conidered to have a tie. (Value less than or equal to threshold is considered a nontie.)

References

  • Davis, J.A. and Leinhardt, S. (1972). The Structure of Positive Interpersonal Relations in Small Groups. In J. Berger (Ed.),Sociological Theories in Progress, Volume 2, 218--251. Boston: Houghton Mifflin.
  • Holland, P. W. and S. Leinhardt (1981). An exponential family of probability distributions for directed graphs.Journal of the American Statistical Association, 76: 33--50.
  • Hunter, D. R. and M. S. Handcock (2006). Inference in curved exponential family models for networks.Journal of Computational and Graphical Statistics, 15: 565--583.
  • Hunter, D. R. (2007). Curved exponential family models for social networks.Social Networks, 29: 216--230.
  • Krackhardt, D. and Handcock, M. S. (2007). Heider versus Simmel: Emergent Features in Dynamic Structures.Lecture Notes in Computer Science, 4503, 14--27.
  • Krivitsky P. N. (2012). Exponential-Family Random Graph Models for Valued Networks.Electronic Journal of Statistics, 2012, 6, 1100-1128.http://dx.doi.org/10.1214/12-EJS696{doi:10.1214/12-EJS696

Snijders T. A. B., G. G. van de Bunt, and C. E. G. Steglich. Introduction to Stochastic Actor-Based Models for Network Dynamics. Social Networks, 2010, 32(1), 44-60. http://dx.doi.org/10.1016/j.socnet.2009.02.004{doi:10.1016/j.socnet.2009.02.004}

Morris M, Handcock MS, and Hunter DR. Specification of Exponential-Family Random Graph Models: Terms and Computational Aspects. Journal of Statistical Software, 2008, 24(4), 1-24. http://www.jstatsoft.org/v24/i04 Snijders, T. A. B., P. E. Pattison, G. L. Robins, and M. S. Handcock (2006). New specifications for exponential random graph models, Sociological Methodology, 36(1): 99-153. ergm package, ergm, network, %v%, %n% ergm(flomarriage ~ kstar(1:2) + absdiff("wealth") + triangle)

ergm(molecule ~ edges + kstar(2:3) + triangle + nodematch("atomic type",diff=TRUE) + triangle + absdiff("atomic type")) models