Learn R Programming

ergm.userterms (version 3.10.0)

mindegree-term: New Minimum Degree Term for the 'ergm' Package

Description

This is a new term for the ergm package that counts the number of nodes in the network with at least a given degree.

Arguments

The Minimum Degree Term

mindegree(mindeg, by=NULL)

Minimum Degree: The mindeg argument is an integer. This term adds one network statistic to the model being the number of nodes in the network of at least degree mindeg. That is, the statistic equals the number of nodes in the network with mindeg or more edges. The optional argument by is a character string giving the name of an attribute in the network's vertex attribute list. If this is specified, then degrees are calculated using the subnetwork consisting of only edges whose endpoints have the same value of the by attribute. This term can only be used with undirected networks.

Details

The function ergm is used to fit linear exponential random graph models, in which the probability of a given network, \(y\), on a set of nodes is \(\exp\{\theta{\cdot}g(y)\}/c(\theta)\), where \(g(y)\) is a vector of network statistics for \(y\), \(\theta\) is a parameter vector of the same length 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. The ergm package contains a wide range of terms. For the details on the possible <model terms>, see ergm-terms.

The ergm.userterms package provides a template for adding new terms. The terms can be used throughout the ergm package and behave identically to the supplied terms.

References

Hunter DR, Goodreau SM, Handcock MS (2013). ergm.userterms: A Template Package for Extending statnet, Journal of Statistical Software 52(2), 1-25, URL http://www.jstatsoft.org/v52/i02/.

See Also

statnet, network, ergm, ergm-terms

Examples

Run this code
# NOT RUN {
data(florentine)
summary(flomarriage~mindegree(3))
summary(flomarriage~mindegree(1,by="priorates"))
fit <- ergm(flomarriage~edges+mindegree(1,by="priorates"))
summary(fit)
# }

Run the code above in your browser using DataLab