This is a new term for the ergm
package
that counts the number of nodes in the network with at least
a given degree.
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.
The function ergm
is used to fit linear
exponential
random graph models, in which
the probability of a given network,
The network statistics 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.
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/.
statnet, network, ergm, ergm-terms
# 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