This is a new term for the ergm package
that counts the number of nodes in the network with at least
a given degree.
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{θ *
g(y)}/c(θ), where
g(y) is a vector of network statistics for y,
θ is a parameter vector of the same
length and c(θ) 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.
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.
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
data(florentine)
summary(flomarriage~mindegree(3))
summary(flomarriage~mindegree(1,by="priorates"))
fit <- ergm(flomarriage~edges+mindegree(1,by="priorates"))
summary(fit)